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

Changed behaviour: now doesn't select the old row (Q2 2010 SP2)

7 Answers 88 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Francesco Pezzato
Top achievements
Rank 1
Francesco Pezzato asked on 15 Oct 2010, 06:07 PM

Hello,

I've developed an application using winForm Q1 2010 (on VS2008, .Net3.5);
 Today I've installed the version Q2 2010 SP2, but I've found some differences.

#Question1:
In version 2010 Q1  the gridview was very smart:after re-assigning the datasource, the grid remembers the "old" selected
row and automatically re-select the row.
In the new version(2010 Q2 SP2) this behaviour seems different, the grid selects the first row.

Do you have changed something about that? How can I re-activate the behaviuor?

#Question2:
Following this page (http://goo.gl/PM8T) I've "upgraded"  my app (1 solution, 5 projects, about 20 grids),
but now some grids (not all of them!!) have lost the settings (e.g. the showRowHeaderColumn property)and the skin: did you have ever seen something like that?
I really can't find any differences in the grids (all of them have the same properties).

I've readed this forum, founding nothing about: do you have any advice for me?

 

Thanks in advance
Francesco

7 Answers, 1 is accepted

Sort by
0
Emanuel Varga
Top achievements
Rank 1
answered on 15 Oct 2010, 06:51 PM
Hello Francesco,

1. Sorry, there is no way of using the old behavior, i had the same problem when i first switched to Q2 but in time you will learn to appreciate the performance boost the new and improved grid has to offer.

2. This usually does not happen, but the problem with this is with the visual studio designer's serialization mechanism, and sadly you have no other choice than to fix all of them by hand (or if you have an older version just copy the designer files from there, it should work). That's why I usually prefer to have make as much customizations i can without the help of the designer, safer and more maintainable.

Hope this helps, if you have any other questions or comments, please let me know,

Best Regards,
Emanuel Varga
0
Francesco Pezzato
Top achievements
Rank 1
answered on 18 Oct 2010, 10:25 AM

Hello Emanuel,

thank you for your answer!

Ffor the #Question1, I have to revert the pojects to the "2010 Q1" version of the library, because now I have no time to check and modify the whole application...so sad by now:(

Thanks,

Francesco

 

0
Emanuel Varga
Top achievements
Rank 1
answered on 18 Oct 2010, 12:38 PM
Hello,

I honestly hope you change your mind and update to the latest version, i believe you will see very soon some performance increases and a lot of issues fixed.

And if you need any help, I am more than happy to help you during the update process.

Best Regards,
Emanuel Varga
0
Richard Slade
Top achievements
Rank 2
answered on 18 Oct 2010, 12:41 PM
Hi, 

I know this is not the answer you were looking for, but I just wanted to second what Emanuel was saying. It was only slightly painful to update to the latest version (changing over properties and so on) but the effort is well worth it. 

Richard
0
Jack
Telerik team
answered on 21 Oct 2010, 12:56 PM
Hi Francesco,

You can use the following code in order to preserve the current row when rebinding:
int scrollbarValue = this.radGridView1.TableElement.VScrollBar.Value;
int index = this.radGridView1.Rows.IndexOf(this.radGridView1.CurrentRow);
this.radGridView1.DataSource = table;
if (index >= 0 && index < this.radGridView1.Rows.Count)
{
    this.radGridView1.Rows[index].IsCurrent = true;
    if (scrollbarValue < this.radGridView1.TableElement.VScrollBar.Maximum - this.radGridView1.TableElement.VScrollBar.LargeChange + 1)
    {
        this.radGridView1.TableElement.VScrollBar.Value = scrollbarValue;
    }
}

I hope this helps.

Sincerely yours,
Jack
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Francesco Pezzato
Top achievements
Rank 1
answered on 22 Oct 2010, 08:31 AM

Hi everyone,

thank you for your help!

In these days I'm very busy for a partial release of my sw, but as soon as I can I'll try Jack's code!

I'll report you the results,
thanks once again,

Francesco

0
Jack
Telerik team
answered on 27 Oct 2010, 03:52 PM
Hi Francesco,

Thank you for writing me back. If there is something else that I can assist with, please do not hesitate to write back.

Regards, Jack
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
GridView
Asked by
Francesco Pezzato
Top achievements
Rank 1
Answers by
Emanuel Varga
Top achievements
Rank 1
Francesco Pezzato
Top achievements
Rank 1
Richard Slade
Top achievements
Rank 2
Jack
Telerik team
Share this question
or