Hi all!
I'm sorting a datagrid but only using one column. This column's
header has several linkbuttons.
When sortcommand is called I'm not able to see which of the
linkbuttons has been clicked? I've tried getting this data from
source, but haven't been able to find it.
How can I get the sending linkbutton's ID?
Thanks,
Niclas
Mark S. Milley, MCAD (BinarySwitch) - 19 Jan 2006 15:51 GMT
Try passing it through the commandname or commandargument properties of
the link button, then use
dim sourceid as string =directcast(commandsource,
linkbutton).commandname
Look here:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlr
fsystemwebuiwebcontrolslinkbuttonclasscommandnametopic.asp
tonicvodka - 19 Jan 2006 17:03 GMT
Great, thanks! Looks very nice.
Just curious though, is there a way to use the datagrid's sortcommand
together with multiple link buttons?
Because when datagrid generates the function then source is passed
along instead of sender?
Niclas