Information générale
Titre:
How to get a value from other datagrid boundcolumn?
Versions des environnements
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.
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement