We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

GridboundColumn.ReadOnly

Hi,

I have a GridDataBoundGrid which is bound to 2 GridBoundcolumns.

I want both these columns as Editable ones. I have changed the GridboundColumn IsReadOnly= false. and also there are no IgnoreReadOnly = true.

YET, the column does not allow me to edit or enter values at all.. :( :(

In the BaseStyleMap, I have changed all the REadonly = false.

Pls help.

12 Replies

HA haneefm Syncfusion Team July 23, 2007 09:48 PM UTC

Hi Ngp,

If you want to do it through property setting, then you can set the GridBoundColumn.StyleInfo.ReadOnly = false for the columns you want to be editable. If you are not explicitly adding GridBoundColumns, then you set this property in the grid.Binder.InternalColumns collection. If you are adding GridBoundColumns, then you set this property using the grid.GridBoundColumns collection.

///Or

You can use the grid.Model.QueryCellInfo event. there if e.ColIndex points to your comment column and e.RowIndex > 0, then set e.Style.ReadOnly = false.

Best regards,
Haneef


NG ngp July 24, 2007 12:20 AM UTC

Haneef,

I am explicitly adding GridBoundColumns in the collection, and set the property StyleInfo.ReadOnly = true;

Still, I am not able to edit the values.

>Hi Ngp,

If you want to do it through property setting, then you can set the GridBoundColumn.StyleInfo.ReadOnly = false for the columns you want to be editable. If you are not explicitly adding GridBoundColumns, then you set this property in the grid.Binder.InternalColumns collection. If you are adding GridBoundColumns, then you set this property using the grid.GridBoundColumns collection.

///Or

You can use the grid.Model.QueryCellInfo event. there if e.ColIndex points to your comment column and e.RowIndex > 0, then set e.Style.ReadOnly = false.

Best regards,
Haneef


GN grace nethala July 24, 2007 03:07 PM UTC

Hi Heneef,

I am explicitly adding GridBoundColumns in the collection, and set the property StyleInfo.ReadOnly = true;Still, I am not able to edit the values.

Inspite of that, I tried Bind Internal columns, Isreadonly = false.

I got:
'System.Windows.Forms.BaseCollection.IsReadOnly' cannot be assigned to -- it is read only

Wondering what the prob is.. pls throw some light.

Thanks
ng[


NG ngp July 24, 2007 03:25 PM UTC

can u pls throw some light on this.

>Hi Heneef,

I am explicitly adding GridBoundColumns in the collection, and set the property StyleInfo.ReadOnly = true;Still, I am not able to edit the values.

Inspite of that, I tried Bind Internal columns, Isreadonly = false.

I got:
'System.Windows.Forms.BaseCollection.IsReadOnly' cannot be assigned to -- it is read only

Wondering what the prob is.. pls throw some light.

Thanks
ng[


NG ngp July 24, 2007 08:07 PM UTC



>can u pls throw some light on this.

>Hi Heneef,

I am explicitly adding GridBoundColumns in the collection, and set the property StyleInfo.ReadOnly = true;Still, I am not able to edit the values.

Inspite of that, I tried Bind Internal columns, Isreadonly = false.

I got:
'System.Windows.Forms.BaseCollection.IsReadOnly' cannot be assigned to -- it is read only

Wondering what the prob is.. pls throw some light.

Thanks
ng[


HA haneefm Syncfusion Team July 24, 2007 10:10 PM UTC

Hi Ngp,

Thank you for your update.

I have tested the attached sample to reproduce this issue, but could not get this. Maybe I am not following the steps that you are doing. Is it possible for you to upload us a minimal sample to reproduce the issue here? This will help us to analyse the issue further.

Sample : GDBGReadOnlyCells.zip

Best regards,
Haneef


NG ngp July 24, 2007 10:29 PM UTC

Hi Haneef,

Thanks for responding.

In your sample, there is a column which i think is disabled.

My problem is.. I have a similar grid bound to two GridboundColumns all the ReadOnly properties are false.

I try edit -- one column does not let me edit at all.. One column does.

I check the project, No where else is the property reverted back to readonly = true; or enableedit = false.

My head is sore debugging!

Pls throw some light

`



>Hi Ngp,

Thank you for your update.

I have tested the attached sample to reproduce this issue, but could not get this. Maybe I am not following the steps that you are doing. Is it possible for you to upload us a minimal sample to reproduce the issue here? This will help us to analyse the issue further.

Sample : GDBGReadOnlyCells.zip

Best regards,
Haneef


NG ngp July 24, 2007 10:36 PM UTC

Also want to mention:

The third column: Salary -- is exactly what i am trying to say. but the background is different.

But I see the property ReadOnly = False.

can u pls tell me how u did that.

Thanks.
Grace

>Hi Haneef,

Thanks for responding.

In your sample, there is a column which i think is disabled.

My problem is.. I have a similar grid bound to two GridboundColumns all the ReadOnly properties are false.

I try edit -- one column does not let me edit at all.. One column does.

I check the project, No where else is the property reverted back to readonly = true; or enableedit = false.

My head is sore debugging!

Pls throw some light

`



>Hi Ngp,

Thank you for your update.

I have tested the attached sample to reproduce this issue, but could not get this. Maybe I am not following the steps that you are doing. Is it possible for you to upload us a minimal sample to reproduce the issue here? This will help us to analyse the issue further.

Sample : GDBGReadOnlyCells.zip

Best regards,
Haneef


NG ngp July 25, 2007 03:56 PM UTC

You have already reproduced the issue. .
I want to know how u got the thrid column: Salary : Non editable.-.. I am hoping.. this is exactly the the settings in my code as well.

And, you have no GridBaseStyle.AddRange() in your code even after you have declared grid base style collection. How come?

Thanks
ngp

>Also want to mention:

The third column: Salary -- is exactly what i am trying to say. but the background is different.

But I see the property ReadOnly = False.

can u pls tell me how u did that.

Thanks.
Grace

>Hi Haneef,

Thanks for responding.

In your sample, there is a column which i think is disabled.

My problem is.. I have a similar grid bound to two GridboundColumns all the ReadOnly properties are false.

I try edit -- one column does not let me edit at all.. One column does.

I check the project, No where else is the property reverted back to readonly = true; or enableedit = false.

My head is sore debugging!

Pls throw some light

`



>Hi Ngp,

Thank you for your update.

I have tested the attached sample to reproduce this issue, but could not get this. Maybe I am not following the steps that you are doing. Is it possible for you to upload us a minimal sample to reproduce the issue here? This will help us to analyse the issue further.

Sample : GDBGReadOnlyCells.zip

Best regards,
Haneef


HA haneefm Syncfusion Team July 25, 2007 05:15 PM UTC

Hi Ngp,

I am not sure of what be might be causing this strange behavior without a working sample. Is it possible for you to upload us a minimal sample to reproduce the issue here? This will help us to analyse the issue further.

Exactly what version of Windows XP are you using?

Are you only installing Essential Grid or are you installing Essential Studio? Are you installing binaries only, or the source code version?

What version of the .NET framework and VS are you using?

Best Regards,
Haneef


NG ngp July 25, 2007 05:21 PM UTC

You have already reproduced the issue.

In the code you sent, the third column "Salary" settings are ReadOnly = false.
Yet, I cannot edit any values into it.

I want to know how this gridboundcolumn is different from the rest? This is exactly the behavior i am facing.

Once I know what makes this column differnt, I think I will get very near to solution.

I am using VS-05, and .NEt 3.0

Thanks
Grace


NG ngp July 25, 2007 08:06 PM UTC

Haneef,

I caught the issue:
The ArrayList object which was binding to the Grid, had only the Get but no Set functions to the propertys!!

Thanks for all the effort.


Loader.
Live Chat Icon For mobile
Up arrow icon