I am trying to pass two parameters (Red and Blue outlined in attachment) to a radWindow via a Cell double click, which I will then populate a grid. I am able to pass the datakey (Red outlined) value on row double click thanks to this demo, but have had no luck in capturing the Column name to use in the querystring.
Is there a Cell Double click event that I can use to make this happen or can this be done with Row Double click that captures the cell index I click on?
The second attachment shows the window opened based on the demo link, but how can I get the querystring URL to show:
where Area is another parameter in my datasource that is looking for the column name.
Thank you in advance!
5 Answers, 1 is accepted
One approach to obtaining the column name is to use the cellIndex property of the clicked cell as demonstrated below:
Telerik by Progress
Thank you for responding! The solution above is almost there, but it looks like the domEvent() is not capturing the cell index from the code above.
If I were to manually enter an index number as below then I am able to pass the column name over as a parameter and populate the grid.
Do I need to enable any other client settings on the source grid for the domEvent() to capture the cell index on mouse click?
Thank you and Regards,
Sorry it appears I spoke too soon. This solution does work, so once again thank you Peter.
However, I noticed it only works if the user clicks in the cell and not on the text in the cell. Is there anyway for the cell index to be captured regardless if the user clicks on the cells value or the cell itself?
I've attached two screenshots showing the scenario.
In case this helps someone with a similar need.
I've worked out a solution that uses OnCellSelected to grab the column name (as opposed to capturing it during the double click event)
Then in the RowDblClick event I am capturing the row cell value by the specified unique column name and storing that value before passing both into the new window's querystring:
Thank you for sharing your solution with the community.
The cellIndex could be undefined when a child HTML element of the td cell is the target. In such case, one option would be to find the closest td element (using the .closest() jQuery method):
Telerik by Progress