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.

Reg: GridGroupingControl

Thread ID:

Created:

Updated:

Platform:

Replies:

32755 Aug 8,2005 04:10 AM Aug 9,2005 11:18 AM Windows Forms 12
loading
Tags: GridControl
Anna Srinivasan
Asked On August 8, 2005 04:10 AM

Hi, The Following example i am using for selection of row using click and drag. My Req: Q1: Assume i have selected 5 records. How do i remove the selection using click and drag. [If u click and drag , I want functionality like checked cols change into unchecked cols and unchecked cols change into checked cols.] Is it possible...? Click&DragGGC_SelectCheckBox_ecbd9706_2624.zip

Anna Srinivasan
Replied On August 8, 2005 04:12 AM

and also If user press Ctl+A, I need to select(checked) all the rows which present in the grid. Thanks, Anna

Administrator [Syncfusion]
Replied On August 8, 2005 04:48 AM

Here is a thread on the Ctl+A. http://www.syncfusion.com/Support/Forums/message.aspx?MessageID=30516 On the drag and drop question, where do you want your user to drop the rows? Would it be more intuitive to have a "Toggle Selections" context menu item than to try to flip selections using drag & drop. If you want to use drag and drop, you will have to catch the DragDrop event on the target object (that is why I asked where you wanted to drop the rows). At that point, you would iterate through the records changing the values.

Anna Srinivasan
Replied On August 8, 2005 05:14 AM

Hi, I think u dint get my question. My question is.....: On the grid If u click and drag Checkbox cols gets selected. If check box already selected i want remove the check mark.{Not rows} Anna

Administrator [Syncfusion]
Replied On August 8, 2005 05:53 AM

You can try this code.
private void gridGroupingControl1_SelectedRecordsChanged(object sender, SelectedRecordsChangedEventArgs e)
{
	if(e.SelectedRecord != null)
	{
		lastRecord = e.SelectedRecord.Record;
		lastValue = e.SelectedRecord.Record.GetValue("boolCol");
		if(lastValue == null || lastValue.ToString().Length == 0)
		{
			e.SelectedRecord.Record.SetValue("boolCol", true);
		}
		else
		{
			e.SelectedRecord.Record.SetValue("boolCol", !(bool)lastValue);
		}
	}
}

Anna Srinivasan
Replied On August 8, 2005 10:40 AM

Hi, Codes are working fine....No issue. And one more question.Is it possible to remove the selection backcolor. I dont want any selection backcolor...! Any idea....!

Administrator [Syncfusion]
Replied On August 8, 2005 10:54 AM

Try setting alpha channel of the selection color to zero: this.gridControl1.AlphaBlendSelectionColor = Color.FromArgb(0, Color.Red);

Anna Srinivasan
Replied On August 9, 2005 12:09 AM

Hi, I am not using gridcontrol.I am using gridgrouping control. How do i apply the following code to gridgrouping control. this.gridControl1.AlphaBlendSelectionColor = Color.FromArgb(0, Color.Red); Anna

Administrator [Syncfusion]
Replied On August 9, 2005 04:55 AM

Try: this.gridGroupingControl1.TableOptions.SelectionBackColor = Color.FromArgb(0, Color.Red);

Anna Srinivasan
Replied On August 9, 2005 07:37 AM

hi, If i click check box or click and drag. the grid values disappear and i u change the focus it is appear. Ho do i solve this problem. Click&DragGGC_SelectCheckBox_ecbd9706_4531.zip

Administrator [Syncfusion]
Replied On August 9, 2005 09:51 AM

I think what you want is not to select records, but to select cells. Here is your sample modified to do this. You can select a range of ckecboxes, and then clcik the check to set all the selected checkboxes with one click. http://www.syncfusion.com/Support/user/uploads/GGC_SelectCheckBox_ecdfd005.zip

Anna Srinivasan
Replied On August 9, 2005 10:23 AM

Sorry, Clay What i am coming to say is, In my example what i am expecting is working fine. My question is, I dont want to see the appear and disappear thinks. Any have the values are coming back.But still i dont want see the like painting problem. Anna Click&DragGGC_SelectCheckBox_ecbd9706_6319.zip

Administrator [Syncfusion]
Replied On August 9, 2005 11:18 AM

I do not know what painting problem you are talking about. Can you upload a screen shot showing the painting problem? The only thing I see that is odd is if you click any cell in the row, the checkbox changes. The reason the checkbox changes when you click a cell is that you are selecting rows. And you have code that says when a row gets selected to flip its bool value. So the value gets flipped. The only solution I know to this problme is not to select rows, but to select cells. And that is what the sample I sent you does.

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.

;