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

[Solved] Grid sort appears involved in untimely firing of textchanged event

1 Answer 64 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Justin Heath
Top achievements
Rank 2
Justin Heath asked on 01 Sep 2009, 05:02 PM
We have a grid in which we have some columns with textbox or checkbox controls.

In the radGrid.ItemCreated Event we add handlers for the "TextChanged" and "CheckChanged" events of these controls pointing to a custom written ItemChanged sub routine which processes the data changes.

A problem we've recently discovered is that if the client sorts multiple columns without waiting for the sort to complete these events appear to fire causing unintended data changes.  The user hasn't actually changed the text or the checkbox, yet the event fires.

Can anyone advise why this might be happening?  I'm happy to provide more specific information but I'm not really sure where to begin.  It seems as though perhaps the controls on the page don't get disposed between sorts but their data is updated which perhaps is what causes the event to fire but really I have no idea.

Thanks!

1 Answer, 1 is accepted

Sort by
0
Justin Heath
Top achievements
Rank 2
answered on 01 Sep 2009, 11:10 PM
Found this to happen due to programatic removal the viewstate from one of the textbox controls in the grid.  Just never saw this in the code until I started doing comparisons to old versions of the page in sourcesafe.
Tags
Grid
Asked by
Justin Heath
Top achievements
Rank 2
Answers by
Justin Heath
Top achievements
Rank 2
Share this question
or