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

Radgrid update (and cancel) issue

1 Answer 89 Views
Grid
This is a migrated thread and some comments may be shown as answers.
David
Top achievements
Rank 1
David asked on 08 Feb 2013, 11:59 AM
Hi,

I have a radgrid control (Point 1), inside a radajaxpanel (Point 2), inside a radajaxloading panel. The control is dynamically added to a raddock.

(I will be referring to the Points in the line above)

I found the issue when I added a radtoolbar and used this to handle editting the data inside the radgrid.

The grid is set to EditMode inPlace and AutoGenerateColumns. The data is coming from an ObjectDataSource. (I need to be able to edit columns, so have some columns set to readonly and then go through the rows and add the editIndexes).

When I first added the toolbar at Point 2, things seemed to sort of work. (By that, I mean that edit, update, cancel all worked, but other controls on the page were being affected). The main page area was being handled by ajax. I needed to just modify the module alone... so moved the toolbar to Point 1. This is where the problem began.

At Point 1 the grid will go into edit mode as expected. However, pressing update or cancel, I then get an error...

Error Message:
Invalid postback or callback argument. Event validation is enabled using


If I set the EnableEventValidation then the page works, however, this is a security risk and local policy disallows it.

I have been working with a more experienced telerik programmer to try and resolve the issue, with no success.

We have set AutoGenerateEditColumn to true and tried using the grids own edit, update, cancel. We get the same error.

Removing the toolbar altogether makes no difference.

This suggests that the radgrid has a problem when it is nested as described above.

Items to note:
Page load is hit on the usercontrol hosting the radgrid.
the RadGrid ColumnCreated event is also hit.
The toolbar onclick event was NOT hit.


Any ideas, even things to try would be very much appreciated.

Thanks.
David.

1 Answer, 1 is accepted

Sort by
0
David
Top achievements
Rank 1
answered on 08 Feb 2013, 04:18 PM
Erm...

Fire over.

I am in a team environment where multiple programmers are writing code on the project.

It turns out that when I click cancel or update on my control, a control elsewhere is bombing out. Exactly why it should do is a mystery as I think I should only be firing events in my own usercontrol.

I found that when I ripped out all the relevant code to create a test page, the test worked fine. We then tested the live page with just my widget and it worked. We then added other widgets, it worked with all others except one and it was repeatable.

All controls in the page are hosted the same way, in their own rad docks. It seems there is some intercommunication happening.

Thanks to all that looked and considered a response.
Tags
Grid
Asked by
David
Top achievements
Rank 1
Answers by
David
Top achievements
Rank 1
Share this question
or