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

readonly column issue

Hello, I need some help with the readonly property, because i'm using this in execution time like this:

 Me.grdActividades.Model.ColStyles("Cantidad").ReadOnly = True 

but in some moment i want that this column be editable again
but i used all these option listed bellow and nothing works the column continues readonly

Me.grdActividades.Model.ColStyles("Cantidad").ResetReadOnly()
 Me.grdActividades.Model.IgnoreReadOnly = True
 Me.grdActividades.Model.ColStyles("Cantidad").ReadOnly = False

Can you help in this issue?
Thanks Greetings

Ing. Alejandro Ortega 

1 Reply

AK Adhikesevan Kothandaraman Syncfusion Team September 28, 2015 07:40 AM UTC

Hi Ale,

Thanks for contacting Syncfusion Support.

To edit the contents of the read only cell, set the Binder.InternalColumns.ReadOnly property value as true. Please refer to the below code example,

Code Example:

//Set the Readonly property for perticular column 

this.gridDataBoundGrid1.Binder.InternalColumns["City"].ReadOnly = true;
this.gridDataBoundGrid1.Binder.InternalColumns["City"].ReadOnly = false;


//To edit the content of the ReadOnly cell on its Activation
this.gridDataBoundGrid1.CurrentCellActivating += gridDataBoundGrid1_CurrentCellActivating;

void Model_QueryCellInfo(object sender, Syncfusion.Windows.Forms.Grid.GridQueryCellInfoEventArgs e)

{

    if(e.ColIndex ==3)

    {

        e.Style.ReadOnly = false;

        e.Handled = true;

    }
}

Sample:
http://www.syncfusion.com/downloads/support/forum/120572/ze/CS-804326302

Regards,
Adhi


Loader.
Up arrow icon