How to embed CheckedListBox in GroupGridControl cell
Hi,
I need to embed CheckedListBox in GroupGridControl cell. Pls point to me some example
Thanks
-Kiran
I need to embed CheckedListBox in GroupGridControl cell. Pls point to me some example
Thanks
-Kiran
SIGN IN To post a reply.
5 Replies
RA
Rajagopal
Syncfusion Team
July 19, 2007 01:07 AM UTC
Hi Kiran,
Thanks for your interest in Syncfusion Products.
You need to create a custom celltype as in the below sample which is shipped with the browser samples.
\\Syncfusion\EssentialStudio\5.1\Windows\Grid.Windows\Samples\2.0\CustomCellTypes\DropDownFormAndUserControlSample
A custom CellType requires a model class and a renderer class. The model class handles the serialization requirements for the control and creates the renderer class. The renderer class handles the UI requirements of the cell.
For GridGroupingControl, custom celltypes has to be registered through TableModel.CellModels.Add function.
Refer this shipped sample for more details
\\Syncfusion\Essential Studio\5.1\windows\Grid.Grouping.Windows\Samples\FeatureSamples\CustomCellTypes
Here is a sample in GridGroupingControl with CheckedListBox cells.
http://www.syncfusion.com/Support/user/uploads/GGC_CustomCellType_9a3e118e.zip
Have a nice time.
Regards,
Rajagopal
Thanks for your interest in Syncfusion Products.
You need to create a custom celltype as in the below sample which is shipped with the browser samples.
\\Syncfusion\EssentialStudio\5.1\Windows\Grid.Windows\Samples\2.0\CustomCellTypes\DropDownFormAndUserControlSample
A custom CellType requires a model class and a renderer class. The model class handles the serialization requirements for the control and creates the renderer class. The renderer class handles the UI requirements of the cell.
For GridGroupingControl, custom celltypes has to be registered through TableModel.CellModels.Add function.
Refer this shipped sample for more details
\\Syncfusion\Essential Studio\5.1\windows\Grid.Grouping.Windows\Samples\FeatureSamples\CustomCellTypes
Here is a sample in GridGroupingControl with CheckedListBox cells.
http://www.syncfusion.com/Support/user/uploads/GGC_CustomCellType_9a3e118e.zip
Have a nice time.
Regards,
Rajagopal
KG
Kiran Guptha
July 19, 2007 04:21 PM UTC
Hi Rajgopal,
Thanks for the examples. How to avoide useng OK & Cancel buttons on the User control. If user changes & click outside I w ant to save the changes to cell.
DropDownContainerCloseDropDown(object sender, PopupClosedEventArgs e) e.PopupCloseType has canceled or deactivated. I tried setting
ControlValue = this.ddUser.GetValuesToString(); which doesn't work.
Pls let me know the work around
Thanks
-Kiran
Thanks for the examples. How to avoide useng OK & Cancel buttons on the User control. If user changes & click outside I w ant to save the changes to cell.
DropDownContainerCloseDropDown(object sender, PopupClosedEventArgs e) e.PopupCloseType has canceled or deactivated. I tried setting
ControlValue = this.ddUser.GetValuesToString(); which doesn't work.
Pls let me know the work around
Thanks
-Kiran
HA
haneefm
Syncfusion Team
July 19, 2007 11:12 PM UTC
Hi Kiran,
I have modified the above attached sample as per your requirement. Please refer the attached sample for implementation and let me know if this helps.
////Modified code in DropDownUserControl.cs
[c#]
protected override bool OnDeactivating()
{
// closethe dropdown with a Done setting
if (this.CurrentCell.IsDroppedDown)
{
this.CurrentCell.IsModified = true;
this.Grid.CurrentCell.CloseDropDown(Syncfusion.Windows.Forms.PopupCloseType.Done);
}
return base.OnDeactivating();
}
Sample :ModifiedGGC_CustomCellType.zip
Best regards,
Haneef
I have modified the above attached sample as per your requirement. Please refer the attached sample for implementation and let me know if this helps.
////Modified code in DropDownUserControl.cs
[c#]
protected override bool OnDeactivating()
{
// closethe dropdown with a Done setting
if (this.CurrentCell.IsDroppedDown)
{
this.CurrentCell.IsModified = true;
this.Grid.CurrentCell.CloseDropDown(Syncfusion.Windows.Forms.PopupCloseType.Done);
}
return base.OnDeactivating();
}
Sample :ModifiedGGC_CustomCellType.zip
Best regards,
Haneef
KG
Kiran Guptha
July 20, 2007 03:15 PM UTC
Hi Haneef,
Thaks for the reply. I found refresh issue with Tab button click when dropdown is open. Pls find the sample attached below.
Steps to reproduce
1. Click on the DropDown button in a cell
2. Do some selection changes
3. Click Tab. The Dropdown closes & the selection is not changed in the cell. Click Tab again the cell Refreshes.
I need a fix or workaround for this.
Pls let me know
Thanks
-Kiran
testLCB.zip
Thaks for the reply. I found refresh issue with Tab button click when dropdown is open. Pls find the sample attached below.
Steps to reproduce
1. Click on the DropDown button in a cell
2. Do some selection changes
3. Click Tab. The Dropdown closes & the selection is not changed in the cell. Click Tab again the cell Refreshes.
I need a fix or workaround for this.
Pls let me know
Thanks
-Kiran
testLCB.zip
HA
haneefm
Syncfusion Team
July 20, 2007 06:05 PM UTC
Hi Kiran,
You would probably have to set the celltext using GridModel in DropDownContainerCloseDropDown override method. You could use code such as:
public override void DropDownContainerCloseDropDown(object sender, PopupClosedEventArgs e)
{
if (e.PopupCloseType != PopupCloseType.Canceled)
{
if (this.NotifyCurrentCellChanging())
{
ControlValue = this.ddCtrl.GetValuesToString();
this.ControlText = ControlValue.ToString();
this.Grid.Model[RowIndex, ColIndex].Text = this.ControlText;
this.NotifyCurrentCellChanged();
Grid.InvalidateRange(GridRangeInfo.Cell(RowIndex, ColIndex), GridRangeOptions.MergeCoveredCells); // Merge all cells
}
}
base.DropDownContainerCloseDropDown(sender, e);
}
Best regards,
Haneef
You would probably have to set the celltext using GridModel in DropDownContainerCloseDropDown override method. You could use code such as:
public override void DropDownContainerCloseDropDown(object sender, PopupClosedEventArgs e)
{
if (e.PopupCloseType != PopupCloseType.Canceled)
{
if (this.NotifyCurrentCellChanging())
{
ControlValue = this.ddCtrl.GetValuesToString();
this.ControlText = ControlValue.ToString();
this.Grid.Model[RowIndex, ColIndex].Text = this.ControlText;
this.NotifyCurrentCellChanged();
Grid.InvalidateRange(GridRangeInfo.Cell(RowIndex, ColIndex), GridRangeOptions.MergeCoveredCells); // Merge all cells
}
}
base.DropDownContainerCloseDropDown(sender, e);
}
Best regards,
Haneef
SIGN IN To post a reply.
- 5 Replies
- 3 Participants
-
KG Kiran Guptha
- Jul 18, 2007 07:44 PM UTC
- Jul 20, 2007 06:05 PM UTC