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

Bind multicolumn grid to an ArrayList

3 Answers 88 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Robert
Top achievements
Rank 1
Robert asked on 25 Sep 2008, 05:17 AM
Hi,

I need to bind a grid with more than one column to an ArrayList. The problem is,
that an ArrayList can store only "single" objects. Do I have to create a ArrayList for
every colum in the grid or is there some other collection which is more suitable for this scenario?

Best regards,
Robert 

3 Answers, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 25 Sep 2008, 07:25 AM
Hello Robert,

The grid will create the columns based on this object properties (if there are any).
Please check this example for more info:
http://demos.telerik.com/aspnet/Prometheus/Grid/Examples/Programming/Binding/DefaultCS.aspx

Best wishes,
Vlad
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Robert
Top achievements
Rank 1
answered on 25 Sep 2008, 07:58 AM
Hi Vlad,

thanks for your reply. That is exactly what I was looking for. Is it also possible to
make some of the generated columns invisible?

Best regards,
Robert
0
Vlad
Telerik team
answered on 25 Sep 2008, 08:03 AM
Hello Robert,

You can handle ColumnCreated to set Visible property:

if(e.Column.IsBoundToFieldName("MyProperty"))
{
    e.Column.Visible = false;
}

All the best,
Vlad
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Grid
Asked by
Robert
Top achievements
Rank 1
Answers by
Vlad
Telerik team
Robert
Top achievements
Rank 1
Share this question
or