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

[Solved] Grid inside PanelBar throws 500 error

1 Answer 22 Views
PanelBar
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Karthikeyan
Top achievements
Rank 1
Karthikeyan asked on 07 Feb 2012, 07:47 AM
Hi,
I have a telrik Grid (Razor engine) inside the PanelBar, but it always throws 500 error, I verified the Controller and its working fine, I think its the View has something wrong. I have pasted the code below, please review it and give your suggestion. I'm also getting error with code 12031 sometimes.
 @{
   Html.Telerik().PanelBar()
  .Name("PanelBarName")
  .Items(parent =>
  {
    parent.Add()
   .Text("PanelBarItem1")
.Content(@<text>
     @(Html.Telerik().Grid<Service.Entity.ObjectType>()
     .Name("GridName1").HtmlAttributes(new { style = "width: 600px;" })
     .DataKeys(keys =>
     {
     keys.Add(p => p.Id);
     })
    .DataBinding(dataBinding =>
    {
      dataBinding.Ajax()
       .Select("ActionName""ControllerName");
    })
    .Columns(columns =>
    {
columns.Bound(c => c.Id).Hidden();
      columns.Bound(c => c.Item1).Width(50);
    })
   .Pageable(paging => paging.PageSize(int.Parse(System.Configuration.ConfigurationManager.AppSettings["PageSize"].ToString())))
  .Scrollable(scrll => scrll.Height(int.Parse(System.Configuration.ConfigurationManager.AppSettings["BigScrollSize"])))
 .Sortable()
  )
  </text>)
 .Expanded(false);
  })
  .Render();
} 

Thanks in Advance,
Karthik

1 Answer, 1 is accepted

Sort by
0
Karthikeyan
Top achievements
Rank 1
answered on 07 Feb 2012, 08:11 AM
I missed the GridAction tag for Binding method. It works fine after that.

Thanks,
Karthik
Tags
PanelBar
Asked by
Karthikeyan
Top achievements
Rank 1
Answers by
Karthikeyan
Top achievements
Rank 1
Share this question
or