We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

Multiselecting in GridGroupingControl

Thread ID:

Created:

Updated:

Platform:

Replies:

58897 Mar 30,2007 07:23 AM Apr 18,2007 05:56 AM Windows Forms 8
loading
Tags: GridControl
Aditi Pisal
Asked On March 30, 2007 07:23 AM

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

haneefm [Syncfusion]
Replied On March 30, 2007 04:34 PM

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

Aditi Pisal
Replied On April 2, 2007 02:11 AM

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

Aditi Pisal
Replied On April 2, 2007 02:48 AM

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

Aditi Pisal
Replied On April 3, 2007 09:05 AM

Hi Pls respond to the above .
Thanks in Advance,
Aditi

haneefm [Syncfusion]
Replied On April 3, 2007 08:07 PM

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

Aditi Pisal
Replied On April 4, 2007 01:21 AM

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

haneefm [Syncfusion]
Replied On April 4, 2007 05:05 PM

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

Aditi Pisal
Replied On April 18, 2007 05:56 AM

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.

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;