A
Andy
Hello,
I have a datagrid within another datagrid. The innder datagrid
contains a dropdownlist which fires an event as index change
(OnSelectedIndexChanged). I can get the ItemIndex of the dropdownlist
using this code below:
((DataGridItem)((DropDownList)Sender).NamingContainer).ItemIndex;
This returns the ItemIndex of the dropdownlist of the inner datagrid.
However, I need to know the ItemIndex of the outter datagrid (the
parent datagrid) where the event is firing. So I use the following
code, but it did not work.
((DataGridItem)((DropDownList)Sender).NamingContainer.Parent.FindControl("LineItemGrid")).ItemIndex;
What should I do to get the ItemIndex of the parent datagrid.
Thanks a lot.
I have a datagrid within another datagrid. The innder datagrid
contains a dropdownlist which fires an event as index change
(OnSelectedIndexChanged). I can get the ItemIndex of the dropdownlist
using this code below:
((DataGridItem)((DropDownList)Sender).NamingContainer).ItemIndex;
This returns the ItemIndex of the dropdownlist of the inner datagrid.
However, I need to know the ItemIndex of the outter datagrid (the
parent datagrid) where the event is firing. So I use the following
code, but it did not work.
((DataGridItem)((DropDownList)Sender).NamingContainer.Parent.FindControl("LineItemGrid")).ItemIndex;
What should I do to get the ItemIndex of the parent datagrid.
Thanks a lot.