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

[Solved] No properties are working?

1 Answer 15 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.
brianb
Top achievements
Rank 1
brianb asked on 30 Aug 2010, 12:43 AM
I just downloaded 2010.2.825 to see how the grid component works (I'm new to MVC and deciding which grid to use in a new project). But my code doesn't seem to be working for the properties I set. Setting the column's Width() seems to have no effect. I also set the grid height (see http://www.telerik.com/community/forums/aspnet-mvc/grid/grid-default-height.aspx) and this sets the height of the column headers - not the actual grid. Lastly, I have Selectable() set, but I can't select any rows. I click and click and nothing happens.

I seem to be failing on all fronts here. Can you check my code and see where I went wrong? Thanks.

Here is my code:

    <%= Html.Telerik().Grid(Model)
                 .TableHtmlAttributes(new { style = "height:300px" })
                .Name("OrdersGrid")
                .DataKeys(dataKeys => dataKeys.Add(o => o.SpaceRequestID))
                .Columns(columns =>
                {
                    columns.Bound(o => o.SpaceRequestID).Width("50");
                    columns.Bound(o => o.ContactEmail).Width("200");
                    columns.Bound(o => o.ContactPhone).Width("500");
                })
                .Scrollable(x=>x.Enabled(true))
                .Selectable()
                .Sortable()
    %>

1 Answer, 1 is accepted

Sort by
0
Atanas Korchev
Telerik team
answered on 30 Aug 2010, 07:27 AM
Hello brianb,

Your code looks ok. The problem may be due to incomplete upgrade. You can check if the Scripts and CSS files are properly upgraded.

If this does not help I would ask you to provide a sample project.

Regards,
Atanas Korchev
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
Grid
Asked by
brianb
Top achievements
Rank 1
Answers by
Atanas Korchev
Telerik team
Share this question
or