First Impression

I know that this is CTP, But there is some issues that I think that you have fix before one can use the grid.

-- Show stoppers --
Navigation
- Page up, page down is not working
- Tab from cell to cell

Edit a row
- when a user edits a row the user needs to be able to tab between cells

-- Next version please add --
Edit cell editors, date picker, combo

-- Themes --
The grouping band is very large and bulky. The users is not interested in seeing the band but the data. And in general the SL themes are all created so the controls seems very large, like the combobox, default size 26 is VERY large, can you not create a more flat and condendsed theme for Silverlight.

Anyway it's looking better and better. And I hope that there is a more complete grid in january 2009 becuse we are starting a major SL project and need to trust that telerik is the right vendor for the SL controls

Pavel Pavlov

Thank you for taking the time to evaluate the CTP of our RadGridView for Silverlight.
You are definitely right about the Tab navigation. Polishing the keyboard navigation is one of our priorities for the beta version (coming in the middle of December).

We already have combobox and datepicker editors for the cells. We are going to add those to some examples.

Themes for the Silverlight - the CTP is a preview only and a lot of work is to be done there. We are aware that compelling UI is a must for Silverlight development. Please stay tuned as our UX guys are investing a lots of efforts for the upcoming beta.

Thank you again for the constructive and positive feedback. It is of great value to us.
I have updated your Telerik points.

Kind regards,
Pavel Pavlov
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.

nick

I also have a major project coming up and need to know if you guys are up for it with your grid.

Can the grid be bound to a JSON object?
Can it handle Add, Delete, Update, ( if so how is this implemented?)
Can it handle keyboard navigation?
Does it support uppercase and lowercase data (including first character)

What makes your grid better then the standard Microsoft Data Grid and how would you compare it to Component Source data grid
and Infragistics data grid?

Milan

JSON support is more of a platform issue and luckily Silverlight has a build-in support for JSON. There are several classes that allow you to serialize/deserialize JSON data and also manipulate it. You can even use LINQ to dynamically access primitive JSON types. We are planning to publish an example demonstrating how one can use JSON data with RadGridView.

Yes our grid can handle data editing. We already have an example on our web page that demonstrates how you can add, delete, and update records in RadGridView. If you have any specific question about the editing capabilities of our grid control feel free to contact us.

We do support keyboard navigation in the currently published preview build, but we'll get that in place for our beta, scheduled next week.

I didn't quite get the question about uppercase and lowercase data. May I ask you to elaborate on your idea? Could you provide us with an example where such funtionality would be important?

I am not sure if I can provide the most unbiased comparison with one of the competitor products, I urge you to download the products and see for yourself. Right now, what I believe separates us from the crowd is our superior performance and the shared API that lets our customers target WPF and Silverlight with a single code base.

Regards,
Milan
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.

Richard H

Also, I was wondering if you will also be adding any new filtering support (in addition to your current grouping support) in any future releases? I have seen other Silverlight Data Grid controls that provide very powerful column level filtering (similar to what you would see in Excel) that would be very useful to have included in the grid. While the grouping feature could be used to help filter through data, it is really not a filtering mechanism. While I realize this is a CTP, this piece of functionality seems to be missing and I was wondering when we could expect something like this?

nick

Thanks for getting back to me so quickly and for the defensive answers.
My Q. about the first character was a concern because we once used a Notibi ajax grid that we have had many problems with.
One of them was the that the first character would automatically be converted to lower case. I noticed on your demos that you didn't have this problem, so that is great, I hope your grid is hard to break and rock solid unlike the Notibi ajax grid and some other grids out there.

I guess your grid will have the auto column generete feature, therefore not requireing a grid defination in the xaml, this allowing a grid to be generreted on the fly (on the front end). This is what I need to do. The data will be loaded up in the behind code in JSON format (containing rows with records and coulm labels), How do I do this with your grid? Can you please provide me with an example. This is a fondermental requirement for our application.

Thanks Nick.

Milan

Our grid does will not alter the input data in any way, unless of course you configure it for such a scenario, and for that reason you shouldn't have problems like the one where the first character was converted to lower case.

Yes our grid has automatic column generation. It will automatically detect the fields (or columns) of your data and display the data properly.

I have prepared a sample application that demonstrates how you can use JSON data with our grid. The trick is to have a class that represents your data and deserialize the JSON data an a list of objects of that class.
For exmaple, if the JSON data represents people you would have a Person class. Upon deserialization the data will be transformed into a list of Person objects that our grid can bind to.
Althouth this might seem too complicated is can actually be achieved with just a few of lines of code using the Silverlight support for JSON.

I hope the application that I am sending you will be helpful.
If you have any questions feel free to contact us.

Sincerely yours,
Milan
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.

nick

Thanks! The example was great, and your grid looks fantastic, We are very impressed with the speed of your replies and we are looking into your pricing structure and other SL packages.

