Hello,
I'm trying to use the ultraganttviewcontrol with my database, but i'm not finding the correct way to bind the projects and task datasources. I already tried to bind my database to a ultragrid and that works fine. So my question is if you can point me in the right direction of an example with a database connection and what the best method is to do the databinding. I would prefer using entity framework if that is possible.
Kind regards,
Robbe
Hello Sahaja,
I resolved my null pointer exception. When I added my calenderinfo in the designer (by using the properties) I got the exception. But in your project I never get the null pointer exception. So I don't really know why I can't do it with the designer but it is solved. Thank you for your help.
Hello Robbe,
I have modified the attached sample to demonstrate how you can add a custom Color column to the GanttView and make it as a dropdown using a ComboEditor.
Please clarify the complete 17.1 build number so I can test it with the exact version to see if I can reproduce the null pointer exception that you were mentioning about.
Like I mentioned before, the data modified in Gantt View should be automatically updated in Database. The underlying Database should not matter to observe this behavior.
Let me know if you have any questions.
Sincerely,Sahaja KokkalagaddaAssociate Software Developer
3782.WinGanttViewBindToData1.zip
***BUMP***
Hello Sahaja Kokkalagadda,
I already had found that example but it doesn't work for adding the custom column, I have a null pointer exception (see my added code).
Also when I change the way of populating the dataset in your example to getting it from the database, it still doesn't update my database.
I've added a small example of my code, but you will still need a database. I'm using version 17.1.
ProjectPlanning.zip
The data modified in Gantt View should be automatically updated in Database. Have you tested this behavior in the sample I attached previously?
To add a custom color column, you can refer to our online Gantt View Custom Columns sample.
It is possible to make the custom column as a dropdown by adding a ComboEditor to it. For example, you can write something like this to achieve it:
EditorWithCombo combo = new EditorWithCombo();
ValueList comboBinding = new ValueList(); for (int i = 0; i < 10; i++) comboBinding.ValueListItems.Add("Item " + i.ToString());
this.ganntView1.GridSettings.ColumnSettings[CustomColumn].Editor = combo; this.ganntView1.GridSettings.ColumnSettings[CustomColumn].ValueList = comboBinding;
Please let me know if I may be of further assistance.