This is a migrated thread and some comments may be shown as answers.
get radGrid column - readOnly property
5 Answers 67 Views
This is a migrated thread and some comments may be shown as answers.
Ethan
Top achievements
Rank 1
Ethan asked on 28 Nov 2010, 03:22 PM
can someone plz tell me how can i get the readOnly property of a column in the client Side?

5 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 1
answered on 29 Nov 2010, 07:44 AM
Hello,


I am not sure whether a client-side method is available for setting ReadOnly for column. But I believe, you can invoke an ajaxRequest() to server and there you can set the ReadOnly property by accessing column.



-Shinu.
0
Daniel
Telerik team
answered on 29 Nov 2010, 07:45 AM
Hello Ethan,

You could use the get_readOnly() property for that purpose. The following code-snippet demonstrates how to use it:
var masterTable = $find('<%= RadGrid1.ClientID %>').get_masterTableView();
var isReadOnly = masterTable.get_columns()[1].get_readOnly();

Regards,
Daniel
the Telerik team
Browse the vast support resources we have to jumpstart your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
0
Ethan
Top achievements
Rank 1
answered on 29 Nov 2010, 06:51 PM
it always return false... even if the readOnly property of a column set to true.
0
Daniel
Telerik team
answered on 01 Dec 2010, 04:36 PM
Hello Ethan,

This property is serialized in three cases:
- when filtering is enabled
- when the header context menu is enabled
- when the client-side OnCommand handler is attached

Kind regards,
Daniel
the Telerik team
Browse the vast support resources we have to jumpstart your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
0
Ethan
Top achievements
Rank 1
answered on 01 Dec 2010, 05:06 PM
it worked..
though i wish there was some other solution.. 
thanks.
Tags
Grid
Asked by
Ethan
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 1
Daniel
Telerik team
Ethan
Top achievements
Rank 1
Share this question
or