Cancel Selection on Grid Grouping Control
Hi,
I am using grid grouping control.
When the user select a record on the grid, the values of the record are transferred to the related controls.
On second select if the user changed the previous record, I want to cancel the new selection means:
The new record that the user select won't be selected and the previous record will stay selected.
I am using the CurrentRecordContextChanged event.
See the attached file.
How can I do it?
Thanks
gridGruoping_573f86c3.rar
I am using grid grouping control.
When the user select a record on the grid, the values of the record are transferred to the related controls.
On second select if the user changed the previous record, I want to cancel the new selection means:
The new record that the user select won't be selected and the previous record will stay selected.
I am using the CurrentRecordContextChanged event.
See the attached file.
How can I do it?
Thanks
gridGruoping_573f86c3.rar
SIGN IN To post a reply.
5 Replies
LS
Lingaraj S
Syncfusion Team
January 26, 2010 09:31 AM UTC
Hi Ruslan,
Thank you for your interest in Syncfusion products.
If you want to prevent the selection in GridGroupingControl, then please try using Cancel property in SelectionChanging event to
achieve your requirement.
Please let me know if you have any queries.
Regards,
Lingaraj S.
Thank you for your interest in Syncfusion products.
If you want to prevent the selection in GridGroupingControl, then please try using Cancel property in SelectionChanging event to
achieve your requirement.
this.gridGroupingControl1.SelectedRecordsChanging += new
SelectedRecordsChangedEventHandler(gridGroupingControl1_SelectedRecordsChanging);
void gridGroupingControl1_SelectedRecordsChanging(object sender, SelectedRecordsChangedEventArgs e)
{
// try using your conditional statements here
{
e.Cancel = true;
}
}
Please let me know if you have any queries.
Regards,
Lingaraj S.
RG
Ruslan Gasanbekov
January 26, 2010 12:44 PM UTC
Hi,
I tried to do it,but it doesn't work.
After canceling this event, the cursor on the listbox is moved to the new selected record (which is the current record), and the old selected record is marked (see attachment).
Cancling this event only prevent the SelectedRecordChanged event to occour.
Is there any other way to cancel the user selection?
example_87fd35ba.rar
I tried to do it,but it doesn't work.
After canceling this event, the cursor on the listbox is moved to the new selected record (which is the current record), and the old selected record is marked (see attachment).
Cancling this event only prevent the SelectedRecordChanged event to occour.
Is there any other way to cancel the user selection?
example_87fd35ba.rar
LS
Lingaraj S
Syncfusion Team
January 27, 2010 12:26 PM UTC
Hi Ruslan,
Thank you for the update.
Please try using Cancel property in CurrentRecordContextChange when LeaveRecordCalled action called in GridGroupingControl as shown below.
Please let me know if you have any queries.
Regards,
Lingaraj S.
Thank you for the update.
Please try using Cancel property in CurrentRecordContextChange when LeaveRecordCalled action called in GridGroupingControl as shown below.
void gridGroupingControl1_CurrentRecordContextChange(object sender, CurrentRecordContextChangeEventArgs e)
{
switch (e.Action)
{
//other codes
case Syncfusion.Grouping.CurrentRecordAction.LeaveRecordCalled:
{
// Try using you conditional statements
{
e.Cancel = true;
}
}
break;
}
}
Please let me know if you have any queries.
Regards,
Lingaraj S.
RG
Ruslan Gasanbekov
February 1, 2010 10:06 AM UTC
Hi,
I tried to cancel only the LeaveRecordCalled action but it doesn't work - it doesn't cancel the selection of the new row.
Do you have a nother solution.
Thanks.
I tried to cancel only the LeaveRecordCalled action but it doesn't work - it doesn't cancel the selection of the new row.
Do you have a nother solution.
Thanks.
LS
Lingaraj S
Syncfusion Team
February 2, 2010 11:44 AM UTC
Hi Ruslan,
Thank you for the update.
Please try using CurrentRecordContextChange and SelectionChanging events in GridGroupingControl to achieve your requirement. Because SelectionChanging event is used to prevent the selection in GridGroupingControl and CurrentRecordContextChange is used to prevent the current record move in GridGroupingControl.
Please let me know if you have any queries.
Regards,
Lingaraj S.
Thank you for the update.
Please try using CurrentRecordContextChange and SelectionChanging events in GridGroupingControl to achieve your requirement. Because SelectionChanging event is used to prevent the selection in GridGroupingControl and CurrentRecordContextChange is used to prevent the current record move in GridGroupingControl.
Please let me know if you have any queries.
Regards,
Lingaraj S.
SIGN IN To post a reply.
- 5 Replies
- 2 Participants
-
RG Ruslan Gasanbekov
- Jan 25, 2010 09:09 AM UTC
- Feb 2, 2010 11:44 AM UTC