Gantt get updated data

Ask for help related to our 2.x versions.

Gantt get updated data

Postby deqn86 » Tue Apr 03, 2012 3:57 pm

Hi,
We use gantt chart trial control for a few days (planing to buy it if everything is OK) and try to integrate it with our system. We want to make with 1 button
to save taskStore, dependencyStore (only these for now) with 1 request. How can we get all changed data like separated arrays (all task in one and dependencies in another)?
We use .NET MVC 3 with Entity Framework
Best regards
Deyan Stoinov
deqn86
 
Posts: 24
Joined: Mon Apr 02, 2012 10:54 am

Re: Gantt get updated data

Postby mats » Tue Apr 03, 2012 3:59 pm

To bundle the requests into 1 Ajax request I believe you'd need to use Ext.Direct. Are you familiar with it?
We're hiring! We have an open position for an experienced Sencha developer (Ext JS and/or Sencha Touch). Contact us at jobs@bryntum.com

Follow us on Twitter: @bryntum or Facebook

Need professional services or training? Read more here.
API documentation
User avatar
mats
Core Developer
Core Developer
 
Posts: 7247
Joined: Sat Dec 19, 2009 11:41 pm
Location: Sweden

Re: Gantt get updated data

Postby deqn86 » Tue Apr 03, 2012 4:11 pm

No I don't :(
If you link me documentation and/or examples will be great.
Thank you.
deqn86
 
Posts: 24
Joined: Mon Apr 02, 2012 10:54 am

Re: Gantt get updated data

Postby mats » Tue Apr 03, 2012 4:18 pm

We're hiring! We have an open position for an experienced Sencha developer (Ext JS and/or Sencha Touch). Contact us at jobs@bryntum.com

Follow us on Twitter: @bryntum or Facebook

Need professional services or training? Read more here.
API documentation
User avatar
mats
Core Developer
Core Developer
 
Posts: 7247
Joined: Sat Dec 19, 2009 11:41 pm
Location: Sweden

Re: Gantt get updated data

Postby deqn86 » Tue Apr 03, 2012 5:05 pm

I take a quick look but it seems too complicated.
Is these an option to take updated data client side in JSON, merge them and via JQuery $.post to submit them ?
deqn86
 
Posts: 24
Joined: Mon Apr 02, 2012 10:54 am

Re: Gantt get updated data

Postby mats » Tue Apr 03, 2012 5:06 pm

You can do that. Though no need to involve jQuery, Ext JS does all jQuery does an about 1000000000 more things. http://docs.sencha.com/ext-js/4-0/#!/api/Ext.Ajax
We're hiring! We have an open position for an experienced Sencha developer (Ext JS and/or Sencha Touch). Contact us at jobs@bryntum.com

Follow us on Twitter: @bryntum or Facebook

Need professional services or training? Read more here.
API documentation
User avatar
mats
Core Developer
Core Developer
 
Posts: 7247
Joined: Sat Dec 19, 2009 11:41 pm
Location: Sweden

Re: Gantt get updated data

Postby deqn86 » Wed Apr 04, 2012 8:33 am

Ext.Ajax is very useful indeed thank you very much but still could not find how to get updated data in client side :/
deqn86
 
Posts: 24
Joined: Mon Apr 02, 2012 10:54 am

Re: Gantt get updated data

Postby mats » Wed Apr 04, 2012 9:02 am

Check http://docs.sencha.com/ext-js/4-0/#!/api/Ext.data.Store

getModifiedRecords
getNewRecords

also check Ext.encode, Ext.decode to work with JSON.
We're hiring! We have an open position for an experienced Sencha developer (Ext JS and/or Sencha Touch). Contact us at jobs@bryntum.com

Follow us on Twitter: @bryntum or Facebook

Need professional services or training? Read more here.
API documentation
User avatar
mats
Core Developer
Core Developer
 
Posts: 7247
Joined: Sat Dec 19, 2009 11:41 pm
Location: Sweden

Re: Gantt get updated data

Postby deqn86 » Thu Apr 05, 2012 1:02 pm

This is great, I use this methods and they get me the right models, but dates are not valid, can't be parsed and send to the server. I try to set defaults on Ext.Date like this:
Code: Select all
      Ext.Date.patterns = {
         ISO8601Long:"Y-m-d H:i:s",
         ISO8601Short:"Y-m-d",
         ShortDate: "d.m.Y",
         LongDate: "d.m.Y",
         FullDateTime: "d.m.Y H:i:s",
         MonthDay: "F d",
         ShortTime: "g:i A",
         LongTime: "g:i:s A",
         SortableDateTime: "Y-m-d\\TH:i:s",
         UniversalSortableDateTime: "Y-m-d H:i:sO",
         YearMonth: "F, Y"
      };
      Ext.Date.defaultFormat = "d.m.Y";

But when I print the dates in model they looks like a this:
StartDate: Mon Apr 09 2012 03:00:00 GMT+0300 (FLE Daylight Time)
__proto__: Invalid Date

Any idea how to solve this?
deqn86
 
Posts: 24
Joined: Mon Apr 02, 2012 10:54 am

Re: Gantt get updated data

Postby mats » Thu Apr 05, 2012 1:05 pm

Date looks ok to me. Are you trying to json encode Your records? Ext.encode(record.data)
We're hiring! We have an open position for an experienced Sencha developer (Ext JS and/or Sencha Touch). Contact us at jobs@bryntum.com

Follow us on Twitter: @bryntum or Facebook

Need professional services or training? Read more here.
API documentation
User avatar
mats
Core Developer
Core Developer
 
Posts: 7247
Joined: Sat Dec 19, 2009 11:41 pm
Location: Sweden

Next

Return to Help (v2.x)

Who is online

Users browsing this forum: No registered users and 1 guest