This is a migrated thread and some comments may be shown as answers.

[Solved] Select row in "ItemCommand"

4 Answers 609 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Markus
Top achievements
Rank 1
Markus asked on 30 Jan 2008, 02:08 PM
I use a "GridButtonColumn" in my grid. With button I execute my one functionality in "ItemCommand" event. Now I want to show the row selected if user clicks on a button. How can I do this?

4 Answers, 1 is accepted

Sort by
0
Ves
Telerik team
answered on 31 Jan 2008, 11:24 AM
Hello Markus,

You can use a GridButtonColumn with CommandName set to "Select" as shown in this online example. Hope this helps.

Greetings,
Ves
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Markus
Top achievements
Rank 1
answered on 31 Jan 2008, 12:51 PM
Thanks for information, but that is not exactly what I need. I have a command button column with a user defined "CommandName". I do not want to add other columns (select) or checkboxes to selct the item, I want to select item with the coulmn I have. Hope this is possible.
0
Ves
Telerik team
answered on 31 Jan 2008, 02:58 PM
Hello Markus,

You can achieve this by setting e.Item.Selected = true; in ItemCommand event handler in case e.CommandName is your custom command name.

Best wishes,
Ves
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Markus
Top achievements
Rank 1
answered on 31 Jan 2008, 03:47 PM
Thanks thats exactly what I need!
Tags
Grid
Asked by
Markus
Top achievements
Rank 1
Answers by
Ves
Telerik team
Markus
Top achievements
Rank 1
Share this question
or