473,396 Members | 2,009 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

DataGrid Edit problem after sort

One of my users called yesterday and asked me to look into a problem on
a datagrid. Everytime she clicked on a row to edit, another row would
appear in it's place. After a little analysis it appeared that this
only happened after the datagrid was sorted. I placed the row in edit
mode. Almost everytime that I clicked the Cancel button on that row I
experienced a random shuffling of rows.

I am using ViewState and DataView Sort to hold the sort value . I used
Response.Write to display the value while debugging. The value seems to
be correct.

I did a quick search on Google. It seems that this is a common problem.
Some of these posts were a couple of years old. Has a solution for this
been discovered?

Mar 4 '06 #1
2 1177
(Almost) without doubt this is a bug in your code not .NET. You need to
review your code carefully.

--
Terry Burns
http://TrainingOn.net

"keys4worship" <st*****@gmail.com> wrote in message
news:11**********************@p10g2000cwp.googlegr oups.com...
One of my users called yesterday and asked me to look into a problem on
a datagrid. Everytime she clicked on a row to edit, another row would
appear in it's place. After a little analysis it appeared that this
only happened after the datagrid was sorted. I placed the row in edit
mode. Almost everytime that I clicked the Cancel button on that row I
experienced a random shuffling of rows.

I am using ViewState and DataView Sort to hold the sort value . I used
Response.Write to display the value while debugging. The value seems to
be correct.

I did a quick search on Google. It seems that this is a common problem.
Some of these posts were a couple of years old. Has a solution for this
been discovered?

Mar 4 '06 #2
Thanks for your reply. I discovered the problem. It was in the SQL
database table. I had a field PK that also had a separate index on it.
Once I removed the index from that field everything was fine.

Thanks

Mar 6 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Bruce Pullum | last post by:
I have a datagrid that I am using a DataView with. All works great for the sorting of the columns. However, after I sort the column, and then try and select a data row to edit, the row selected...
2
by: Chris Plowman | last post by:
Hi all, I was wondering if anyone can help me with a really annoying problem I have been having. I made a derived datagrid class that will select the row when a user clicks anywhere on a cell...
1
by: Maziar Aflatoun | last post by:
Hi everyone, Here is my problem. I have a datagrid that I binds to a table with the following fields. PID FirstName LastName In my datagrid I display FirstName and LastName along with a...
1
by: MrMike | last post by:
I have a sub named Bind("") which binds my a datagrid on my webform. In order to enter edit mode and edit records on this datagrid, I must make a call to Bind("") either before or after I place...
5
by: Kurt Schroeder | last post by:
I'm using VS.net. I have created a component with the basic set of database commands. This component returns a record set that is bound to a datagrid. I want to add a dynamic sort, but am not sure...
5
by: tshad | last post by:
Is there a way to carry data that I have already read from the datagrid from page to page? I am looking at my Datagrid that I page through and when the user says get the next page, I have to go...
1
by: Jean-Claude Bertrand | last post by:
Hi! Windows of the application IO have to built (my first one in vb.Net) is made from 2 part: a) A grid wich will be used only to display the main information of the current record (so the...
4
by: skOOb33 | last post by:
I successfully autosized the columns and rows on my Datagrid, and am now facing another issue. Having the sorting ability by clicking the column headers is key, but when I do that, it resizes all...
9
by: rn5a | last post by:
A Form has a DataGrid which displays records from a SQL Server 2005 DB table. Users can modify the records using this DataGrid for which I am using EditCommandColumn in the DataGrid. This is the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.