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

Grid Item Command detect wrong row after client side hits

3 Answers 111 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Morteza
Top achievements
Rank 1
Morteza asked on 31 Jul 2012, 12:39 PM
Hi,
I have a radgrid with 3 gridButtonColumn , I added Client side ItemCommand for one command column but when  i click on another commands inside of server side item command it detect FIRST row as data grid Item .
e.g
in server side itemcommand i have e.Item as GridDataItem and i get item.getDataKeyValue but it constantly returns first row key values. when I remove client side item command every thing will be OK.

is this for client side bug or there is some trick?

Regards,
Morteza

3 Answers, 1 is accepted

Sort by
0
Tsvetoslav
Telerik team
answered on 03 Aug 2012, 05:01 AM
Hi Marts,

This is just expected as by attaching the OnCommand client-side event, the grid prepares itself for client-side binding and the logic for initiating the commands firing is different. If you are not using client-side binding, the OnCommand event is redundant.

All the best,
Tsvetoslav
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
Sébastien
Top achievements
Rank 1
answered on 16 Aug 2012, 01:57 PM
Hi,

I've exactly the same problem. Before using Telerik.Web.UI Q2 2012 it worked but now, no. My previous version was Q3 2009. I have to use both client and server side for my buttons.. Is there a way to fix this problem?

Regards
0
Marin
Telerik team
answered on 21 Aug 2012, 09:02 AM
Hello,

 RadGrid does not support mixing server and client-side item command events because this interferes with the binding logic of the control. If you need to perform any modifications on the client before posting back to the server I suggest using other client-side event than OnCommand.

Greetings,
Marin
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
Grid
Asked by
Morteza
Top achievements
Rank 1
Answers by
Tsvetoslav
Telerik team
Sébastien
Top achievements
Rank 1
Marin
Telerik team
Share this question
or