Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
36 views

Edit: Looks like I posted this in wrong place. Now posted in feedback and bugs.

 

When assigning multiple resources and percentages, the first item in list always goes back to 100%.

It saves back to UI correctly but as soon as you leave or refresh page it goes back to 100% on first item and that's what's saved in database.

The online demo has the same code but demo doesn't save at all.

See attached screen shots.

Attila Antal
Telerik team
 updated answer on 02 Jan 2024
0 answers
116 views

Hello,

I am facing an issue wherein on the page following issue is coming:-

Request Failed. Try Again.

When I debugged the code then I found that the issue is actually coming due to this class file not found:- GanttProvider the actual error in the code is showing that:
The type or namespace name 'GanttProvider' could not be found (are you missing a using directive or an assembly reference?)


<%@ WebService Language="C#" Class="GanttService" %> using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Script.Services; using System.Web.Services; using System.Web.SessionState; //using Telerik.Web.UIusing Telerik.Web.UI.Gantt; [WebService(Namespace = "http://tempuri.org/")] [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)] // To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line. [System.Web.Script.Services.ScriptService] publicclassGanttService : System.Web.Services.WebService, IRequiresSessionState { private WebServiceController _controller; public WebServiceController Controller { get { if (_controller == null) { _controller = new WebServiceController(new GanttProvider()); } return _controller; } } [WebMethod(EnableSession = true)] public IEnumerable<CustomTaskData> GetTasks() { var ddd = Controller.GetTasks<CustomTaskData>(); var provider = new GanttProvider(); foreach (var item in ddd) { //item.Dependency = provider.GetSuccessorByTaskID((int)item.ID); item.Dependency = provider.GetPredecessorByTaskID((int)item.ID); } return ddd; } [WebMethod(EnableSession = true)] public IEnumerable<CustomTaskData> InsertTasks(IEnumerable<CustomTaskData> models) { var plannerRefId = HttpContext.Current.Session["GanttPlannerRefId"] != null ? Convert.ToInt32(HttpContext.Current.Session["GanttPlannerRefId"]) : 0; var plannerId = HttpContext.Current.Session["GanttPlannerID"] != null ? Convert.ToInt32(HttpContext.Current.Session["GanttPlannerID"]) : 0; var plannerType = HttpContext.Current.Session["GanttPlannerType"] != null ? HttpContext.Current.Session["GanttPlannerType"].ToString() : "project"; if (plannerType.Equals("vendor", StringComparison.InvariantCultureIgnoreCase)) { foreach (var item in models) { item.RootVendorID = plannerRefId; item.PlannerID = plannerId; } }else { foreach (var item in models) { item.ProjectID = plannerRefId; item.PlannerID = plannerId; } } return Controller.InsertTasks<CustomTaskData>(models); } [WebMethod(EnableSession = true)] public IEnumerable<CustomTaskData> UpdateTasks(IEnumerable<CustomTaskData> models) { var plannerRefId = HttpContext.Current.Session["GanttPlannerRefId"] != null ? Convert.ToInt32(HttpContext.Current.Session["GanttPlannerRefId"]) : 0; var plannerId = HttpContext.Current.Session["GanttPlannerID"] != null ? Convert.ToInt32(HttpContext.Current.Session["GanttPlannerID"]) : 0; var plannerType = HttpContext.Current.Session["GanttPlannerType"] != null ? HttpContext.Current.Session["GanttPlannerType"].ToString() : "project"; if (plannerType.Equals("vendor", StringComparison.InvariantCultureIgnoreCase)) { foreach (var item in models) { item.RootVendorID = plannerRefId; item.PlannerID = plannerId; } }else { foreach (var item in models) { item.ProjectID = plannerRefId; item.PlannerID = plannerId; } } return Controller.UpdateTasks<CustomTaskData>(models); } [WebMethod(EnableSession = true)] public IEnumerable<CustomTaskData> DeleteTasks(IEnumerable<CustomTaskData> models) { return Controller.DeleteTasks<CustomTaskData>(models); } [WebMethod(EnableSession = true)] public IEnumerable<DependencyData> GetDependencies() { return Controller.GetDependencies(); } [WebMethod(EnableSession = true)] public IEnumerable<DependencyData> InsertDependencies(IEnumerable<DependencyData> models) { return Controller.InsertDependencies(models); } [WebMethod(EnableSession = true)] public IEnumerable<DependencyData> DeleteDependencies(IEnumerable<DependencyData> models) { return Controller.DeleteDependencies(models); } [WebMethod(EnableSession = true)] public IEnumerable<Telerik.Web.UI.Gantt.ResourceData> GetResources() { return Controller.GetResources(); } [WebMethod(EnableSession = true)] public IEnumerable<AssignmentData> GetAssignments() { return Controller.GetAssignments(); } [WebMethod(EnableSession = true)] public IEnumerable<AssignmentData> InsertAssignments(IEnumerable<AssignmentData> models) { return Controller.InsertAssignments(models); } [WebMethod(EnableSession = true)] public IEnumerable<AssignmentData> UpdateAssignments(IEnumerable<AssignmentData> models) { return Controller.UpdateAssignments(models); } [WebMethod(EnableSession = true)] public IEnumerable<AssignmentData> DeleteAssignments(IEnumerable<AssignmentData> models) { return Controller.DeleteAssignments(models); } } [System.Runtime.Serialization.DataContract] publicclassCustomTaskData : TaskData { [System.Runtime.Serialization.DataMember] publicstring Description { get; set; } [System.Runtime.Serialization.DataMember] publicint? ProjectID { get; set; } [System.Runtime.Serialization.DataMember] publicint? PlannerID { get; set; } [System.Runtime.Serialization.DataMember] publicstring CusTaskType { get; set; } [System.Runtime.Serialization.DataMember] publicdouble? CusDuration { get; set; } [System.Runtime.Serialization.DataMember] publicdouble? CusActualHour { get; set; } [System.Runtime.Serialization.DataMember] publicint? VendorID { get; set; } [System.Runtime.Serialization.DataMember] publicstring Vendor { get; set; } [System.Runtime.Serialization.DataMember] publicint? RootVendorID { get; set; } [System.Runtime.Serialization.DataMember] publicstring RootVendorName { get; set; } [System.Runtime.Serialization.DataMember] publicstring ProjectName { get; set; } [System.Runtime.Serialization.DataMember] publicstring Dependency { get; set; } [System.Runtime.Serialization.DataMember] publicint? PlannerTaskID { get; set; } [System.Runtime.Serialization.DataMember] publicint? ItemRefID { get; set; } public override void CopyFrom(ITask srcTask) { base.CopyFrom(srcTask); Description = ((CustomTaskData)srcTask).Description; ProjectID = ((CustomTaskData)srcTask).ProjectID; PlannerID = ((CustomTaskData)srcTask).PlannerID; CusTaskType = ((CustomTaskData)srcTask).CusTaskType; CusDuration = ((CustomTaskData)srcTask).CusDuration; CusActualHour = ((CustomTaskData)srcTask).CusActualHour; VendorID = ((CustomTaskData)srcTask).VendorID; Vendor = ((CustomTaskData)srcTask).Vendor; RootVendorID = ((CustomTaskData)srcTask).RootVendorID; RootVendorName = ((CustomTaskData)srcTask).RootVendorName; ProjectName = ((CustomTaskData)srcTask).ProjectName; PlannerTaskID = ((CustomTaskData)srcTask).PlannerTaskID; ItemRefID = ((CustomTaskData)srcTask).ItemRefID; Dependency = ((CustomTaskData)srcTask).Dependency; } public override void CopyTo(ITask destTask) { base.CopyTo(destTask); ((CustomTaskData)destTask).Description = Description; ((CustomTaskData)destTask).ProjectID = ProjectID; ((CustomTaskData)destTask).PlannerID = PlannerID; ((CustomTaskData)destTask).CusTaskType = CusTaskType; ((CustomTaskData)destTask).CusDuration = CusDuration; ((CustomTaskData)destTask).CusActualHour = CusActualHour; ((CustomTaskData)destTask).VendorID = VendorID; ((CustomTaskData)destTask).Vendor = Vendor; ((CustomTaskData)destTask).RootVendorID = RootVendorID; ((CustomTaskData)destTask).RootVendorName = RootVendorName; ((CustomTaskData)destTask).ProjectName = ProjectName; ((CustomTaskData)destTask).PlannerTaskID = PlannerTaskID; ((CustomTaskData)destTask).ItemRefID = ItemRefID; ((CustomTaskData)destTask).Dependency = Dependency; } }

