I am hand-crafting my GridView completely in the code-behind and cannot bind the Grid - so i need to add the rows manually and not set the ItemsSource Property. Can you please guide me the best way of manually adding a row to the grid. I have tried using the BeginInsert() method - however i get a NullException error if i do not set the ItemsSource prior to invoking BeginInsert().
Would it be possible to provide me some sample code to achieve the desired results
Thanks
10 Answers, 1 is accepted
Currently RadGridView does not support unbound mode but this capability is on our to-do list and we will try to introduce it with Q3 2009 SP1. You could workaround the problem by binding the grid to an empty ObservableCollection and adding items to that collection instead.
In regard to the BeginInsert exception we have logged this issue and it will be fixed as soon as possible and the fix will also be included in our upcoming service pack.
Regards,
Milan
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Just out of curiousty, do you have a tentative date for Q3 SP1
Our first service pack will be first week of December however we will upload our latest internal build every Friday.
All the best,
Vlad
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Here is a sample project that demonstrate the approach that I have suggested.
Hope this helps.
All the best,
Milan
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tks.
Hello Phillip Hamlyn,
Unbound mode is has been supported for many months now. May I ask you to take a look at this online demo which demonstrates how this mode works.
Greetings,
Milan
the Telerik team
I was hoping to use RadGridView to provide an "Excel" like speadsheed. This speadsheet would have a sheet worth of empty cells. The cell would then populate with non-empty contents upon a user event.
Thanks In Advance,
Matt
Have you checked the demo from the previous reply? You can check also these demos for more info about how to create dynamic data for the grid:
http://demos.telerik.com/silverlight/#GridView/UIVirtualization
http://demos.telerik.com/silverlight/#GridView/DataSources
Vlad
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
Thank you for your response. I have indeed looked at the demos. The UIVirtualization demo is somewhat helpful. I have tried to recreate this project from the example code and I am have some issues with Example.xaml
a. Can't find: xmlns:behavior="clr-namespace:Telerik.Windows.Examples.GridView"
b. behavior:MyColumnsBindingBehavior.Columns="{Binding Columns, Source={StaticResource model}}"
As far as (a.), do I need the .dll to make this work? I'd like to reproduce this functionality so that I have a good starting point.
I understand the basic premise of these unbound data examples. My main goal is to initially present a RadDataGrid with 10 rows and 10 columns that contain no text. In Telerik WinForms, you would accomplish this by doing something like:
http://www.telerik.com/help/winforms/gridview-populating-with-data-unbound-mode.html
this.radGridView1.RowCount = 10; this.radGridView1.Columns.Add(new GridViewTextBoxColumn("A")); this.radGridView1.Columns.Add(new GridViewTextBoxColumn("B")); this.radGridView1.MasterTemplate.AllowAddNewRow = false;
In essence, I'd like to create an empty 10x10 grid with the Silverlight controls. Is this only possible by adding/binding to a class that essentially contains a 10x10 array of String.Empty? Is there a better way to do this?
Thanks,
Matt