T
tshad
I have multiple Grid objects that are editable on my page. The following is
an example of the onEditCommand method. In this case D1 (the Grid object)
is known.
****************************************************
sub DataEdit(S as Object, E as DataGridCommandEventArgs)
trace.warn("in DataEdit")
D1.EditItemIndex=Cint(E.Item.ItemIndex)
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="0px"
OnItemCommand="OnSelectIndexChanged"
footerstyle-horizontalalign="center"
CellPadding="0"
CellSpacing="0"
style="margin:0">
<AlternatingItemStyle cssClass=alternateRow
ataGrid visible="False"
id="DataGrid1"
runat="server"
Width="400px"
Height="79px"
AutoGenerateColumns="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 DataGridCommandEventArgs)
Thanks,
Tom.
an example of the onEditCommand method. In this case D1 (the Grid object)
is known.
****************************************************
sub DataEdit(S as Object, E as DataGridCommandEventArgs)
trace.warn("in DataEdit")
D1.EditItemIndex=Cint(E.Item.ItemIndex)
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="0px"
OnItemCommand="OnSelectIndexChanged"
footerstyle-horizontalalign="center"
CellPadding="0"
CellSpacing="0"
style="margin:0">
<AlternatingItemStyle cssClass=alternateRow
<asp</AlternatingItemStyle>
id="DataGrid1"
runat="server"
Width="400px"
Height="79px"
AutoGenerateColumns="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 DataGridCommandEventArgs)
Thanks,
Tom.