By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,984 Members | 1,024 Online
Bytes IT Community
Submit an Article
Got Smarts?
Share your bits of IT knowledge by writing an article on Bytes.

Change Datagrid Cell Value in ItemDataBound Event

P: 1
Here i give sample code to change datagrid in ItemDataBound Event.


DataRowView drv = (System.Data.DataRowView)e.Item.DataItem;
string Node_MAC = drv["Node_MAC"].ToString().Trim();
if (Node_MAC.Length == 16)
{
e.Item.Cells[0].Text = Node_MAC.Substring(0, 4);
}

By
S.Suresh
Feb 25 '11 #1
Share this Article
Share on Google+