I have an issue with the ItemsSource of the grid, the normal way of loading this up will not work for me
ie:

Define a class ( with setter and getter handlers)

Create an instance of the class

Set its data from JSON (or other source)

Add that class to a LIST,

Set the LIST as the ItemsSource of the grid

This method works fine if you know what the column names will be at run time, but I need the column names to be dynamic, I will not know
anything about them until run time therefore I cannot define a class for that maps to the column names.

How do you do this?

I have tried JSON object's toList method, ( this returns it in the wrong format, (KeyValuePair<string,string>[][]) "key" and "value" become column headers with the key being the JSON key and Value being the JSON value). The JSON value part contains another set of key and values, the column definition data, eg: c0:"Jack",c1:"black". Here's an example of the JSON format I am loading,

Milan

First I would like to apologize for the delay. The example that I have prepared for you took a lot of time and effort to develop, but I believe that it was worth the wait.

At the moment, there is no straightforward way of supplying ad-hoc JSON data to RadGridView. For that reason I have created a special class that takes JSON data and automatically transforms it into a data source tha our grid can use. As a result you do not have to create any mapping classes, like the Person class, that I have suggested in my previous response.

All you need to do is to use DynamicData.CreateDataSourceFromJson and pass your JSON string. The DynamicData class will create a data source, based on the input JSON data, that you can bind to using our grid. The whole process is somewhat complex but it is executed behind the scenes by the DynamicData class.

There are two important methods of the Dynamicdata class that I would like to describe in more details. The first is the CreateDataSourceFromJson that I have already mentioned. This method is dependent on the JSON data structure, meaning that it currently works only with the JSON format that you have provided in your last post.

If the format changes CreateDataSourceFromJson should be tweaked. CreateDataSourceFromJson reads the input JSON and transforms the data into a format that can be consumed by the CreateDataSource(IList<IDictionary> data) method.

CreateDataSource does the real job of creating the data source and it is not dependent on the JSON format. The method receives a list of Dictionary objects that represent all data items. Those dictionaries define what properties each data item should have, how many data item should we create, etc.

Every dictionary in the list represents a single data item. The keys of every dictionary define the number and the names of the actual properties. For each key, of course, there is a coresponding value. The values in the dictionary are the actual values of the properties for their respective data item.

Here is a more visual example:
Let's say we have the following JSON

{"r0":{"c0":"Jack","c1":"Jack"},

"r1":{"c0":"Ginio","c1":"Paraskevov"},

"column_names":{"c0":"First Name","c1":"Last Name"}}

CreateDataSourceFromJson will transform (or deserialize) that JSON into a list of 2 dictionaries. The first dictionary corresponds to

After those dictionaries are passed to CreateDataSource, the method will use them to create the actual data source.

I have attached a sample project that demonstrates how the DynamicData class works with 2 sets of different JSON data, and I hope that the class will be very helpful in your scenario.
Once again thank you for your patience.

Sincerely yours,
Milan
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.

nick

Thanks very much for the code you have prepared, and sorry about the late replay, I have tried to open the project in visual studio but it gives me some type of link error, any ideas? I have been through the code and and tried creating a new project with no luck.

Error HRESULT E_FAIL has been returned from a call to a COM component.
at MS.Internal.XcpImports.CheckHResult(UInt32 hr)
at MS.Internal.XcpImports.FrameworkElement_MeasureOverride(FrameworkElement element, Size availableSize)
at System.Windows.FrameworkElement.MeasureOverride(Size availableSize)
at Telerik.Windows.Controls.GridView.GridViewDataControl.MeasureOverride(Size availableSize)
at System.Windows.FrameworkElement.MeasureOverride(IntPtr nativeTarget, Single inWidth, Single inHeight, Single& outWidth, Single& outHeight)

When I try and run it, I get the following error when clicking the Load JSON DATA button:

You have been a great help to me and our company but I need to chicken test the integration of your grid and cannot go any further until i work this out.

A show starter for us is also Keyboard Navigation.

I checked out your blog and noticed the new update for the RadGrid but it didn't say it had keyboard navigation fixes.

We need the TAB key to work and the ARROW KEYS (up, down, left and right) to work. We need these so the user can navigate between cells without use of the mouse.

Does something need to be done with the model or have I missed something simple? Could you please provide me a piece of code that allows these keys to work so I can show my compnay a good Chinken test so a final desceion can be made?

Thanks
Nick

nick

I have solved the problem. I was using Fire Fox 3 and then if I click the load JSON data button an error would occur, but IE 7 worked perfectly. I didn't think about opening it in there since I believed Silverlight was cross browser but in the end i did think about that. So thanks very much again for the demo.

I worked out what needed to be done in FF to make it work:
just change the behind code in the events for both buttons from:
getAttribute("value");
to
(string)getProperty("value");

The grid does not show up in design view still, I get the first error mentioned above, it does not effect the run time, is there a way to make Visual studio show the grid at design time?

