Question
I’d like to develop a Multi-Language ASP.NET – app with gtp.net. The Multi-Language Texts are stored in a Database.
Question1: How can i set month-labels (Jan, Feb, Mar, …)?
Question2: How can i change the look (colour …) of the TodayLine and the VerticalDayStripes?
Answer
GTP.NET Gantt and Gantt_ASP uses windows culture information to get the default day and month names and you can set your own culture like this:
// Culture settings
private void comboBoxCulture_SelectedIndexChanged(object sender, System.EventArgs e)
{
if (comboBoxCulture.SelectedIndex>-1)
{
dateScaler1.CultureInfoDateTimeFormat=new CultureInfo( comboBoxCulture.Items[comboBoxCulture.SelectedIndex] as string, false ).DateTimeFormat;
}
}
But if you want to override the texts that end up on the datescaler some other way you can do so by implementing the DateScaler.OnDateScalerDrawString event. Here you get info about time, date and resolution you also get the suggested output and this value you can change to your own localized thru db-lookup value.
Regarding the TodayLine and VerticalDayStripes, both these items will be drawn with the color set in Gantt.TimeItemArea.BackColor