Column Templates

Apr 3, 2012 at 2:59 PM

I have an issue that probably isn't from this helper tool, but hopefully you can help.  By the way, thanks for this little tool and any help you can provide me.  I have a column template as below.  The column doesn't show up when I set the grid for Ajax binding.  The column does show up when I did plain old server binding.  I'd appreciate any help on what is going on

columns.Template(
@<text>
@Html.ActionLink("Edit", "Edit", new { id =
item.LinkId }, new { @class = "t-link" }) |
@Html.ActionLink("Details", "Details", new { id =
item.LinkId }, new { @class = "t-link" }) |
@Html.ActionLink("Delete", "Delete", new { id =
item.LinkId }, new { @class = "t-link" })
</text>
).Title("Edit")
 

...

.DataBinding(dataBinding => dataBinding.Ajax().Select("_AjaxBinding", "Link" ))

[GridAction(EnableCustomBinding=true

)]

 

 

 

 

public ActionResult _AjaxBinding(GridCommand command) {

var q = context.Links.OrderBy(o => o.LinkId);  

var gridHelper = new GridCustomBindingHelper<Link, LinkModel>(command, q, null, "ListId", System.ComponentModel.ListSortDirection

 return

View(gridModel);

}

.Ascending);

var  

gridModel = gridHelper.BuildGridModel();

Apr 3, 2012 at 4:33 PM

Nevermind.  I got it.  I needed to add a Client Template.  Problem solved.

Coordinator
Apr 16, 2012 at 2:25 PM

hmm, I'm glad you've solved it, let me know if you need anything else.