c# - Checking if a row has been selected entirely -


my datagridview in rowheaderselect mode. clicking on rowheader selects whole row.

however, @ point, when use context menu shortcuts or shortcut keys keyboard, need check if whole row selected, or single cell, , perform actions accordingly. how check this?

you can check e.commandname property.

check foolowing patch of code>>

protected void gridview1_rowcommand(object sender, gridviewcommandeventargs e)     {         sxengine.classx user = (sxengine.classx)session["appobj"];                  if (e.commandname == "select")         {             user.browselect = true;                  }         else         {             user.browselect = false ;         }     } 

study link more info regarding different properties of gridview>>

http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.gridview.selectedindexchanging.aspx


Comments

Popular posts from this blog

Hatching array of circles in AutoCAD using c# -

ios - UITEXTFIELD InputView Uipicker not working in swift -

Python Pig Latin Translator -