.net - C# Check gridview row select or not -


i want check whether row in gridview selected or not. how can write if condition??

if (gridview-row[1].select)  {     //do }  else  {    //do } 

youcan use gridviewrow.rowstate property asp.net gridview.rowstate

gridviewrow row = yourgridview.selectedrow; give selected row  

and check

 

if(row.rowstate == datacontrolrowstate.selected)     {       //selectd     }  

Comments

Popular posts from this blog

java - Run spring boot application error: Cannot instantiate interface org.springframework.context.ApplicationListener -

python - pip wont install .WHL files -

Excel VBA "Microsoft Windows Common Controls 6.0 (SP6)" Location Changes -