Is there a way to have the grid trigger a server-side event on double-click, but not on single click?
I have dialogs with grids, and when the user double-clicks I return the id of the selected row to the calling page and add that item to a list.
Thanks,
Ross
I have dialogs with grids, and when the user double-clicks I return the id of the selected row to the calling page and add that item to a list.
Thanks,
Ross
9 Answers, 1 is accepted
0

Shinu
Top achievements
Rank 2
answered on 21 Jul 2008, 04:15 AM
Hi,
Go through the following KB article which explains how to perform PostBack on RowDoubleClick and see whether it helps.
Performing postback from grid client events
Thanks
Shinu.
Go through the following KB article which explains how to perform PostBack on RowDoubleClick and see whether it helps.
Performing postback from grid client events
Thanks
Shinu.
0

rwozniak
Top achievements
Rank 1
answered on 24 Jul 2008, 01:17 PM
The problem with this solution is that the handling method must go in the code-behind of an .aspx page. I want to actually handle it from within an .ascx. It would be really inconvenient to have to fire off an event from the .aspx's code-behind just so that the ascx's code-behind can respond to it.
It seems like the RadGrid really needs a server-side double-click event handler, and a property to EnablePostBackOnRowDoubleClick...or something like that.
Ross
It seems like the RadGrid really needs a server-side double-click event handler, and a property to EnablePostBackOnRowDoubleClick...or something like that.
Ross
0
Hello rwozniak,
There are two examples at the bottom of the KB article which demonstrate how to proceed postback request from user control. I hope that you will find them useful.
Best regards,
Stephen
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
There are two examples at the bottom of the KB article which demonstrate how to proceed postback request from user control. I hope that you will find them useful.
Best regards,
Stephen
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0

NS
Top achievements
Rank 1
answered on 12 Aug 2008, 03:01 PM
Hi, I have a question about the methods used in the KB article.
I use the doubleclick and postback events on a radgrid inside a radwindow. I can trigger the postback event and get the radgriditem. After I've done some code execution I want to close the radwindow.
Typicall I fill the text of a literal (eg InjectScriptLabel) with a javascript call that closes the radwindow.
This does not work however if I fill the text of the literal in the postback event of the doubleclick. (this does work on a regular button outside of the grid)
Any tips on how to close the radwindow using javascript in the protected override void RaisePostBackEvent method ? (must I register something in the RadAjaxManager ? (tried that though)
Thanks,
Niclas
I use the doubleclick and postback events on a radgrid inside a radwindow. I can trigger the postback event and get the radgriditem. After I've done some code execution I want to close the radwindow.
Typicall I fill the text of a literal (eg InjectScriptLabel) with a javascript call that closes the radwindow.
This does not work however if I fill the text of the literal in the postback event of the doubleclick. (this does work on a regular button outside of the grid)
Any tips on how to close the radwindow using javascript in the protected override void RaisePostBackEvent method ? (must I register something in the RadAjaxManager ? (tried that though)
Thanks,
Niclas
0
Hi NS,
You can use RadAjaxManager ResponseScripts to register desired script.
Kind regards,
Vlad
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
You can use RadAjaxManager ResponseScripts to register desired script.
Kind regards,
Vlad
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0

NS
Top achievements
Rank 1
answered on 14 Aug 2008, 01:01 PM
Thanks a lot Vlad, it works like a charm !
0

Sean
Top achievements
Rank 1
answered on 16 Aug 2008, 06:18 AM
This is working for me correctly in IE7, but using either Opera 9.51 or FireFox 3 the RadGrid doesn't seem to allow me to select rows from the grid without explicitly placing a Button or LinkButton on the page.
(i.e. In IE I can click a row and have highlight clientside, or I can doubleclick a row to have it postback, but the RadGrid won't respond to click events from either Opera or FireFox.)
Are these two browsers supported, or is there something which I need to do differently in their case?
Currently my ClientSettings node is:
(i.e. In IE I can click a row and have highlight clientside, or I can doubleclick a row to have it postback, but the RadGrid won't respond to click events from either Opera or FireFox.)
Are these two browsers supported, or is there something which I need to do differently in their case?
Currently my ClientSettings node is:
<
ClientSettings>
<ClientEvents OnRowDblClick="RowDoubleClick" />
<Selecting AllowRowSelect="true" />
</ClientSettings>
0

Sean
Top achievements
Rank 1
answered on 17 Aug 2008, 04:27 AM
Nevermind, I've managed to solve it myself. It seems that the Telerik.WebControls.RadGrid (which I was previously using) won't accept click events from the other browsers, but the Telerik.Web.UI.RadGrid will. (At least in my very limited experience.) The JavaScript methods provided above don't work with the Web.UI.RadGrid, but a simple
__doPostBack(
"<%= GridName.UniqueID %>", "");
works fine instead.
What are the intended differences between the Telerik.WebControls controls and the Telerik.Web.UI controls?
0
Hi Sean,
We're glad you managed to solve the issue on your end.
As to the differences between the two controls, those are outlined in the documentation here.
All the best,
Konstantin Petkov
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
We're glad you managed to solve the issue on your end.
As to the differences between the two controls, those are outlined in the documentation here.
All the best,
Konstantin Petkov
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.