We still need "tab" key support and the arrow keys to work,
We need tab to allow the user to tab to the next cell, once the last cell is reached we need it to give focus to the first cell on the left on the next row. SHIFT tab would also be good.

Pavel Pavlov

I have checked the design time issue. It is a bug present in the beta release. This one has already been fixed so it will be ok in our next release.

Tab and arrow navigation for our RadGridView for Silverlight is a challenge we are currently working on.
Once ready it will work exactly the way you described.
Again we plan to add these features for the next release (Q1 2009 planned for the second half of February).

If meanwhile, any of these are critical to you, please let us know so we can think of some workarounds.

Best wishes,
Pavel Pavlov
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.

nick

The tab and keyboard working is a critical feature for our application, if you had some workaround code it would be great until the new release is ready, if you would like we can beta test it if you give us an early release,

another Q1: Will your grid support dbl click event?
another Q2: How would you detect new/ modified records and send them to the server for storage using JSON format above?

Hristo Deshev

Re Q1: We do have an internal solution that captures double clicks on some elements and use that to implement some of the features, say double clicking the border between header cells to perform auto-fit. Since Silverlight is a bit crippled in that area, we are reluctant to expose a non-standard event such as double click. You can help us decide -- what is your favorite scenario that you absolutely need double click for?

Re Q2:
You need to use the row EditEnded event and collect the modified data objects. Once you need to commit those to the DB, you just need to loop over the stored objects. Here's some sample code:

public Page()

{

InitializeComponent();

this.RadGridView1.ItemsSource = GetMessages();

this.RadGridView1.ValidationMode = ValidationMode.Row;

this.RadGridView1.AddHandler(GridViewRow.EditEndedEvent, new EventHandler<RecordRoutedEventArgs>(this.OnEditEnded));

}

private List<Message> editedMessages = new List<Message>();

privatevoid OnEditEnded(object sender, RecordRoutedEventArgs e)

{

var editedMessage = (Message) ((DataRecord) e.Record).Data;

this.editedMessages.Add(editedMessage);

}

I am attaching a sample project.

@Hannes

You can hide the column headers by setting the ShowColumnHeaders to false.

You can set a column's header cell style or template by assigning the respective column's HeaderCellStyle property.

I assume you are talking about the visible padding around the RadGridView inner objects: rows, header, etc. Unfortunately, removing that is a matter of editing several controls' templates, and the only way to do that is to edit the default theme yourself (which is not possible at the moment). I think you must wait until the next release that will have theming and theme editing support.

Thanks!

Greetings,
Hristo Deshev
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.

nick

1. I need to capture the dbl click event when the user dbl clicks a row in the grid.
(upon this event I'm going to pop up a new window, possibly a RadWindow with
other Rad controls inside.

Questions:

1. Can you please give me an example of putting your radGrid in a radWindow?
I checkout: http://www.telerik.com/help/silverlight/radwindow-using-user-control-with-radwindow.html but could not get it to go,
if you have a coded up example of that page it would be exactly what i need, as we are thinking of replacing all our dhtml windows with your RadWindow.

2. Has anyone had any luck on the tab key?

3. Can you give us an early release of your next version if we beta test it for you?

nick

Thanks allot for the RadWindow demo, Great!
Your RadWindow is very impressive and it looks like you are ahead of the crowd on this one!

Q. 1: How do I free the memory?

I noticed that after a RadWindow is closed task Manager tells me the memory is not freed
So that after a few RadWindow's have been opened the memory builds up.
What can I do, to free the memory and stop the memory leak?

Q. 2: (Error on window close in Fire Fox - not critical)

Even though this is not critical i'll inform you anyway:
After Opening windows in Fire Fox (FF) and closing them an error occurs,
and all the windows disaprear). We would like to use FF in the future and if your Rad Componets would work in FF it would be very
nice. Do you plan to support FF?

nick

What I want to do is set the CreateDataSourceFromJson not directly on the grid Data source but on another object ( what object should this be)? . I think it should be a list object of type ( DynamicType) but I can't use DynamicType becuase it does not exists at design time.

I need to do this So then I can modify the the grid's data. Like delete. So if i remove an object from the data source ( the model) it should update the view ( the grid), same thing goes for modify and add operations.

Thanks
Nick

Stefan Dobrev

Currently, the example creates a generic list (List<>) for the data source. I have modified the sample to return an ObservableCollection that will allow for collection change notifications. I have also added a button that demonstrates how to remove the first item from the collection.

Hope this will help.

Greetings,

Stefan

the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.

D. Omar

I downloaded the trial a couple of days ago and it does not look like the Tab Navigation made it. Is this correct? I mean, I can tab to navigate to the next cell but I still have to click on it to edit the cell contents. Is tehre a way to have tab navigate to the next cell and go into edit mode after landing on that new cell?

Progress, Telerik, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries. See Trademarks or appropriate markings.