Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 628
  • Last Modified:

Kendo grid filed with href

My Kendo grid has "Add New" button with the function:
 me.filter.add(function () {
                        //Open the page used to add a new CallLog
                        app.router().navigate("/CallCenter/Call", true);
This works.

Here is my grid:
me.grid = me.gridContainer.kendoGrid({
                        dataSource: me.dataSource,
                        selectable: false,
                        sortable: true,
                        filterable: true,
                        pageable: true,
                        columns: [
                            { title: "Inquiry #", filterable: true, field: "CallId", width: 120 }, (1)
                           // { title: "Inquiry #", filterable: false, field: "CallId", template: kendo.template($("#" + TEMPLATE_CALLLOGS_NAME).html()) },
                           { title: "Property Code", filterable: true, field: "PropertyCode" },
                            { title: "Property Name", filterable: true, field: "PropertyName" },
                            { title: "Contract", filterable: true, field: "ContractCode" }
}
When grid populates with the data the Inquiry# column displays some content.  I need to replace the underlined column "Inquiry#" with the one directly following it that uses  TEMPLATE_CALLLOGS_NAME
I need help to create TEMPLATE_CALLLOGS_NAME script so it opens the same form.
Something like this:
<script type="text/x-kendo-template" id="template_calllog_calllogname">
    <a href="/CallCenter/Call/">
    </a>
</script>
If I use the script I am showing here, that content of the "Inquiry#" column does not show and now Href links also.

Please help.
0
Aquarus
Asked:
Aquarus
  • 3
1 Solution
 
leakim971PluritechnicianCommented:
could you provide link to your page ?

try this :
var cellOfInquiryTitle = $("td:contains('Inquiry #')");
var rowOfTitles = cellOfInquiryTitle.closest("tr");
var rows = rowOfTitles.nextAll("tr");
$("td:first", rows).each(function() {
    $("a", this).click(function(evt) {
           evt.preventDefault();
           var href = $(this).attr("href");
           $(this).closest("td").next().load(href);
    });
});

Open in new window

0
 
AquarusAuthor Commented:
The link to the page that  works was in the description of my question.  I am sorry it did not come out clearly.  

"My Kendo grid has "Add New" button with the function:
  me.filter.add(function () {
                         //Open the page used to add a new CallLog
                         app.router().navigate("/CallCenter/Call", true);
 

I have the template script like this:
<script type="text/x-kendo-template" id="template_calllog_calllogname">
    <a href="/CallCenter/Call/">
    </a>
</script>

How should I put what you suggested in this script and where is the link to my "/CallCenter/Call" form?
0
 
AquarusAuthor Commented:
This is the correct script for template.
 script type="text/x-kendo-template" id="template_calllog_calllogname">
     <!--<a href="/CallCenter/Call/">-->
    <a href="/CallCenter/Call/#: CallHeaderID #" title="Open Call" data-id="link">#: CallId #</a>
     
</script>
0
 
AquarusAuthor Commented:
This information is only for newbies who wants to learn step by step and knowledge-wise only at the beginning of the learning.
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now