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

WPF != Windows.Forms

3 Answers 60 Views
GridView
This is a migrated thread and some comments may be shown as answers.
ManniAT
Top achievements
Rank 2
ManniAT asked on 17 Mar 2009, 02:43 AM
Hi,

I was looking through your documentation searching for a way to have RadGrid Checkboxes with bool columns (a thing the MS DataGrid does out of the box).

And by this is stumbled over the topic Insert/Update/Delete...Data Editors.
What I saw there was really interesting.
There is a sample for a ComboBox column.
No XAML at all - but interesting code behind.
ComboBoxEditorSettings comboBoxEditorSettings = new ComboBoxEditorSettings();  
       comboBoxEditorSettings.ItemsSource = GetCountries();  
       ((GridViewDataColumn) this.radGridViewEditors.Columns[2]).EditorSettings = comboBoxEditorSettings
.....Columns[2].EditorSettings....
This looks extreme like ASP.NET where I have to access some unnamed HTML things and change values.
I just think about the co worker who decides to change the column order for some reason :=

And what I see here (beside the unsafe and "design == extremely code bound" thing) looks like a windows form application where I had to do it this way.

The "XAML Way" would be a column whit some kind of a template (style, datatemplate, whatever) where the databinding is defined to some source.
This Is what I do, if I build something in "native XAML" (without third party controls).

For RAD controls I would expect - something like a "RadGridComboColumn".
Yes - I found something by accident - GridViewComboboxEditor.
I'm not sure if this is what I think about because the documentation is a bit short.
>>Represents ComboBox editor for GridViewCell

I'm (after the fun with editing) not willing to find this out by trial and error (I'm tired) - but maybe tomorrow I can find an example about it.

Regards

Manfred

3 Answers, 1 is accepted

Sort by
0
Accepted
Vlad
Telerik team
answered on 19 Mar 2009, 11:54 AM
Hello Manfred,

Generally  RadGridView will generate CheckBox automatically for boolean properties also - you can check this demo for more info: http://demos.telerik.com/wpf/?GridView/Aggregates (last column).

As to the combo setting you are definitely right - we will do our best to provide full declarative editors example for the upcoming service pack.

Thank you very much once again for your precious feedback and don't hesitate to contact us if you have other questions.

Regards,
Vlad
the Telerik team


Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
ManniAT
Top achievements
Rank 2
answered on 19 Mar 2009, 02:05 PM
Hi Vlad,

without any customization I get a "True / False" text column for a boolean.
BUT - in edit mode it is a checkbox! (Grid knows that it is a bool).

So it seems that this is by design - and it could be the better approach in some situations (better readability).

In the sample you pointed to it is exact the same as I see I with my grid. (I see the text False instead of a checkbox).

Regards

Manfred
0
Vlad
Telerik team
answered on 19 Mar 2009, 05:10 PM
Hello Manfred,

I see your point - we can use disabled CheckBox when the cell is not in edit mode.

Regards,
Vlad
the Telerik team


Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
GridView
Asked by
ManniAT
Top achievements
Rank 2
Answers by
Vlad
Telerik team
ManniAT
Top achievements
Rank 2
Share this question
or