Hi,
I have an xamDatagrid blinded to some binding list. I have added a checkbox column to the grid in FieldLayoutInitialized event like this .
Dim obj As New UnboundField() obj.DataType = GetType([Boolean]) obj.Name = "Select" e.FieldLayout.Fields.Insert(0, obj)
I can make xamdatagrid editable or readonly like this
XamDataGrid1.FieldSettings.AllowEdit=true/false
With this feature I can make whole grid editable or readolnly .But I had a requirement to make paricular columns editable or readonly leaving checkbox column always editable. How this can be achieved.
Advanced thanks for your valuable advise.
There is no reason why this should not work for the Unbound Field. One thing that comes up in my mind is that if you are doing this in the xaml and have defined your Field Layouts there (and have left the AutoGenerateFields to true) these settings are not being picked up. If that is not the case, please attach a small sample so that we can look into that.
Why doesn't this work with UnboundFields? I set the FieldSettings for my UnboundField to AllowEdit=False, but the field still shows up as Editable. Using V2009.2.
Thanks a lot, It's working.
As I said in my previous post, you can set this for a field by its Settings object, like this:
xamDataGrid1.FieldLayouts[0].Fields[0].Settings.AllowEdit = false;
The FieldSettings object set properties globally, but they are overriden by the Settings inside each field.
Hope this helps.
Hi vince ,
Thanks for your advise
As per your suggestion I had tried to use FieldSettings property of xamdatagrid. But it is the property that holds the default settings for all fields in this control.
"FieldSettings" is not having any property like "Fields" so that I can apply settings to particular field.
I am expecting feature like this but it is not there.
XamDataGrid1.FieldSettings.Fields("column1").AllowEdit=true
I also tried in other way
XamDataGrid1.DefaultFieldLayout.Fields(0)
Like this i can get particular field but field is not having property called AllowEdit. I hope you got my point