|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Interrogating cells on current row for GridViewMight some kind, knowledgeable soul know how to determine the contents of a particular cell within a GridView control when the procedure specified in "OnTextChanged" is fired? <asp:TextBox ID="txtQuantity" runat="server" Text='<%# Bind("Quantity") %>' OnTextChanged="QuantityChanged" AutoPostBack ="true" ></asp:TextBox> The procedure QuantityChanged gets fired OK, but I'm at a loss to determine which row the user is editing, and the values of cells in that particular row. Note - I can't use the RowEditing or RowUpdating commands, because the datasource for the grid is bound at run time, and there is no primary key. Neither would the "Selected" events fire, because I don't want the user to have to click on "select" or "edit" - this really needs to hapen through OnTextChanged. The grid works great, the trick now is determining through the GridView properties the current row, and the values of particular cells in that row. Something like: RetrievedValue = gridShoppingCart.Rows([???]).Cells([???]).???? Kind thanks in advance to the gracious person willing to help! CindyLu Hello LuLu
To get the row currently in edit mode GridViewRow row = gridShoppingCart.Rows [ gridShoppingCart.EditIndex ]; To get the values in the row: for BoundField row.Cells [ x ].Text for other field types row.Cells [ x ].Controls [ x ].Text
Wizard control in 2.0 and dynamic items
web controls install SQLDataSource Values is this possible? CheckBoxList Control column width Best way to save properties (ie. text) on webcontrols for reloading (asp.net 2.0) Treeview Width. Listbox box validator Newbie: How to add Input with in Table Cell Using a custom server control declaratively in a user control |
|||||||||||||||||||||||