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. Image for the cookie policy date

Excel-Filter same Items in Selectionlist

Hello,

I have a problem with an Excel-Filter. I use Entity Framework.

I load my GGC with vehicleBindingSource.DataSource = VehicleService.GetAllVehicles();

and I have the columns where I replace my CountryId, RegistrationOfficeId with the realname.
countries = VehicleService.GetAllCountries();
registrationOffice = VehicleService.GetAllRegistrationOffice();

I configure the columns
gridGroupingControlVehicle.TableDescriptor.Columns["GlobalRegistrationOfficeId"].HeaderText = "Zulassungsstelle";
gridGroupingControlVehicle.TableDescriptor.Columns["GlobalRegistrationOfficeId"].Width = 120;
gridGroupingControlVehicle.TableDescriptor.Columns["GlobalRegistrationOfficeId"].Appearance.AnyRecordFieldCell.CellType = GridCellTypeName.GridListControl;
gridGroupingControlVehicle.TableDescriptor.Columns["GlobalRegistrationOfficeId"].Appearance.AnyRecordFieldCell.DataSource = registrationOffice;
gridGroupingControlVehicle.TableDescriptor.Columns["GlobalRegistrationOfficeId"].Appearance.AnyRecordFieldCell.DisplayMember = "Name";
gridGroupingControlVehicle.TableDescriptor.Columns["GlobalRegistrationOfficeId"].Appearance.AnyRecordFieldCell.ValueMember = "RegistrationOfficeId";
gridGroupingControlVehicle.TableDescriptor.Columns["GlobalRegistrationOfficeId"].Appearance.AnyRecordFieldCell.ShowButtons = GridShowButtons.Hide;
gridGroupingControlVehicle.TableDescriptor.Columns["GlobalCountryId"].HeaderText = "Land";
gridGroupingControlVehicle.TableDescriptor.Columns["GlobalCountryId"].Width = 100;
gridGroupingControlVehicle.TableDescriptor.Columns["GlobalCountryId"].Appearance.AnyRecordFieldCell.CellType = GridCellTypeName.GridListControl;
gridGroupingControlVehicle.TableDescriptor.Columns["GlobalCountryId"].Appearance.AnyRecordFieldCell.DataSource = countries;
gridGroupingControlVehicle.TableDescriptor.Columns["GlobalCountryId"].Appearance.AnyRecordFieldCell.DisplayMember = "CountryName";
gridGroupingControlVehicle.TableDescriptor.Columns["GlobalCountryId"].Appearance.AnyRecordFieldCell.ValueMember = "CountryId";
gridGroupingControlVehicle.TableDescriptor.Columns["GlobalCountryId"].Appearance.AnyRecordFieldCell.ShowButtons = GridShowButtons.Hide;

everything is OK.

I configure the Excel-Filter
GridExcelFilter excelFilter = new GridExcelFilter();
excelFilter.WireGrid(gridGroupingControlVehicle);
excelFilter.AllowSearch = false;

foreach (GridColumnDescriptor column in gridGroupingControlVehicle.TableDescriptor.Columns)
{
   column.AllowFilter = true;
}

The filter works in all columns, expect in this columns where I have a GridListControl. When i click the first time for example on column "Zulassungsstelle" (Filter OK.png) - all ok. But when I click on an filter in a other column ("Land", Filter wrong.png). I get the same items as in the first column???? When I restart the app and change and click at first on the columns "Land" (Filter ok 2.png) - all OK. But when I click on the column "Zulassungsstelle" i get the same items as in the column "Land"???


2. Question
I would like to translate the Excel-Filter in German. But I can find all variables. For example the Submenu in Textfilters.

3. Question
How is it possible to change the color from the Down-Arrow (white) in Black in a ComboBoxAdv (Metro-Style). I can change the Background-Color but not the Arrow?.

Thanks for your support
BR Thomas



Attachment: GGC_Picture_c69ac967.zip

4 Replies

MG Mohanraj Gunasekaran Syncfusion Team January 20, 2017 11:32 AM UTC

Hi Thomas, 

Thanks for using Syncfusion products. 

Please find your responses in below table 
 
The filter works in all columns, expect in this columns where I have a GridListControl. When i click the first time for example on column "Zulassungsstelle" (Filter OK.png) - all ok. But when I click on an filter in a other column ("Land", Filter wrong.png). I get the same items as in the first column???? When I restart the app and change and click at first on the columns "Land" (Filter ok 2.png) - all OK. But when I click on the column "Zulassungsstelle" i get the same items as in the column "Land"??? 





We have created a new incident for this query and updated the response through the incident. Please follow up with that incident using your direct-track login 

I would like to translate the Excel-Filter in German. But I can find all variables. For example the Submenu in Textfilters. 

In order to localize the ExcelFilter dropdown, you can use the ILocalizationProvider and Localization.Provider property. Please refer the below code snippet and refer the dashboard sample from below location, 

