Multiselecting in GridGroupingControl
Hi ,
I want to perform some operations on selection of particular records.
These records have to be selected using checkboxes .
My problem is to identify which records are selected and in which event of grid can I perform the required operations on the selected records.
Please support your answer with sample exe.
Thanks in Advance,
Aditi
BulkUpdateDocument.zip
I want to perform some operations on selection of particular records.
These records have to be selected using checkboxes .
My problem is to identify which records are selected and in which event of grid can I perform the required operations on the selected records.
Please support your answer with sample exe.
Thanks in Advance,
Aditi
BulkUpdateDocument.zip
SIGN IN To post a reply.
8 Replies
HA
haneefm
Syncfusion Team
March 30, 2007 08:34 PM UTC
Hi Aditi,
Here is a minimal sample that shows you "How to update the records using the AddNewRecord with checked checkbox?". Please try this sample and let me know if this helps.
BulkUpdateSample.zip
Best regards,
Haneef
Here is a minimal sample that shows you "How to update the records using the AddNewRecord with checked checkbox?". Please try this sample and let me know if this helps.
BulkUpdateSample.zip
Best regards,
Haneef
AP
Aditi Pisal
April 2, 2007 06:11 AM UTC
Thanks Haneef,
The solution is working .But I have implemented
bmsdgHierarchyMapping.TableModel.Model.CoveredRanges.Add(GridRangeInfo.Cells(1, 1, 1, 4));
bmsdgHierarchyMapping.TableModel.Model.CoveredRanges.Add(GridRangeInfo.Cells(1, 5, 1, 8));
bmsdgHierarchyMapping.TableModel.Model.CoveredRanges.Add(GridRangeInfo.Cells(1, 9, 1, 12));
As my newly column is at position 2..the earlier settings are vanished and then I am not able to acheive the GridCovered Ranges.
Please help .
sample exe will be useful.
Thanks in Advance
Aditi
BulkUpdate2.zip
The solution is working .But I have implemented
bmsdgHierarchyMapping.TableModel.Model.CoveredRanges.Add(GridRangeInfo.Cells(1, 1, 1, 4));
bmsdgHierarchyMapping.TableModel.Model.CoveredRanges.Add(GridRangeInfo.Cells(1, 5, 1, 8));
bmsdgHierarchyMapping.TableModel.Model.CoveredRanges.Add(GridRangeInfo.Cells(1, 9, 1, 12));
As my newly column is at position 2..the earlier settings are vanished and then I am not able to acheive the GridCovered Ranges.
Please help .
sample exe will be useful.
Thanks in Advance
Aditi
BulkUpdate2.zip
AP
Aditi Pisal
April 2, 2007 06:48 AM UTC
Hi Haneef,
Additionally,to the previous requirement,
pls tell me how to add a rowheader with the Rows numbers in it.
As shown in my sample attachment here with.
the text to be given to the newly added ROW which gives the checkbox count must be having the title "BULK VALUE".
Thanks in Advance,
Aditi
BulkUpdate3.zip
Additionally,to the previous requirement,
pls tell me how to add a rowheader with the Rows numbers in it.
As shown in my sample attachment here with.
the text to be given to the newly added ROW which gives the checkbox count must be having the title "BULK VALUE".
Thanks in Advance,
Aditi
BulkUpdate3.zip
AP
Aditi Pisal
April 3, 2007 01:05 PM UTC
Hi Pls respond to the above .
Thanks in Advance,
Aditi
Thanks in Advance,
Aditi
HA
haneefm
Syncfusion Team
April 4, 2007 12:07 AM UTC
Hi Aditi,
For Numbered RowHeader:
One way you can do this is to handle the QueryCellStyleInfo event and set the row header text there.
//in form.load
this.grid.QueryCellStyleInfo += new GridTableCellStyleInfoEventHandler(grid_QueryCellStyleInfo);
this.grid.TableOptions.RowHeaderWidth = 30; /
/the handler
private void gridGroupingControl1_QueryCellStyleInfo(object sender, GridTableCellStyleInfoEventArgs e)
{if(e.TableCellIdentity.TableCellType == GridTableCellType.RecordRowHeaderCell
|| e.TableCellIdentity.TableCellType == GridTableCellType.AlternateRecordRowHeaderCell)
{
e.Style.CellType = "Header";
e.Style.CellValue = e.TableCellIdentity.Table.FilteredRecords.IndexOf((e.TableCellIdentity.DisplayElement as GridRecordRow).ParentRecord) + 1;
}
}
Best regards,
Haneef
For Numbered RowHeader:
One way you can do this is to handle the QueryCellStyleInfo event and set the row header text there.
//in form.load
this.grid.QueryCellStyleInfo += new GridTableCellStyleInfoEventHandler(grid_QueryCellStyleInfo);
this.grid.TableOptions.RowHeaderWidth = 30; /
/the handler
private void gridGroupingControl1_QueryCellStyleInfo(object sender, GridTableCellStyleInfoEventArgs e)
{if(e.TableCellIdentity.TableCellType == GridTableCellType.RecordRowHeaderCell
|| e.TableCellIdentity.TableCellType == GridTableCellType.AlternateRecordRowHeaderCell)
{
e.Style.CellType = "Header";
e.Style.CellValue = e.TableCellIdentity.Table.FilteredRecords.IndexOf((e.TableCellIdentity.DisplayElement as GridRecordRow).ParentRecord) + 1;
}
}
Best regards,
Haneef
AP
Aditi Pisal
April 4, 2007 05:21 AM UTC
Hi Haneef,
Thanks for the Row Header solution.
But my earlier problem of resetiing the covered ranges to include the newly added column still remains.
Actually when I trace the code the code is executed but the effects of newly written Grid.Covered Ranges code is not visible.
Please help with sample exe .
Thanks in Advance,
Aditi
BulkUpdate4.zip
Thanks for the Row Header solution.
But my earlier problem of resetiing the covered ranges to include the newly added column still remains.
Actually when I trace the code the code is executed but the effects of newly written Grid.Covered Ranges code is not visible.
Please help with sample exe .
Thanks in Advance,
Aditi
BulkUpdate4.zip
HA
haneefm
Syncfusion Team
April 4, 2007 09:05 PM UTC
Hi Aditi,
The reason for getting this behavior in your case is that the TableModel.CoveredRange collection is not resetted properly. Befor inserting the column, you should remove the proper covered range by using the FindRange method. Here is a code snippet
//Find the Range..
GridRangeInfo range = this.grid.TableModel.Model.CoveredRanges.FindRange(1,2); //Column position..
//Remove the proper covered range
this.grid.TableModel.Model.CoveredRanges.Remove(range);
///
///Add the column here....
///
//add the new Range
this.grid.TableModel.Model.CoveredRanges.Add(range);
Best Regards,
Haneef
The reason for getting this behavior in your case is that the TableModel.CoveredRange collection is not resetted properly. Befor inserting the column, you should remove the proper covered range by using the FindRange method. Here is a code snippet
//Find the Range..
GridRangeInfo range = this.grid.TableModel.Model.CoveredRanges.FindRange(1,2); //Column position..
//Remove the proper covered range
this.grid.TableModel.Model.CoveredRanges.Remove(range);
///
///Add the column here....
///
//add the new Range
this.grid.TableModel.Model.CoveredRanges.Add(range);
Best Regards,
Haneef
AP
Aditi Pisal
April 18, 2007 09:56 AM UTC
Thanks Haneef,
I am able to reset the covered ranges.
Pls tell me how can I hide the addnewrecord row at form load.
I have explicitly written:
ShowaddnewRecordBeforedEtails=false;
But inspite of this it overrides the custom engine part to show AddnewRecordDetails and brings this new record on top which is blank and unwanted.
pls tell me how to set it only when required and not otherwise.
I am able to reset the covered ranges.
Pls tell me how can I hide the addnewrecord row at form load.
I have explicitly written:
ShowaddnewRecordBeforedEtails=false;
But inspite of this it overrides the custom engine part to show AddnewRecordDetails and brings this new record on top which is blank and unwanted.
pls tell me how to set it only when required and not otherwise.
SIGN IN To post a reply.
- 8 Replies
- 2 Participants
-
AP Aditi Pisal
- Mar 30, 2007 11:23 AM UTC
- Apr 18, 2007 09:56 AM UTC