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

[Solved] Multiple parameter in columns.Bound ?

2 Answers 152 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.
Jón
Top achievements
Rank 1
Jón asked on 01 Sep 2010, 04:23 PM
I'm trying to create multiple parameter in colums.Bound my code is following, then I'm trying to pass those paramater to ActionLink

.Columns(columns => 
           {
               columns.Bound(c => new {id = c.store_id, title = c.store_title})
                   .Format(Html.ActionLink("{1}", "ViewScanMissing", new { id = "{0}" , type = "1" }).ToString()).Encoded(false).Title("Sales Events").Width(80);

I always get some error when trying to do it like this, is this possible for the telerik Grid ?


Regards

Jon S

2 Answers, 1 is accepted

Sort by
0
Kevin
Top achievements
Rank 1
answered on 21 Nov 2010, 08:57 PM
try using Templates either ClientSide or ServerSide.  They allow you to format a field any way you want.  Take a look at the samples.  They are helpful.
0
mike
Top achievements
Rank 1
answered on 23 Nov 2010, 05:34 PM
Using client Templates I was able to accomplish this task and also keep my ajax filtering, sorting, etc.

Example.
 columns =>
                    {
                        columns.Bound(o => o.MethodId).ClientTemplate(
                                    "<a href=\"../someurl/index/?id=<#= AnotherId #>\"> <#= MethodCaseId #> </a>"
                                    ); I beleive the columns.Bound statement before the clientTemplate statement is what sorting, etc. is done off of.
Tags
Grid
Asked by
Jón
Top achievements
Rank 1
Answers by
Kevin
Top achievements
Rank 1
mike
Top achievements
Rank 1
Share this question
or