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

[Solved] few problems with GridView

2 Answers 178 Views
GridView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Greg
Top achievements
Rank 1
Greg asked on 02 Apr 2009, 11:27 AM

Hi,

I'm using Silverlight 3.0 and your last Q1 and observe few strange problems:

1) Trying to sort from code:

RadGridView1.SortDescriptions.Add(new SortDescription("CustomerID", ListSortDirection.Descending));

Gives me strange build error:

Error 6 Argument '1': cannot convert from 'System.ComponentModel.SortDescription [c:\Program Files\Reference Assemblies\Microsoft\Framework\Silverlight\v3.0\System.Windows.dll]' to 'System.ComponentModel.SortDescription []' C:\work\TelerikRadGrid\TestPages\Telerik1\BindingSorting.xaml.cs 77 47 TelerikRadGrid

2) Trying to expand the whole hierarchical grid via code:

        private void ExpandAll_Click(object sender, RoutedEventArgs e)
        {
            this.IterateRows(this.RadGridView1.Records, true);

        }

 

        int rowCounter = 0;
        private void IterateRows(IList<Record> records, bool expand)
        {
            foreach (Record record in records)
            {

                if (record is ExpandableDataRecord)
                {
                    ExpandableDataRecord expandableRecord = (ExpandableDataRecord)record;
                    expandableRecord.IsExpanded = expand ? true : false;

                    rowCounter++;
                    //TODO foreach all childs
                    for (int childIndex=0; childIndex < expandableRecord.ChildRecordManagers.Count; childIndex ++)
                    {
                        IterateRows(expandableRecord.ChildRecordManagers[childIndex].Records, expand);
                    }                  
                }
            }
        }

My grid has 3 levels and 3rd is still collapsed. Interesting is that these code works in Telerik WPF grid.

Any ideas how I can fix my problems?

Also I have few questions:

Is there way how programatically I can scroll to particular cell position .. lets say to cell in column 5 and row 6 ..

Do you support column virtualization(using spy I see that all cells for first records are created, even out of visible area), if yes how to switch on it?

Thanks in advance!
Greg

2 Answers, 1 is accepted

Sort by
0
Greg
Top achievements
Rank 1
answered on 07 Apr 2009, 07:03 AM
Hey,

What's up?
Do somebody know something about questions which I'm asking in my initial post?

Greg
0
Accepted
Pavel Pavlov
Telerik team
answered on 07 Apr 2009, 11:56 AM
Hi Greg,
Please excuse me for the late answer. Right now we are preparing a servicing release and have a bit tight schedule.

Now straight on the problems :

1.  (Sorting error message) Such error message typically shows up if you are trying to use a version of our Silverlight controls suite  build against  Silverlight version that does not match your local Silverlight plugin version. The official release of our Silverlight controls was build against Silverlight version 2.0. You may  find the proper build in the downloads section of your account. There you may find an internal build against the Silverlight 3.0.

2.(Issue with 3-level hierarchy and expanded state)  Thanks for reporting this one. It seems you have hit  a bug .  We have logged it and are currently investigating it. I 'll take care to have this issue fixed for the next official release. Meanwhile  I 'll try to find a workaround  for you . Thanks again for the feedback and the detailed explanation! . I have updated your Telerik points.
It would be of great help if you can send me a sample project reproducing the issue. If I can find a workarround of the problem I can then modify the project and have it sent back to you .

3. Programmatical scrolling  to desired position - please have a look at the RadGridView.ItemsControl.BringDataItemIntoView and RadGridView.ItemsControl.BrindRecordIntoView methods.  I think these can do the job for you.

4) Column Virtualization -  Unfortunately we do not support column virtualization  in the current official version. The good news is that we are already working on this feature.  Plans are that it should be included in our very next official release ( Q2 2009) .

Regards,
Pavel Pavlov
the Telerik team

Check out Telerik Trainer , the state of the art learning tool for Telerik products.
Tags
GridView
Asked by
Greg
Top achievements
Rank 1
Answers by
Greg
Top achievements
Rank 1
Pavel Pavlov
Telerik team
Share this question
or