AS
Anna Srinivasan
August 8, 2005 08:12 AM UTC
and also If user press Ctl+A, I need to select(checked) all the rows which present in the grid.
Thanks, Anna
AD
Administrator
Syncfusion Team
August 8, 2005 08:48 AM UTC
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.
AS
Anna Srinivasan
August 8, 2005 09:14 AM UTC
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
AD
Administrator
Syncfusion Team
August 8, 2005 09:53 AM UTC
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);
}
}
}
AS
Anna Srinivasan
August 8, 2005 02:40 PM UTC
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....!
AD
Administrator
Syncfusion Team
August 8, 2005 02:54 PM UTC
Try setting alpha channel of the selection color to zero:
this.gridControl1.AlphaBlendSelectionColor = Color.FromArgb(0, Color.Red);
AS
Anna Srinivasan
August 9, 2005 04:09 AM UTC
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
AD
Administrator
Syncfusion Team
August 9, 2005 08:55 AM UTC
Try:
this.gridGroupingControl1.TableOptions.SelectionBackColor = Color.FromArgb(0, Color.Red);
AS
Anna Srinivasan
August 9, 2005 11:37 AM UTC
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
AD
Administrator
Syncfusion Team
August 9, 2005 01:51 PM UTC
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
AS
Anna Srinivasan
August 9, 2005 02:23 PM UTC
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
AD
Administrator
Syncfusion Team
August 9, 2005 03:18 PM UTC
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.