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

Request : How to access the Grid Command item using client-side API.

2 Answers 128 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Grendizer
Top achievements
Rank 1
Grendizer asked on 18 Sep 2008, 03:40 PM
Hello guys,

very simple one, I would like the grid to enable / disable an item in the command bar item based on row selected or not.

I have seen some example already in the forum with postback, but I would like to access the item with client-side script.

I'm aware of activating the ClientEvent OnRowSelected, but I wonder how to access item of the command bar using client api.

Thanks in advance for your answer.

2 Answers, 1 is accepted

Sort by
0
Grendizer
Top achievements
Rank 1
answered on 18 Sep 2008, 03:57 PM
Just to clarify my needs .. that's probably more simple for you guys to provide me support ...

I want to add an Edit Button as a command item, and just make it disabled  when no row is selected, and toogle it to enabled when a row is selected.

I thought about changing the css class to change the look of the Link button but also to disable the action associated to the user click.

That's as simple as that ... but any help will be welcome :)

Thanks
0
Vlad
Telerik team
answered on 22 Sep 2008, 01:12 PM
Hello Grendizer,

I have attached small example to illustrate you how to achieve this.

All the best,
Vlad
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Grid
Asked by
Grendizer
Top achievements
Rank 1
Answers by
Grendizer
Top achievements
Rank 1
Vlad
Telerik team
Share this question
or