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

Popular posts from this blog

c# - how to write client side events functions for the combobox items -

exception - Python, pyPdf OCR error: pyPdf.utils.PdfReadError: EOF marker not found -