Hi,
I have developed an application where I am displaying records in kendo Gantt chart, Initially I want to display only title and give user the option to select start & end date. This means that I need to pass null value for start & end date, but I could not find the option. Could you please help me with it.
Also I want to add validations for start date & end date i.e. if user does not enter start & end date an alert should be displayed specifying user to add dates.
Please let m know whether its possible or not & if possible how should I go ahead with it.
Hello Jasmine,
You can initialize the Gantt component with a certain number of columns and change that later, using the setOptions method. You can alter the columns object, by passing the needed number and type of columns as demonstrated below:
let gantt = $("#gantt").getKendoGantt();
gantt.setOptions({columns: [
{ field: "id", title: "ID", width: 60 },
{ field: "title", title: "Title", editable: true, sortable: true },
{ field: "start", title: "Start Time", format: "{0:MM/dd/yyyy}", width: 100, editable: true, sortable: true },
{ field: "end", title: "End Time", format: "{0:MM/dd/yyyy}", width: 100, editable: true, sortable: true }
]})
The example below, using a button click event to display the Start and End dates in the Gantt
https://dojo.telerik.com/@nenchef/EPImUkEc
As for your other question - could you please specify where you need to define the start and end date, and where exactly the mentioned validation should be applied?
Regards,
Nencho
Progress Telerik