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. Image for the cookie policy date

taskIdMapping property read only

Hello,

how can i do the property taskIdMapping in ejGantt read only?
I do not want the user to edit this property.

Thanks and BR
Oto

3 Replies

BM Bharath Marimuthu Syncfusion Team June 11, 2014 01:56 PM UTC

Hi Otomar,

 

Thanks for your update.

 

You can able to cancel the editing for particular column by handling the beginEdit event like below code snippet , thus making it as a read only column.

 

Code snippet

 

$("#gantt").ejGantt({

//...

//...

taskIdMapping: "taskID",

beginEdit: "beginEdit",

//...

});

 

function beginEdit(args) {

var editedData = args.data;

var column = this.getColumns();

   

if (column[args.columnIndex].mappingName == " taskID ")

   {

   args.cancel = true;

   }

}

 

For your reference here with we have attached the sample for cancel the editing in TaskId column with updated source and it can be downloaded from the following location.

 

Sample location: http://www.syncfusion.com/downloads/support/directtrac/general/GanttControlSample304747002.zip

 

Please let us know if need more information on this.

 

Regards,

Bharath.



ON Otomar Naprstek June 20, 2014 08:16 AM UTC

Hello,

I tested the provided code an I found it not working. The code threw a java script error, because the args parameter object does not have the 'columnIndex' attribute.

Thanks and BR
Oto


BM Bharath Marimuthu Syncfusion Team June 23, 2014 05:26 PM UTC

Hi Otomar ,

 

Sorry about the inconvenience caused.

We have analyzed the reported issue with our sample; we are not able to reproduce the issue. Can you please check with the sample in the following location? If still you face the problem, please revert us by modifying the sample based on your application along with replication procedure. This would be helpful for us to serve you.

Sample Location: http://www.syncfusion.com/downloads/support/directtrac/general/116563429150652.zip

 

Please let us know if you need further assistance on this.

 

Thanks,

Bharath.


Loader.
Live Chat Icon For mobile
Up arrow icon