Hello.
I have been googling this all day to no avail. I need to add a third parameter to the following:
columns.Bound(p => p.Line).ClientTemplate(
"<
a
href='" +
Url.Action("Details", "OrderLine") +
"?OrdId=#= OrdId #&Line=#=Line#'" +
">#=Line#</
a
>"
);
I have tried different combinations and none have seemed to pass the third parameter to the details screen (OrdType is the parameter). I can pass two of the parameters using the above, but I am not sure how to pass the third. I appreciate any help.
Thank you.
6 Answers, 1 is accepted
Hello Jeff,
You should be able to construct the URL the same way as in the code snippet:
columns.Bound(p => p.ContactName).ClientTemplate(
"<a href='"
+
Url.Action(
"Details"
,
"OrderLine"
) +
"?OrdId=#= OrdId #&Line=#=Line#&OrdType=#=OrdType#'"
+
">#=Line#</a>"
);
Regards,
Rosen
Telerik


Dear Telerik's developers,
This is my definition of column in my view:
columns.Bound(c => c.Profile.Name).Width(200).Filterable(ftb => ftb.Multi(true).Search(true)).ClientTemplate(
"<a href=' " + Url.Action("AssessmentProcessCompetence", "Assessment") + "/#: AssessmentId #'" + ">#: Profile.Name #</a>").HeaderHtmlAttributes(new { style = "overflow: visible; white-space: normal" }).Title("Profile Names");
Currently, I am passing one parameter (AssessmentId) to the controller (AssessmentController ). I would like to pass a new parameter in the definition of column in order to allow to edit or not based on this parameter. This parameter could be a boolean (true or false).
This is my procedure in AssessmentController :
public ActionResult AssessmentProcessCompetence(Guid id)
{ ... }
I would like to retrieve the new parameter as :
public ActionResult AssessmentProcessCompetence(Guid id, bool AllowEdit)
{ ... }
Could you please help me in this issue?
Best Regards.
Raúl.

Dear Telerik's developers,
This is my definition of one of my columns in my view :
columns.Bound(c => c.Profile.Name).Width(200).Filterable(ftb => ftb.Multi(true).Search(true)).ClientTemplate(
"<a href=' " + Url.Action("AssessmentProcessCompetence", "Assessment") + "/#: AssessmentId #'" + ">#: Profile.Name #</a>").HeaderHtmlAttributes(new { style = "overflow: visible; white-space: normal" }).Title("Profile Names");
As you can see ... I am passing one parameter to the controller (AssessmentId). I would like to pass another parameter to the procedure in order to allow to edit or not based on this parameter.
Currently, this is my definition in the controller :
public ActionResult AssessmentProcessCompetence(Guid id)
{..}
and I would like to have something like this:
public ActionResult AssessmentProcessCompetence(Guid id, bool AllowEdit)
{...]
Could you please help me and say me how I define this new parameter in the column definition?
Best Regards.
Raúl.
Hello Raul,
Did you try the approach discussed previously in this thread. You should be able to declare the parameters as part of the QueryString of the URL. Similar to the following:
Url.Action(
"AssessmentProcessCompetence"
,
"Assessment"
) +
"?id=#: AssessmentId#&allowedit=#:allowEdit#"
Rosen
Telerik by Progress

Hello Rosen,
Thank you so much. It works fine.
Best Regards.
Raúl