This question is locked. New answers and comments are not allowed.
I have 2 grids on a tabstrip...one calls the edittemplate for the viewmodel of its grid...the other doesn't
As far as i can see the code is identical for both.
The editemplate is named the same as the viewmodel and sits in the EditorTemplates folder (ive even tried placing it tin the shared folder as well)
The grid is passed (and displays) the viewmodel in each case...I'm just at a loss to know what sort of things may be broken??
The edittemplate in each case is named ResultViewModel and MemberViewModelSimple (as per the respective grids)
I just cant see what difference there is for it not to be called in case2??
What sort of things shouldi be looking at?? the controllers pass the data almost identically...
heres the view code:
This one works
and this one doesnt:
As far as i can see the code is identical for both.
The editemplate is named the same as the viewmodel and sits in the EditorTemplates folder (ive even tried placing it tin the shared folder as well)
The grid is passed (and displays) the viewmodel in each case...I'm just at a loss to know what sort of things may be broken??
The edittemplate in each case is named ResultViewModel and MemberViewModelSimple (as per the respective grids)
I just cant see what difference there is for it not to be called in case2??
What sort of things shouldi be looking at?? the controllers pass the data almost identically...
heres the view code:
This one works
@(Html.Telerik().Grid<WAC_MVC.ViewModels.ResultViewModel>() .Name("ResultGrid") .DataKeys(datakey => datakey.Add(r => r.ResultID)) .ToolBar(commands => commands.Insert()) .HtmlAttributes(new { style = "border: 0;" }) .Columns(columns => { columns.Bound(o => o.FullName).Width(180); columns.Bound(o => o.GroupID).Width(40); columns.Bound(o => o.RaceName); columns.Bound(o => o.kmRateString); columns.Bound(o => o.ActualTimeString).Format("{0:hh\\:mm\\:ss}").Width(90); columns.Bound(o => o.strHandicap).Width(90).Format("{0:mm\\:ss}"); columns.Bound(o => o.HandicapTime).Format("{0:hh\\:mm\\:ss}").Width(90); columns.Command(command => command.Edit()); }) .DataBinding(dataBinding => dataBinding.Ajax() .Select("_ResultsForEditing", "handicapper") .Insert("Insert", "Handicapper") .Update("_SaveAjax", "Handicapper")) .Pageable(paging => paging.PageSize(40)) .Scrollable(scrollable => scrollable.Height("300px")) .Filterable(filter =>filter.Enabled(true)) .Sortable(config => config .OrderBy(order => order .Add(((string)ViewData["view"]) == "sortedByDate" ? "ActualTimeString" : "FullName") ) ) .Groupable(groupable => groupable.Enabled(true)) .Editable(editing => editing.Mode(GridEditMode.PopUp)) )and this one doesnt:
@(Html.Telerik().Grid<WAC_MVC.ViewModels.MemberViewModelSimple>() .Name("Members") .DataKeys(key => key.Add(m => m.mMemberID)) .ToolBar(commands => commands.Insert()) .HtmlAttributes(new { style = "border: 0;" }) .Columns(col => { col.Bound(m => m.mFName).Width(60); col.Bound(m => m.mSName).Width(60); col.Bound(m => m.mMale).Width(80); col.Bound(m => m.MembershipMembership1).Width(80); }) .DataBinding(dataBinding => dataBinding.Ajax() .Select("Members", "HCMember") .Insert("_InsertMember", "HCMember")) .Pageable(paging => paging.PageSize(20)) .Scrollable(scrolling => scrolling.Height(580)) .Editable(editing=> editing.Mode(GridEditMode.PopUp)) .Sortable() .Filterable() )