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

Yet another cell selection challenge

3 Answers 29 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Mike
Top achievements
Rank 1
Mike asked on 22 Oct 2008, 03:50 PM
I'm new to Telerik but not 3rd party controls.  While I've read a lot of information on the rad grid and cell selection, I have yet to find a way to actually act on the contents of the cell when a cell is clicked on the client.  I've looked at wiring a cell click event according to http://www.telerik.com/help/aspnet-ajax/grdselectingcells.html but I need to be able to act on the actual cell data via a javascript function.  

 

3 Answers, 1 is accepted

Sort by
0
Daniel
Telerik team
answered on 22 Oct 2008, 04:42 PM
Hello Mike,

I hope the following JavaScript code will be helpful.
function RowSelected(sender, args) 
    var cell = args.get_domEvent().target; 
    alert("Cell contents: " + cell.innerHTML); 

Regards,
Daniel
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Mike
Top achievements
Rank 1
answered on 22 Oct 2008, 05:27 PM
That did the trick, thanks.  Did I just miss where this was described in the documentation or is there somewhere else I should be looking?
0
Daniel
Telerik team
answered on 23 Oct 2008, 07:30 AM
Hello Mike,

The following link gives a hint about this task:
OnRowSelected

You just get the regular DOM event target. More information is available in the link below:
HTML DOM Event Object

Regards,
Daniel
the Telerik team

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