1.) Could you, please provide an example how can i select a multiple rows with in ultraGanttView grid.
2.) I have a ten tasks in ultraGanttView Grid Settings. Now i click a single row it's allow only cell click
but i wanna select only row selection how can i select row selection?
Thanks and Regards,
The UltraGanttView does not currently support multiple selection, although you may be able to do something with the underlying UltraGrid in order to achieve your second requirement in this case. We do not expose the underlying UltraGrid directly, but you should be able to get it by using the following code:
var grid = ultraGanttView1.GetType().InvokeMember("grid", System.Reflection.BindingFlags.GetField | System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic, null, ultraGanttView1, null) as UltraGrid;
Once you have obtained the UltraGrid, you can set the row selection by setting the grid.DisplayLayout.Override.CellClickAction to "CellClickAction.RowSelect" and this should enable you to achieve your second requirement in this case.
Regarding the multiple selection, normally I would recommend that you set the grid.DisplayLayout.Override.SelectTypeRow property to SelectType.Extended, but it appears that internally, the UltraGanttView expects only a single selected row, and it is coercing the multiple selection to reselect only the most recently selected row. This appears to be by design at the moment, and if you would like to see multiple selection included in the UltraGanttView control, I would recommend suggesting a new product idea for it by e-mailing email@example.com. This will place you in direct communication with our product management teams who plan and prioritize upcoming features and development based on community and user feedback.
Please let me know if you have any other questions or concerns on this matter.
Hi Andrew Goldenbaum,
Row selection works as you explained thanks,
Another one doubt if i select particular task i want to scroll the timeline view to particular task's start date
and, if there is any other way to choose the multiple row selection, it will be great.
thank you ,
In order to scroll the UltraGanttView's timeline such that a particular task's start date is in view, I would recommend handling the AfterSelectChange event of the UltraGrid mentioned above and checking the UltraGrid.Selected.Rows collection. Inside, you should find the UltraGridRow that was just selected.
You can get an object of the type TaskProxy from the ListObject property of the UltraGridRow, which then has a Task property returning the Infragstics.Win.UltraWinSchedule.Task object. From here, you can use the UltraGanttView's EnsureDateTimeVisible property to scroll the Task's start date into view.
I have attached a sample project to demonstrate the above.