This is a migrated thread and some comments may be shown as answers.

Task Collection is empty

5 Answers 103 Views
Gantt
This is a migrated thread and some comments may be shown as answers.
Felix
Top achievements
Rank 1
Felix asked on 04 Sep 2014, 07:24 AM
Hi,

i have one problem regarding the new gantt chart and its task collection. I copied the online example "Gantt - XML Provider" and everything works fine. But when I want to get all the created tasks inside the gantt chart e.g. for saving purposes, at a server side event, the task collection is empty. It doesn't matter if I call Radgantt1.Tasks or the mehtod GetAllTasks(). I hope somebody can solve my problem as soon as possible.

Beside of that the reason why I used the the example with the XMLGanttProvider is that at first i tried to use a ObjectDatasource to populate, update and insert my gantt chart. But when i tried to insert new tasks with the integrated "Add Task" -Button nothing happend and I've got the javascript error: "w[x] is null" when I set the property  "DataObjectTypeName" to a certain object. Updating and selecting worked fine.
When i try to use explicit update and insert parameters my attached update and insert methods don't even get invoked...
So you can see that I've tried a lot of things to accomplish my goals.

Thanks,
Felix

5 Answers, 1 is accepted

Sort by
0
Accepted
Bozhidar
Telerik team
answered on 04 Sep 2014, 07:43 AM
Hello,

You have to call RadGantt1.DataBind();​ before trying to access the tasks. As for the ObjectDataSource issue, we are working on it and will provide a fix for the upcoming release.

Regards,
Bozhidar
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Felix
Top achievements
Rank 1
answered on 04 Sep 2014, 10:39 AM
Hi Bozhidar,

thank you for your fast and helpful answer. But I wanted to make one additional annotation. If I use an ObjectDataSource and do not attach an insert method, I get the Javascript-Error "too much recursion" (browser: Firefox v. 32.0) when ich click e.g. "Add child" and no new task is inserted inside the gantt chart. Don't know if this is a bug or something else.

Greetings,
Felix
0
Bozhidar
Telerik team
answered on 05 Sep 2014, 05:53 AM
Hello Felix,

Could you elaborate on why you would remove the Insert method and try to use the Add button? What is the expected behavior? We will investigate this to make sure that we don't lock up the browser with recursion, however this is not a valid use case.

Regards,
Bozhidar
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Felix
Top achievements
Rank 1
answered on 05 Sep 2014, 07:08 AM
Hi Bozhidar,

I removed the insert method because with an ObjectDataSource either the method with a complex object as a parameter or with the deifnition of explicit insert paramters didn't work. If I want to pass a complex object (with only simple datatypes) to my insert method a javascript error is thrown with the error message "w[x] is null". And if I define explicit insert parameters the attached insert method is not invoked. Thtas because I removed the attached insert method and tried to store my gantt task with the event "OnTaskInsert". And this leads to the java script error "too much recursion". I hope I could explain the background of my considerations more or less ;-).

Regards,
Felix
0
Bozhidar
Telerik team
answered on 05 Sep 2014, 10:12 AM
Hi Felix,

Thank you for clarifying.

In the official release there was also an issue with the Server events, which we've recently fixed. If you download the latest internal build you should be able to use the Insert event without any issues. 

Regards,
Bozhidar
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
Gantt
Asked by
Felix
Top achievements
Rank 1
Answers by
Bozhidar
Telerik team
Felix
Top achievements
Rank 1
Share this question
or