We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Other widgets inside a grid column

Thread ID:





116344 May 16,2014 02:27 PM UTC May 28,2014 06:36 AM UTC JavaScript 4
Tags: ejGrid
Asked On May 16, 2014 02:27 PM UTC


As seen in one of the samples where we have a couple of buttons in a column for each row, can we similarly have any other widget, may be a calendar, in one of the columns of a grid?

Maithiliy K [Syncfusion]
Replied On May 19, 2014 02:40 PM UTC

Hi Amarjot,


Thanks for using Syncfusion Products.


We can achieve your requirement of adding ejDatePicker as one of the grid column through Column template feature. Please refer the below code snippet


<script type="text/x-jsrender" id="columnTemplate">

    <input id="Calendar_{{: OrderID}}" type="text" />



$(function () {


          . . . . .  

          columns: [

             . . . .

             { headerText: "Calendar", columnTemplate: true, templateId: "#columnTemplate", textAlign: "center", width: 110 }],

          queryCellInfo: "cellValue"




Using queryCellInfo event the input tag which is added in the template has to be changed as ejDatePicker. Please refer the below code snippet.


function cellValue(args) {

            if (args.column.headerText == "Calendar") {



                    value: args.Data.OrderDate,

                    dateFormat: "MM/dd/yyyy"





For your convenience we have created a sample and the same can be downloaded from the following attachment.


For more information please refer the below online sample.




Please let me know if you have any queries.



Maithiliy K

Attachment: ColumnTemplate_e45ba831.zip

Replied On May 20, 2014 10:13 AM UTC

Hi Maithiliy,

Thanks a lot for the response!
First question, is this information present in the documentation that's available online?
Secondly, I actually want to have a schedule widget in the grid column, will it be similar to the way datepicker has been used in the example that you have provided? It would be really great if you can provide a sample with the schedule widget in the grid column.

Amarjot Kaur

Madhu Sudhanan P [Syncfusion]
Replied On May 21, 2014 12:40 PM UTC

Hi Amarjot,


Please find the response.


Query #1: “is this information present in the documentation that's available online?”


Currently the documentation for the Essential Javascript controls is in drafting state and it is tentatively scheduled to available online at the mid of month June, 2014.


Query #2: “I actually want to have a schedule widget in the grid column,”


We are working on this sample and while render the schedule control within Grid we are facing some issues like “CSS Overrides the controls Behaviour” and also “Scroll bar not displayed when we set the minimum width” and we are checking those cases. Therefore, we will update you the sample in four business days (27th May, 2014).


Please let us know if you have any queries.



Madhu Sudhanan. P

Madhu Sudhanan P [Syncfusion]
Replied On May 28, 2014 06:36 AM UTC

Hi Amarjot,


Sorry for the inconvenience caused.


Based on your request, we have created simple sample in which the schedule is rendered in one of the grid columns using column template and the same can be downloaded from the below location.


Sample Location: Grid_with_Schedule.zip


In the sample, we have used the following template to place the schedule in grid.



<script type="text/x-jsrender" id="columnTemplate">

     <div id="Calendar_{{: OrderID}}" class="scheduleClass" />




And the schedule in the grid column is rendered using the create and actionComplete event. Please refer the below code snippet.



The create and actionBegin event will be initialized during grid initialization as follow,




                dataSource: window.gridData,

                . . . . .

                create: renderSchedule,

                actionComplete: renderSchedule



The schedule is rendered in the renderSchedule function as follow,


window.renderSchedule = function (args) {


                if (args.type == "create" || args.requestType == "paging")


                        width: "600",

                        height: "380px",

                        timeMode: "24",

                        currentView: "day",

                        views: ["Day"],

                        fields: {

                            dataSource: list,

                            idField: "Id",

                            subjectField: "Subject",

                            startTimeField: "StartTime",

                            endTimeField: "EndTime",

                            categorizeField: "Categorize",

                            alldayField: "AllDay",

                            recurrenceField: "Recurrence",

                            recurrenceRuleField: "RecurrenceRule"


                        startHour: 0,

                        endHour: 6






Please let us know if you have any queries.



Madhu Sudhanan. P


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon