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.
Syncfusion Feedback

Force a row select

Thread ID:

Created:

Updated:

Platform:

Replies:

64237 Jul 17,2007 10:57 AM UTC Jul 18,2007 07:30 PM UTC Windows Forms 1
loading
Tags: Grouping
Paul Sullivan
Asked On July 17, 2007 10:57 AM UTC

In relation to the following KB article
http://www.syncfusion.com/Support/forums/message.aspx?&MessageID=63639

If I have an unbound checkbox column, the user clicks a check box in a row which is not the CURRENT row and in the GGC_TableControlCheckBoxClick event I want to create a record object for the appropriate row before forcing a RaiseSaveValue to reflect the check box selection e.g.
Record rec=e.TableControl.Table.CurrentRecord;
FieldValueEventArgs fArg=new FieldValueEventArgs(e.TableControl.TableDescriptor.Fields["Resubmit"], rec, false); e.TableControl.TableDescriptor.RaiseSaveValue(fArg);

The problem here is that e.TableControl.Table.CurrentRecord gives the SELECTED grid row (if there even is one), not the row for the selected check box. How do I force the current row to be the one for the selected checkbox.

To be honest if anyone has a better approach for IMMEDIATELY reflecting check box column changes in the grid (i.e. when it is clicked, not later when the cell has lost focus) I would love to see it. I am loathe to implement the forcing of event handlers in code.

Rajagopal [Syncfusion]
Replied On July 18, 2007 07:30 PM UTC

Hi Paul,

You could get the record object of the clicked checkbox in the TableControlCheckBoxClick event by using the following code snippets.

private void gridGroupingControl1_TableControlCheckBoxClick(object sender, GridTableControlCellClickEventArgs e)
{
Record rec = e.TableControl.Table.DisplayElements[e.Inner.RowIndex].ParentRecord;
FieldValueEventArgs fArg=new FieldValueEventArgs(e.TableControl.TableDescriptor.Fields["Resubmit"], rec, false); e.TableControl.TableDescriptor.RaiseSaveValue(fArg);
}

Have a nice time.
Regards,
Rajagopal

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.

Warning Icon 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.Close Icon

;