c# - Accessing Gridview columns by Row.Cells -
hai using following code access columns in row displays empty string when using row.cells[1].text
using code in gridview unload event handler.
thanks inn advance.
foreach (gridviewrow row in grvsearchringtone.rows) { string coltext = row.cells[1].text; }
it done in gridviews rowdatabound
event ie
protected void gvusers_rowdatabound(object sender, gridviewroweventargs e) { if (e.row.rowtype == datacontrolrowtype.header) { string coltext = e.row.cells[1].text } else if(e.row.rowtype == datacontrolrowtype.datarow) { string coltext = e.row.cells[1].text } }
hope helps.
Comments
Post a Comment