I am facing issue where I am trying to pass the object of GanntProvider class in WebServiceController constructor. It's an .ASMX file.

Kindly help me resolve this.

Thanks
Varun


Varun
Top achievements
Rank 1
 asked on 14 Mar 2023
1 answer
52 views

Hi,

 

The Gantt tooltip's time format differs from the format in the task dialog.

Please refer to attached screenshots...can this be changed?

 

Marc

Attila Antal
Telerik team
 answered on 03 Jan 2023
0 answers
61 views

Hi,

 

I just wanted to give you guys a BIG thumbs up for your work on the Gantt chart.

That one saves me really a lot of time to create a customer project system.

 

THANK YOU!

 

Marc

Fit2Page
Top achievements
Rank 2
Iron
Iron
Iron
 asked on 03 Aug 2022
0 answers
63 views

Hi,

Despite I know that only one windowmanager is allowed on a page....it just took me three hours to find out why a RadGantt isn't databinding at all without warning. The confilct lies in the fact that I had a seperate WindowManager defined on the page. is it possible to create a warning for this?

 

Thanks,

Marc

Fit2Page
Top achievements
Rank 2
Iron
Iron
Iron
 asked on 27 Jul 2022
0 answers
57 views
How can I override the current default window for assigning resources?  Would like to customize the way the resources are selected so being able to open my own window would be great.  Using Ajax controls...
Jerry
Top achievements
Rank 2
Iron
Iron
 asked on 21 Jul 2022
