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

Create Columns Server-Side

2 Answers 53 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.
Mark
Top achievements
Rank 1
Mark asked on 04 Dec 2011, 11:45 AM
Hi
I have a situation where i dont know what columns (and in which order) are shown in a grid, until the grid is loaded.

How would i create columns servers-side ?
So instead of below, how would i do this server-side?
@(Html.Telerik().Grid(Model)
        .Name("Grid")
        .Columns(columns =>
        {
            columns.Bound(o => o.OrderID).Width(100);
            columns.Bound(o => o.ContactName).Width(200);
            columns.Bound(o => o.ShipAddress);
            columns.Bound(o => o.OrderDate).Format("{0:MM/dd/yyyy}").Width(120);
        })
 
)
Many Thanks
Mark

2 Answers, 1 is accepted

Sort by
0
Accepted
Georgi Tunev
Telerik team
answered on 05 Dec 2011, 01:08 PM
Hello Mark,

I believe that the following demo will be of help:
http://demos.telerik.com/aspnet-mvc/grid/columnsettings

 

Regards,
Georgi Tunev
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the Telerik Extensions for ASP.MET MVC, subscribe to their blog feed now
0
Mark
Top achievements
Rank 1
answered on 05 Dec 2011, 01:11 PM
HI
Thanks. Spotted this about 5 mins after my post !!

Mark
Tags
Grid
Asked by
Mark
Top achievements
Rank 1
Answers by
Georgi Tunev
Telerik team
Mark
Top achievements
Rank 1
Share this question
or