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>>
Comments
Post a Comment