Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private List<Project> GetDataRowHandles()
- {
- List<Project> rowHandles = new List<Project>();
- for (int i = 0; i < this.gcProject.VisibleRowCount; i++)
- {
- int rowHandle = this.gcProject.GetRowHandleByVisibleIndex(i);
- var item = this.gcProject.GetRow(rowHandle) as Project;
- if (this.gcProject.IsGroupRowHandle(rowHandle))
- {
- if (!this.gcProject.IsGroupRowExpanded(rowHandle))
- {
- rowHandles.AddRange(GetDataRowHandlesInGroup(rowHandle));
- }
- }
- else
- rowHandles.Add(item);
- }
- return rowHandles;
- }
- private List<Project> GetDataRowHandlesInGroup(int groupRowHandle)
- {
- List<Project> rowHandles = new List<Project>();
- for (int i = 0; i < this.gcProject.GetChildRowCount(groupRowHandle); i++)
- {
- int rowHandle = this.gcProject.GetChildRowHandle(groupRowHandle, i);
- //Так понимаю, что здесь я неправильно получаю объект в группе
- var item = this.gcProject.GetGroupRowValue(i) as Project;
- if (this.gcProject.IsGroupRowHandle(rowHandle))
- {
- rowHandles.AddRange(GetDataRowHandlesInGroup(rowHandle));
- }
- else
- rowHandles.Add(item);
- }
- return rowHandles;
- }
- private List<int> GetDataRowHandles() {
- List<int> rowHandles = new List<int>();
- for (int i = 0; i < grid.VisibleRowCount; i++) {
- int rowHandle = grid.GetRowHandleByVisibleIndex(i);
- if (grid.IsGroupRowHandle(rowHandle)) {
- if (!grid.IsGroupRowExpanded(rowHandle)) {
- rowHandles.AddRange(GetDataRowHandlesInGroup(rowHandle));
- }
- }
- else
- rowHandles.Add(rowHandle);
- }
- return rowHandles;
- }
- private List<int> GetDataRowHandlesInGroup(int groupRowHandle) {
- List<int> rowHandles = new List<int>();
- for (int i = 0; i < grid.GetChildRowCount(groupRowHandle); i++) {
- int rowHandle = grid.GetChildRowHandle(groupRowHandle, i);
- if (grid.IsGroupRowHandle(rowHandle)) {
- rowHandles.AddRange(GetDataRowHandlesInGroup(rowHandle));
- }
- else
- rowHandles.Add(rowHandle);
- }
- return rowHandles;
- }
Add Comment
Please, Sign In to add comment