General information
Title:
How to get a value from other datagrid boundcolumn?
hi all,
I have a problem to retrieve a value from other datagrid boundcolumn. I tried to using below code but got error in line 4 like "Cannot convert type 'System.Web.UI.Control' to 'System.Web.UI.WebControls.BoundColumn'".
1 for (int i=0; i < dgrMatchCart.Items.Count; i++)
2 {
3 DataGridItem _item = dgrMatchCart.Items[i];
4 System.Web.UI.WebControls.BoundColumn DocNoBox =(System.Web.UI.WebControls.BoundColumn)_item.FindControl("DocNo");
5 TextBox AllotedAmtBox = (TextBox)_item.FindControl("txtAllotedAmt");
6 }
I also tried using this method but how do I fire a event in other datagrid?
protected void dgrMatchListing_CartCommand(Object sender, DataGridCommandEventArgs e)
{
DataRow drCart = dtCart.NewRow();
TableCell DocNoCell = e.Item.Cells[3];
....
}
Someone can help me?
Thank you in advance for helping.
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only