Code snippet 
class Localizer : ILocalizationProvider 
{ 
    public void getstring(bool s, bool recordNavig, bool office2007, bool fieldChooser) 
    { 
 
    } 
 
    public string GetLocalizedString(System.Globalization.CultureInfo culture, string name,object obj) 
    { 
     
    } 
} 
public partial class Form1 : Form 
{ 
    Localizer loc = new Localizer(); 
    loc.getstring(checkBox5.Checked, checkBox8.Checked, checkBox6.Checked, checkBox7.Checked); 
    LocalizationProvider.Provider = loc; 


Sample link: <Install Location>\Syncfusion\EssentialStudio\[Version Number]\Windows\Grid.Grouping.Windows\Samples\Localization Samples\Localization Demo 

Screenshot 
 

 

How is it possible to change the color from the Down-Arrow (white) in Black in a ComboBoxAdv (Metro-Style). I can change the Background-Color but not the Arrow?. 
 
By default, arrow image has loaded in ComboBox drop down button. If you want to customize the drop down arrow, you can use Cancel property in TableControlDrawCellButtonBackground event. Please refer the below code snippet and refer the attached sample, 
 
Code snippet 
this.gridGroupingControl1.TableControlDrawCellButtonBackground += new GridTableControlDrawCellButtonBackgroundEventHandler(gridGroupingControl1_TableControlDrawCellButtonBackground); 

void gridGroupingControl1_TableControlDrawCellButtonBackground(object sender, GridTableControlDrawCellButtonBackgroundEventArgs e) 
    if (e.Inner.Style.CellType == GridCellTypeName.ComboBox) 
    { 
        ThemedComboBoxDrawing.DropDownState btnState = ThemedComboBoxDrawing.DropDownState.Normal; 
        int rowIndex = e.Inner.Style.CellIdentity.RowIndex; 
        int colIndex = e.Inner.Style.CellIdentity.ColIndex; 
 
        bool isHovering = e.Inner.Button.IsHovering(rowIndex, colIndex); 
        bool isMouseDown = e.Inner.Button.IsMouseDown(rowIndex, colIndex); 
 
        bool disabled = !e.Inner.Style.Clickable; 
 
        if (disabled) 
        { 
            btnState = ThemedComboBoxDrawing.DropDownState.Disabled; 
        } 
        else if (isMouseDown) 
        { 
            btnState = ThemedComboBoxDrawing.DropDownState.Pressed; 
        } 
        else if (isHovering) 
        { 
            btnState = ThemedComboBoxDrawing.DropDownState.Hot; 
        } 
 
        //Customize the ComboBox Button.    
        this.gridGroupingControl1.TableModel.Options.GridVisualStylesDrawing.DrawComboBoxStyle(e.Inner.Graphics, e.Inner.Button.Bounds, btnState, Color.Gray); 
        Bitmap bitmap = new Bitmap(@"..\..\dropdownarrow.png"); 
 
        //Customize the icon of ComboBox. 
        iconPaint.PaintIcon(e.Inner.Graphics, e.Inner.Button.Bounds, Point.Empty, bitmap, Color.Black); 
        e.Inner.Cancel = true
    } 


Sample link:  GridGroupingControl 



Regards, 
Mohanraj G 



TH Thomas January 21, 2017 09:52 AM UTC

Hello,

ok, I think I have all fields translated - thanks. Shame on me - I have not tried the Office2007-Filter.
One Problem. The German translation for "Cancel" is "Abbrechen". But when I open the Excel-Filter the button for Cancel show only "Abbreche" - the last letter ist cut off.

                case DynamicFilterResourceIdentifiers.Office2007FilterCancel:
                    return "Abbrechen";

This translation is OK:

                case DynamicFilterResourceIdentifiers.CustomAutoFilterCancel:
                    return "Abbrechen";

BR Thomas


TH Thomas January 21, 2017 09:57 AM UTC

Hi,

is it possible to change the color for the Excel-Filter (Buttons, Header)? I use in my App Steelblue?

BR Thomas


MG Mohanraj Gunasekaran Syncfusion Team January 23, 2017 11:18 AM UTC

Hi Thomas, 

Thanks for your update, 

Please find your responses in below table, 

The German translation for "Cancel" is "Abbrechen". But when I open the Excel-Filter the button for Cancel show only "Abbreche" - the last letter ist cut off. 


In our GridGroupingControl architecture, we do not have the support to customize the excel filter popup (button, header) also we do not have the support to change the excel filter ok and cancel button sizes. So we have logged the feature report for these cases which will be available in any of our main release. 
is it possible to change the color for the Excel-Filter (Buttons, Header)? I use in my App Steelblue? 

Please let us know, if you have any further assistance. 

Regards, 
Mohanraj G. 


Loader.
Up arrow icon