Search code examples
c#asp.netgridviewdevexpressdatagridviewtextboxcell

how to get value of users' values in textboxes in GridView


I have used a DevExpress GridView and I put textboxes in QUANTITY column. Users are supposed to enter quantities in those textboxes. When they click OK button, I need to get what they entered into textboxes. TextBoxes are in the last column.

I am not sure how to get the grid values. can anybody help me with this?

<dx:ASPxGridView ID="gv2" runat="server" Width="100%" 
    AutoGenerateColumns="False">
    <Columns>
        <dx:GridViewDataTextColumn Caption="STOK KODU" FieldName="STOK_KODU" 
            ShowInCustomizationForm="True" VisibleIndex="0">
        </dx:GridViewDataTextColumn>
        <dx:GridViewDataTextColumn Caption="VARYANT KODU" FieldName="VARYANT_KODU" 
            ShowInCustomizationForm="True" VisibleIndex="1">
        </dx:GridViewDataTextColumn>
        <dx:GridViewDataTextColumn Caption="BEDEN" FieldName="BEDEN" 
            ShowInCustomizationForm="True" VisibleIndex="2">
        </dx:GridViewDataTextColumn>
        <dx:GridViewDataTextColumn Caption="KAVALA" FieldName="KAVALA" 
            ShowInCustomizationForm="True" VisibleIndex="3">
        </dx:GridViewDataTextColumn>
        <dx:GridViewDataTextColumn Caption="RENK" FieldName="RENK" 
            ShowInCustomizationForm="True" VisibleIndex="4">
        </dx:GridViewDataTextColumn>
        <dx:GridViewDataTextColumn Caption="ADET" FieldName="ADET" 
            ShowInCustomizationForm="True" VisibleIndex="5">

            <PropertiesTextEdit DisplayFormatString="c2">
            </PropertiesTextEdit>
            <DataItemTemplate>
                <dx:ASPxTextBox ID="totalText" runat="server" Text='0' />
            </DataItemTemplate>

        </dx:GridViewDataTextColumn>
    </Columns>
</dx:ASPxGridView>

Solution

  • Did you want this client side or server side?

    These links talks about client side:

    http://www.devexpress.com/Support/Center/Question/Details/Q207747
    http://www.devexpress.com/Support/Center/Question/Details/Q438457

    Here is a link about the server side:

    http://www.devexpress.com/Support/Center/Question/Details/Q473477