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

Enable Postback on RowSelected or ActiveRowChanged

2 Answers 126 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Tarun
Top achievements
Rank 1
Tarun asked on 12 Dec 2011, 01:16 PM
Hi Telerik,

Is there a way to enable(force) postback on ActiveRowChanged.

My scenario is:

I have a RadGrid with KeyboardNavigation allowed, RowSelection enabled.
<
ClientSettings EnablePostbackOnRowClick="true" AllowKeyboardNavigation="true" >

<Selecting AllowRowSelect="True" />

When i click on a row using the mouse, the post back happens and i perform the necessary operations that i wish to do.

Now, when i use the keyboard up/down keys to change the row selection, the grid does change the SelectedRow (the display shows the selection happening). But the control does not post back in this case.

My aim is to enable postback while navigation using arrow keys (so that i can perform the data binding and other logic from code-behind).

Also, if i write the java script for OnRowSelected client event (_doPostBack passing the gridId), the post back happens only once. I need to click a row with mouse again before i could navigate using the arrow keys.

Kindly suggest.

Thanks
Tarun Singla

2 Answers, 1 is accepted

Sort by
0
Andrey
Telerik team
answered on 15 Dec 2011, 01:50 PM
Hi Tarun,

You could use the approach which was presented by my colleague Marin in this forum thread. He has described you very well what is the problem and how it could be resolved.

Additionally, please keep in mind that it is highly recommended that you keep related questions in one support thread or a forum post, so that we can easily keep track of your support history and provide better answers in a shorter time.

Greetings,
Andrey
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
0
Tarun
Top achievements
Rank 1
answered on 15 Dec 2011, 02:00 PM
Thanks Andrey.

But the link that you mentioned does not work.

And, if i am not wrong, Marin responded to my query related to "Selection using Space bar".
Of-course, Marin provided extra information related to the PostBack. May be, he read both the queries and responded in one place for both the doubts.

This query is particularly about the post-back and was posted 3 days before.
Anyways, sorry for the trouble.

Regards
Tarun Singla
Tags
Grid
Asked by
Tarun
Top achievements
Rank 1
Answers by
Andrey
Telerik team
Tarun
Top achievements
Rank 1
Share this question
or