This question is locked. New answers and comments are not allowed.
Hi
I am currently using telerik to develop application for military planning. In preliminary planning the military does not specify the start date for their operation. Rather they use notation such as D which is to denote the start date. There will be task to be done on D-5 or D+1, D+3 so on. Once the actual start date has been determined all the date need to be updated to reflect this. So if D = 20 January then D-3 should be 17 Jan, D+4= 24 Jan . I am using the gannt view but found myself unable to fulfill this particular requirement. Can anyone help me with this ? Thanks
I am currently using telerik to develop application for military planning. In preliminary planning the military does not specify the start date for their operation. Rather they use notation such as D which is to denote the start date. There will be task to be done on D-5 or D+1, D+3 so on. Once the actual start date has been determined all the date need to be updated to reflect this. So if D = 20 January then D-3 should be 17 Jan, D+4= 24 Jan . I am using the gannt view but found myself unable to fulfill this particular requirement. Can anyone help me with this ? Thanks
8 Answers, 1 is accepted
0
Hello Tawfek,
As you posted your request under the Telerik Platform forums, I cannot tell for sure which GanttView you're using. Telerik DevTools include a GanttView for WPF, WinForms, Silverlight and therefore we would need to know which component you're inquiring about.
I would also recommend that you post your queries under the forum of the specific product as this will ensure that your questions reach the respective development community and our support specialists. You can also take advantage of our support plans to be able to submit support requests directly for the DevTools products and have a guaranteed 24hour response time.
Regards,
Tina Stancheva
Telerik
As you posted your request under the Telerik Platform forums, I cannot tell for sure which GanttView you're using. Telerik DevTools include a GanttView for WPF, WinForms, Silverlight and therefore we would need to know which component you're inquiring about.
I would also recommend that you post your queries under the forum of the specific product as this will ensure that your questions reach the respective development community and our support specialists. You can also take advantage of our support plans to be able to submit support requests directly for the DevTools products and have a guaranteed 24hour response time.
Regards,
Tina Stancheva
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
Tawfek
Top achievements
Rank 1
answered on 16 Jun 2014, 09:57 AM
Hi
I am sorry for not being clear on which platform. I am using Telerik for WPF. Does this mean that I need to post this request again on the particular forum. My apology
Thanks
I am sorry for not being clear on which platform. I am using Telerik for WPF. Does this mean that I need to post this request again on the particular forum. My apology
Thanks
0
Hi Tawfek,
If I understood correctly we want to set the Start/End Dates whenever this D-date is known.
If that is the case I suggest creating a CustomGanttTask that holds the startDateDeviation and the endDateDeviation and recalculates the Start and End dates whenever the DDate is set.
Please find attached a sample application demonstrating this. I hold the DDate in the ViewModel and recalculate the Start/End dates whenever I set it ( I set the DDate in the Button_Click method.
Please take a look and let me know whether this works for you.
Regards,
Polya
Telerik
If I understood correctly we want to set the Start/End Dates whenever this D-date is known.
If that is the case I suggest creating a CustomGanttTask that holds the startDateDeviation and the endDateDeviation and recalculates the Start and End dates whenever the DDate is set.
Please find attached a sample application demonstrating this. I hold the DDate in the ViewModel and recalculate the Start/End dates whenever I set it ( I set the DDate in the Button_Click method.
Please take a look and let me know whether this works for you.
Regards,
Polya
Telerik
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
0
Tawfek
Top achievements
Rank 1
answered on 18 Jun 2014, 04:14 AM
Thanks, this is really very helpful. I have made some changes to the CustomGanttTask so that I will get "D+.." displayed correctly. Basically I introduced a property
public string DSStartDeviation
{
get
{
if (dStartDeviation == 0)
return string.Empty;
else if (dStartDeviation > 0)
{
string s ="+" + dStartDeviation.ToString();
return s;
}
//else if (dStartDeviation < 0)
return dStartDeviation.ToString();
}
set
{
string s = value;
dStartDeviation = int.Parse(s);
}
} and
in the MainWindow.xaml I have modified the line for DStart column as the following
<telerik:ColumnDefinition IsFrozenColumn="True" Width="AutoHeaderAndContent" Header="DStart" MemberBinding="{Binding DStartDeviation}">
<telerik:ColumnDefinition.CellTemplate>
<DataTemplate>
<StackPanel Orientation="Horizontal">
<TextBlock Text="D"></TextBlock>
<TextBlock Text="{Binding DataItem.DSStartDeviation"/>
</StackPanel>
</DataTemplate>
</telerik:ColumnDefinition.CellTemplate>
</telerik:ColumnDefinition>
I would like to be able to change the DStart so that I can change a value for example from "D+2" to "D+5" and have the value change reflected. Can you suggest how I should do this, as I am very new in C# and WPF. For now I will try to change the above column definition binding to my DSStartDeviation property. I don't know if this will work. Is there a simpler and better way ?
Thanks
public string DSStartDeviation
{
get
{
if (dStartDeviation == 0)
return string.Empty;
else if (dStartDeviation > 0)
{
string s ="+" + dStartDeviation.ToString();
return s;
}
//else if (dStartDeviation < 0)
return dStartDeviation.ToString();
}
set
{
string s = value;
dStartDeviation = int.Parse(s);
}
} and
in the MainWindow.xaml I have modified the line for DStart column as the following
<telerik:ColumnDefinition IsFrozenColumn="True" Width="AutoHeaderAndContent" Header="DStart" MemberBinding="{Binding DStartDeviation}">
<telerik:ColumnDefinition.CellTemplate>
<DataTemplate>
<StackPanel Orientation="Horizontal">
<TextBlock Text="D"></TextBlock>
<TextBlock Text="{Binding DataItem.DSStartDeviation"/>
</StackPanel>
</DataTemplate>
</telerik:ColumnDefinition.CellTemplate>
</telerik:ColumnDefinition>
I would like to be able to change the DStart so that I can change a value for example from "D+2" to "D+5" and have the value change reflected. Can you suggest how I should do this, as I am very new in C# and WPF. For now I will try to change the above column definition binding to my DSStartDeviation property. I don't know if this will work. Is there a simpler and better way ?
Thanks
0
Accepted
Hello Tawfek,
In order to allow editing of a ColumnDefinition we should set a CellEditTemplate for it.
In our case in the CellEditTemplate of the DStart we should change the value of the DStartDeviation property:
Also we have to ensure that whenever DStartDeviation is changed the Start date is recalculated and the DSStartDeviation( the string representation if the DStart Date) is changed.
Please find attached the modified project demonstrating these changes.
Hopefully this helps.
Regards,
Polya
Telerik
In order to allow editing of a ColumnDefinition we should set a CellEditTemplate for it.
In our case in the CellEditTemplate of the DStart we should change the value of the DStartDeviation property:
<
telerik:ColumnDefinition.CellEditTemplate
>
<
DataTemplate
>
<
TextBox
Text
=
"{Binding DStartDeviation, Mode=TwoWay}"
/>
</
DataTemplate
>
</
telerik:ColumnDefinition.CellEditTemplate
>
Please find attached the modified project demonstrating these changes.
Hopefully this helps.
Regards,
Polya
Telerik
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
0
Tawfek
Top achievements
Rank 1
answered on 18 Jun 2014, 10:53 AM
Hi,
Thanks for the prompt reply. I am very happy with the support that I get from Telerik team. I have downloaded your solution. And I found out that if I made modification in the DStart column changes is not reflected immediately. I still have to click on the "Set D-Date" button. I have gone through your provided code and change the binding of the TextBox to DSStartDeviation instead of DStartDeviation (line 37 in MainWindow.xaml) and have added the following lines to DSStartDeviation property set method
set
{
string s = value;
int i = s.IndexOf('D');
s = s.Substring(i+1);
DStartDeviation = int.Parse(s);
}
Thanks for helping me get the answer that I am looking for. Really appreciate it.
Thanks for the prompt reply. I am very happy with the support that I get from Telerik team. I have downloaded your solution. And I found out that if I made modification in the DStart column changes is not reflected immediately. I still have to click on the "Set D-Date" button. I have gone through your provided code and change the binding of the TextBox to DSStartDeviation instead of DStartDeviation (line 37 in MainWindow.xaml) and have added the following lines to DSStartDeviation property set method
set
{
string s = value;
int i = s.IndexOf('D');
s = s.Substring(i+1);
DStartDeviation = int.Parse(s);
}
Thanks for helping me get the answer that I am looking for. Really appreciate it.
0
Hello Tawfek,
I did not understand that you wanted to use the string DSStartDeviation in the CellEditTemplate. That's why I removed the setter. Your modifications should do the trick in setting DStartDeviation when the DSStartDeviation changes.
I am glad I was able to assist you and everything is working as intended.
Regards,
Polya
Telerik
I did not understand that you wanted to use the string DSStartDeviation in the CellEditTemplate. That's why I removed the setter. Your modifications should do the trick in setting DStartDeviation when the DSStartDeviation changes.
I am glad I was able to assist you and everything is working as intended.
Regards,
Polya
Telerik
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
0
Tawfek
Top achievements
Rank 1
answered on 24 Jun 2014, 03:03 PM
No problem, obviously I was not very clear. Anyway you really helped me, thanks
Regards
Tawfek
Regards
Tawfek