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.
Syncfusion Feedback

Are any way to do this ? ( filter columns in comboBox ) Image attached

Thread ID:

Created:

Updated:

Platform:

Replies:

132165 Aug 17,2017 05:57 PM UTC Oct 18,2017 06:47 AM UTC Windows Forms 3
loading
Tags: GridGroupingControl
Ricardo Esteban Veloz Granados
Asked On August 17, 2017 05:57 PM UTC

Are any way to filter columns in some ComboBox control ? I attach a image
I used multiColumnBox , but are any way to filter the control columns ?

Attachment: synqFusionQuestion_e3db8f48.rar

Mohanraj Gunasekaran [Syncfusion]
Replied On August 18, 2017 12:04 PM UTC

Hi Ricardo,   
   
Thanks for using Syncfusion product.   
   
We have analyzed your scenario and created the simple sample. In order to achieve this scenario, use the DropDownGrid cell type and add theGridGroupingControl in DropDownContainer. The GridGroupingControl have the support for filtering the values as per your requirement. Please refer the below code example,   
   
Code example   
//GridControl setting to make like a combobox   
this.gridControl1.RowCount = 1;   
this.gridControl1.ColCount = 1;   
this.gridControl1.ShowRowHeaders = false;   
this.gridControl1.ShowColumnHeaders = false;   
this.gridControl1.DefaultRowHeight = 20;   
this.gridControl1[1, 1].CellType = GridCellTypeName.DropDownGrid;   
   
GridCellRendererBase renderer = this.gridControl1.CellRenderers["DropDownGrid"];   
if (renderer is GridDropDownGridCellRenderer)   
{   
    GridDropDownGridCellRenderer dropdown = renderer asGridDropDownGridCellRenderer;   
    gridGrouping = new GridGroupingControl();   
    GridSettings();   
    gridGrouping.TableControl.DropDownContainerParent = dropdown.DropDownContainer;   
    //Add the GridGroupingControl in drop down container   
    dropdown.DropDownContainer.Controls.Add(gridGrouping);   
}   
   
//Enable the filtering support   
gridGrouping.TopLevelGroupOptions.ShowFilterBar = true;   
foreach (GridColumnDescriptor column in this.gridGrouping.TableDescriptor.Columns)   
{   
    column.AllowFilter = true;   
}   
   
Screenshot   
    
   
Sample link: DropDownGrid   
   
Please let us know if we misunderstood anything.   
   
Note:   
GridGroupingControl having two more filtering support. Please refer the below UG link,   
   
If you want to filter the value based on the typed value in FilterBarCelll, you can use the GridDynamicFilter. Please refer to the below UG link,   
   
Regards,   
Mohanraj G   
 


Ricardo Esteban Veloz Granados
Replied On October 17, 2017 05:25 PM UTC

Hello, I try the solution, but i have some questions, how i have de value from de record selected ?


Arulpriya Ramalingam [Syncfusion]
Replied On October 18, 2017 06:47 AM UTC

Hi Ricardo, 
 
Thanks for your update. 
 
In order to get the particular cell value of the selected records, the GetValue() method of Record can be used and the selected records can be retrieved by Record property of SelectedRecordsCollection. Please refer to the below code and sample, 
 
Code snippet 
 
//Record record = this.gridGrouping.Table.CurrentRecord; 
//OR 
//To get the selected records 
Record record = gridGrouping.Table.SelectedRecords[0].Record; 
if (record != null) 
{ 
    //To get the value of selected record 
    string value = record.GetValue("Name").ToString(); 
} 
 
 
Note: 
Please refer to the below KB to get all the selected records. 
 
Regards, 
Arulpriya 


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.

Warning Icon 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.Close Icon

;