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

radfileexplorer OnClientFileOpen check which grid column was clicked

1 Answer 36 Views
FileExplorer
This is a migrated thread and some comments may be shown as answers.
mkerchenski
Top achievements
Rank 1
mkerchenski asked on 18 May 2012, 09:37 PM
Hi Telerik,
I customized the grid with one custom column.
in my OnClientFileOpen I need to do different things based on which column was clicked. Is there a way for me to determine which column were clicked?
What I'm truing to do this. if you clicked on name open image preview. if you click on custom column then select that image.

1 Answer, 1 is accepted

Sort by
0
Accepted
Dobromir
Telerik team
answered on 21 May 2012, 11:36 AM
Hi Mike,

In order to get the clicked cell in the grid you need to handle its ClientRowClick event and access the target attribute of the domEvent. You can use the following sample code to achieve this:
function explorerLoad(explorer){
    explorer.get_grid().add_rowClick(function(sender, args){
        var clickedCell = args.get_domEvent().target;
        alert(clickedCell.innerHTML);
    });
}

The explorerLoad is the handler of the RadFileExplorer's ClientLoad event.

I hope this helps.

Kind regards,
Dobromir
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
FileExplorer
Asked by
mkerchenski
Top achievements
Rank 1
Answers by
Dobromir
Telerik team
Share this question
or