1 answer
146 views
How can I pop up a custom list of available tasks that a user is allowed to add to the gantt chart.  Preferably a different list depending on the level they are adding the child to.  Any examples of this concept would be great!
Peter Milchev
Telerik team
 answered on 28 Jun 2022
1 answer
113 views

I have added a custom button in place of the "Add Task" but can't seem to figure out how I can find the selected task from the gantt chart in javascript.  I am trying to force a popup so that the user can only select from a list of items to add as a task, depending on level they are selecting.  Any samples or ideas would be great.

Thanks!

Peter Milchev
Telerik team
 answered on 28 Jun 2022
2 answers
43 views

Hi Telerik Support Rep!

I want to have the demo of Gantt Chart using Telerik. I have downloaded its trial software suite using the link below

https://demos.telerik.com/aspnet-ajax/gantt/examples/overview/defaultcs.aspx. It was an exe file with the name "TelerikUIForAspNetCoreSetup". It has installed  its controls in the Toolbox but I am not been able to access Gantt Chart. 

I am following the demo solution from the same link but I am not been able to compile the project as the error says

"Error : Unknown server tag 'telerik:RadGantt'"

Plz help ASAP...I want to have the demo of GanttChart.

 

asif rehman
Top achievements
Rank 1
Iron
 answered on 08 Dec 2021
1 answer
82 views

How do you process a GanttToolbarItem custom command server-side?

The documentation https://docs.telerik.com/devtools/aspnet-ajax/controls/gantt/functionality/client-templates#toolbar-template here does not provide a C# example.

Peter Milchev
Telerik team
 answered on 22 Jul 2021
Narrow your results
Selected tags
Tags
+? more
Top users last month
horváth
Top achievements
Rank 2
Iron
Iron
Steve
Top achievements
Rank 2
Iron
Erkki
Top achievements
Rank 1
Iron
Mark
Top achievements
Rank 2
Iron
Iron
Veteran
Jakub
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
horváth
Top achievements
Rank 2
Iron
Iron
Steve
Top achievements
Rank 2
Iron
Erkki
Top achievements
Rank 1
Iron
Mark
Top achievements
Rank 2
Iron
Iron
Veteran
Jakub
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?