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.

Accessing cell content (value) in TableControlCheckBoxClick event

Thread ID:

Created:

Updated:

Platform:

Replies:

63639 Jul 6,2007 06:44 AM May 10,2012 05:48 AM Windows Forms 5
loading
Tags: Grouping
Paul Sullivan
Asked On July 6, 2007 06:44 AM

Hi,
I have an unbound column of checkboxes in GGC. In the above Event I'm trying to access the contents of the cell (to evaluate whether the check box has just been checked or unchecked) and the record's Primary key field (so i can update the underlying Hash table).

How do I do this? Sounds like it should be obvious but it isn't.

N.B. The reason i am having to do this in the click event is because the unboundField_SaveValue event does not fire until after the cell has lost focus. So, in my example, if the user clicks on one check box and I want to react to that by e.g. enabling a button somewhere then they have to click somewhere else omn the grid before the SaveValue event will fire. Maybe there is a better workaround?

haneefm [Syncfusion]
Replied On July 6, 2007 11:32 AM

Hi Paul,

Below is a KB article that shows you "How do I have an unbound checkbox column in a GridGroupingControl?".
http://www.syncfusion.com/support/kb/grid/Default.aspx?ToDo=view&questId=293

Best regards,
Haneef

Paul Sullivan
Replied On July 6, 2007 04:35 PM

Haneef,
I have already implemented the check box column. Specifically the problem is with the SaveValue event not firing until the cell loses focus, rather than when the celvalue changes. Is there a workaround for that e.g. forcing the loss of focus on the cell?

haneefm [Syncfusion]
Replied On July 6, 2007 05:30 PM

Hi Paul,

Try calling the RaiseSaveValue method to fire the SaveValue event in a grid.Below are the code snippet

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

Best regards,
Haneef

Thulasi Ram Lingalugari
Replied On April 26, 2012 04:23 PM

Hi, we are facing an issue on firing button click event after cell edit. we are displaying a message eg: Message1, on cell lost focus event and there is a BUTTON outside grid and on click of this, another message will be displayed eg: Message2. Now if user edits the value in a cell and click on the BUTTON directly outside the grid, first cell lost focus event fires and so is displays Message1, but it is not firing BUTTON click event. After finishing cell focus event functionality, focus is on the BUTTON, but BUTTON click event is not firing. we have tried putting Grid.currentcell.endedit(); in button click event, still no luck. please let us know if there is any fix/workaround for this.

thanks,
Ram



Ragamathulla B [Syncfusion]
Replied On May 10, 2012 05:48 AM

Hi Ram,

Thank you for your interest in syncfusion products,

You can resolve this issue manually by using GotFocus event. Pleaser refer the following code.

bool butval = false;

void button1_GotFocus(object sender, EventArgs e)

{

ButtonBase but = sender as ButtonBase;

if ((but != null) && ! butval)

{

button1.PerformClick();

butval = true;

}

}

Please refer to the following attached sample which illustrates the same.

Let me know if you have any further concerns.

Regards,

Ragamathullah B.



CS_ad9fef9a.zip

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.

;