Unable to add CheckBox to First Column in GDBGTreeLines Grid
Hi,
I would like to add a checkbox to the first column in GDGBG Tree lines Grid.
I am appending a small dummy sample in which I was trying add a checkbox to the first column.
Checkbox will work for any column index except the first one.
Thanks,
Raul Dsouza
SyncGrid.zip
I would like to add a checkbox to the first column in GDGBG Tree lines Grid.
I am appending a small dummy sample in which I was trying add a checkbox to the first column.
Checkbox will work for any column index except the first one.
Thanks,
Raul Dsouza
SyncGrid.zip
SIGN IN To post a reply.
9 Replies
AD
Administrator
Syncfusion Team
April 2, 2008 11:59 PM UTC
Hi Raul,
Thank you for your interest in Syncfusion products.
To Solve this issue You need to handle QueryCellInfo event to set the CellType of the first column as checkbox and QueryColWidth to set the width of the first column. Please refer the code below for more details.
Here is the modified sample that implements this task.
http://websamples.syncfusion.com/samples/Grid.Windows/F72727/main.htm
Please let me know if this helps.
Best Regards,
Srirajan
Thank you for your interest in Syncfusion products.
To Solve this issue You need to handle QueryCellInfo event to set the CellType of the first column as checkbox and QueryColWidth to set the width of the first column. Please refer the code below for more details.
void Model_QueryColWidth(object sender, GridRowColSizeEventArgs e)
{
if (e.Index == 1)
{
e.Handled = true;
e.Size = 20;
}
}
void dgrd_PrepareViewStyleInfo(object sender, GridPrepareViewStyleInfoEventArgs e)
{
if (e.ColIndex == 1)
{
Console.WriteLine(e.Style.CellType);
e.Style.CellType = "CheckBox";
e.Style.CellValue = true;
}
}
Here is the modified sample that implements this task.
http://websamples.syncfusion.com/samples/Grid.Windows/F72727/main.htm
Please let me know if this helps.
Best Regards,
Srirajan
RD
Raul D''souza
April 3, 2008 06:45 AM UTC
I tried using the code appended by you...still I do not get the desrired checkbox in the first column.
Also I downloaded the web samples (SyncGrid.zip) that was appended, that too didn;t contain the checkbox in the first column.
Raul D'souza
Also I downloaded the web samples (SyncGrid.zip) that was appended, that too didn;t contain the checkbox in the first column.
Raul D'souza
AD
Administrator
Syncfusion Team
April 4, 2008 01:21 AM UTC
Hi Raul,
Sorry for the inconvenience caused. Here is the modified sample that implements this task.
http://websamples.syncfusion.com/samples/Grid.Windows/I72727Apr04/main.htm
Please let me know if you have any further questions.
Best Regards,
Srirajan
Sorry for the inconvenience caused. Here is the modified sample that implements this task.
http://websamples.syncfusion.com/samples/Grid.Windows/I72727Apr04/main.htm
Please let me know if you have any further questions.
Best Regards,
Srirajan
RA
Raul
April 7, 2008 07:37 AM UTC
Hi,
Now the checkBox column shows, however
1> The one highlighted in red, does not check , uncheck upon clicking it.
2>The other checkbox column thorws an exception "Column 'Key" is constrained to be unique. Value 'True" is already Present" when I try to check all the three columns.
--Raul
Now the checkBox column shows, however
1> The one highlighted in red, does not check , uncheck upon clicking it.
2>The other checkbox column thorws an exception "Column 'Key" is constrained to be unique. Value 'True" is already Present" when I try to check all the three columns.
--Raul
AD
Administrator
Syncfusion Team
April 8, 2008 12:28 AM UTC
Hi Raul,
Here is the modified sample which solves this issue.
http://websamples.syncfusion.com/samples/Grid.Windows/I72727Apr08/main.htm
Please let me know if this helps.
Best Regards,
Srirajan
Here is the modified sample which solves this issue.
http://websamples.syncfusion.com/samples/Grid.Windows/I72727Apr08/main.htm
Please let me know if this helps.
Best Regards,
Srirajan
RA
Raul
April 8, 2008 06:27 AM UTC
Now yr sample does not show any checkbox only...and also on clicking on the Plus (collapsed) sign...the sign remains Plus.
Kindly verify the results before posting it.
--Raul
Kindly verify the results before posting it.
--Raul
RA
Raul
April 10, 2008 07:39 AM UTC
Could I recieve a reply for this question please.
SR
Sri Rajan
Syncfusion Team
April 10, 2008 03:27 PM UTC
Hi Raul,
Sorry for the inconvenience caused. I am not sure what might causing this strange behaviour in your system. The attached sample works perfectly in my system. Here is the video clip that show this issue.
VideoClip
Sample:
http://websamples.syncfusion.com/samples/Grid.Windows/I72727Apr08/main.htm
Please let me know if you have any further questions.
Best Regards,
Srirajan
Sorry for the inconvenience caused. I am not sure what might causing this strange behaviour in your system. The attached sample works perfectly in my system. Here is the video clip that show this issue.
VideoClip
Sample:
http://websamples.syncfusion.com/samples/Grid.Windows/I72727Apr08/main.htm
Please let me know if you have any further questions.
Best Regards,
Srirajan
RA
Raul
April 11, 2008 09:40 AM UTC
Hi,
Thanks for yr reply, I am using Syncfusion Version 4.4.0.51 and VS 2005.
Do I need to upgrade my Syncfusion version.
Also could you let me know the cause of the problem.
Thanks,
Raul
Thanks for yr reply, I am using Syncfusion Version 4.4.0.51 and VS 2005.
Do I need to upgrade my Syncfusion version.
Also could you let me know the cause of the problem.
Thanks,
Raul
SIGN IN To post a reply.
- 9 Replies
- 5 Participants
-
RA Raul
- Apr 2, 2008 12:41 PM UTC
- Apr 11, 2008 09:40 AM UTC