an example of the onEditCommand method. In this case D1 (the Grid object)
is known.
*************** *************** *************** *******
sub DataEdit(S as Object, E as DataGridCommand EventArgs)
trace.warn("in DataEdit")
D1.EditItemInde x=Cint(E.Item.I temIndex)
FillUpGrid()
end sub
*************** *************** *************** ********
In my case, I have a Datalist that has multiple DataGrids in them, something
like:
*************** *************** *************** ***************
<asp:datalist id="DataList1"
runat="server"
Width="100%"
BorderWidth="0p x"
OnItemCommand=" OnSelectIndexCh anged"
footerstyle-horizontalalign ="center"
CellPadding="0"
CellSpacing="0"
style="margin:0 ">
<AlternatingIte mStyle cssClass=altern ateRow
</AlternatingItem Style>
<asp:DataGrid visible="False"
id="DataGrid1"
runat="server"
Width="400px"
Height="79px"
AutoGenerateCol umns="False"
GridLines="None "
onEditCommand=" DataEdit"
onCancelCommand ="DataCancel "
onUpdateCommand ="DataUpdate ">
</asp:datalist>
*************** *************** *************** *************** *************** ***************
Here there are multiple datagrids (one for each listitem). When I run my
onEditCommand routine, it needs to know the DataGrid to bind the data to.
It can't be DataGrid1.
How do I determine the Grid object from:
sub DataEdit(S as Object, E as DataGridCommand EventArgs)
Thanks,
Tom.