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

[Solved] Configuring grid columns in controller

0 Answers 11 Views
Grid
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Lee
Top achievements
Rank 1
Lee asked on 19 Jun 2011, 07:24 PM
I'm using the latest open source version of the grid control (2011.1.315) and using the example posted in the demos:

var columns = new[] 
{
   
new GridColumnSettings
   
{
       
Member = "ProductName",
       
Width = "130px"
   
},
   
new GridColumnSettings
   
{
       
Member = "UnitPrice",
       
Width = "130px",
       
Format = "{0:c}",
   
},
   
new GridCommandColumnSettings
   
{
       
Commands =
       
{
           
new GridEditActionCommand(),
           
new GridDeleteActionCommand()
       
},
       
Width = "200px",
       
Title = "Commands"
   
}
};

I receive an error that the commands property is readonly. If this example does not work with the latest open source version, can you give me another approach that will work?

Thanks.

Tags
Grid
Asked by
Lee
Top achievements
Rank 1
Share this question
or