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

[Solved] Columns Bound To Objects

0 Answers 87 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.
lmf232s
Top achievements
Rank 1
lmf232s asked on 24 Sep 2010, 02:05 PM
Im finding it very difficult to work with columns that are bound to objects. My columns are bound to objects because of the need for a drop down when editing a record. Because of this im having difficulties figuring out how to implement grouping and filtering on these columns.

I have this thread that outlines my issues when attempting to group by a column that is bound to an object:
http://www.telerik.com/community/forums/aspnet-mvc/grid/grouping-on-objects-property.aspx

But now im finding that im unable to filter on these columns as well. I have set the .Filterable() property of the grid and the filter option does display on the column but when you attempt to filter I notice that I have no values to filter by as well as the type of filter to apply. I assume this is because the filter does not know which property of the object to filter by.

It would be nice if there was something along the lines of this to indicate which property to group and filter by:
public class State{
public int StateId { getset; }
    public string StateAbbr { getset; }
}

Html.Telerik().Columns(columns =>
{
        columns.Bound(o => o.State).Groupable(o => o.State.StateId)
        columns.Bound(o => o.State).Filterable(o => o.State.StateAbbr)
}

Any ideas on if there is anything in the future that will address this particular problem or a workaround that I can implement given the current code base?
Tags
Grid
Asked by
lmf232s
Top achievements
Rank 1
Share this question
or