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

Modify the entries of the filter (Custom, Empty, Starts with etc.) manually

Hello,

ist it possible to modify the entries of the filter (Custom, Empty, Starts with etc.) manually or to change language of entries?

Best regards
Frank

9 Replies

NK Neelakandan Kannan Syncfusion Team December 11, 2014 07:40 AM UTC

Hi Frank,

 

Thank you for your interest in Syncfusion products.

 

We would like to let you know that we have already the Dashboard sample for localization(Filterbar CompareOperator and Custom,All,Empty). So that you can make use of the below sample,

 

UG link:

http://help.syncfusion.com/ug/windows%20forms/Documents/localizationsupportf.htm

 

Sample:

<Installation Location>\Syncfusion\EssentialStudio\<Product Version>\Windows\Grid.Grouping.Windows\Samples\Localization Samples\Localization Demo\

 

Please let me know if you have any concerns.

 

Regards,

Neelakandan



FP Frank Piplak December 11, 2014 03:52 PM UTC

Hello Neelakandan,

I've looked at the example, it looks very complex and seems complicated to me.
Is it really the only way, to change the text of an entry from for example 'Ends With ...' to 'Endet mit...'?

Best regards,
Frank




NK Neelakandan Kannan Syncfusion Team December 15, 2014 06:19 AM UTC

Hi Frank,

 

Thank you for your update.

 

The reported scenario can be achieved by customizing the localization class for FilterBar. And it is the best way to customize the language in FilterBar choices(both dropdown and CompareOperator).  Moreover you can simply change the text in dropdown list using TableControlCurrentCellShowingDropDown event. By using this event, you can customize the FilterBar dropdown item’s text. Please ensure that customization of FilterBar dropdown(Localization) need to be handled by customizing the GetLocalizedString method. Please find the attached sample,

 

Code Snippet:

this.gridGroupingControl1.TableControlCurrentCellShowingDropDown += new GridTableControlCurrentCellShowingDropDownEventHandler(gridGroupingControl1_TableControlCurrentCellShowingDropDown);

 

void gridGroupingControl1_TableControlCurrentCellShowingDropDown(object sender, GridTableControlCurrentCellShowingDropDownEventArgs e)

{

GridCurrentCell cc = e.TableControl.CurrentCell;

if (cc.Renderer is GridTableFilterBarExtCellRenderer)

{

GridTableFilterBarExtCellRenderer filter = cc.Renderer as GridTableFilterBarExtCellRenderer;

//Customization of compareOperator Dropdown

if (filter.ListBoxPart.Items.Contains("Starts With..."))

{

//specify your needed item to be renamed

filter.ListBoxPart.Items[0] = "Renamed_Starts_With";

filter.ListBoxPart.SelectedValue = "Renamed_Starts_With";

}

//Customization of filterbar Dropdown items

if (filter.ListBoxPart.Items.Contains("(All)"))

{

//Specify your needed items to be renamed

filter.ListBoxPart.Items[0] = "Renamed_All";

filter.ListBoxPart.Items[1] = "Renamed_Custom";

filter.ListBoxPart.Items[2] = "Renamed_Empty";

}

}

}

 

Please let me know if you have any concerns.

 

Regards,

Neelakandan


Attachment: GridGroupingControl_Demo_3530571f.zip


FP Frank Piplak December 15, 2014 09:01 AM UTC

Hello,
thanks for your answer.
Sorry but I don't know, how to use it in VB.
Regards,
Frank


NK Neelakandan Kannan Syncfusion Team December 16, 2014 04:51 AM UTC

Hi Frank,

 

Regret for the inconvenience caused.

 

Please find the attached sample in VB. And please make use of below code,

 

VB:

AddHandler Me.gridGroupingControl1.TableControlCurrentCellShowingDropDown, AddressOf Me.gridGroupingControl1_TableControlCurrentCellShowingDropDown
    
    
Private Sub gridGroupingControl1_TableControlCurrentCellShowingDropDown(ByVal sender As ObjectByVal As GridTableControlCurrentCellShowingDropDownEventArgs)
        
Dim cc As GridCurrentCell e.TableControl.CurrentCell
        
If (TypeOf cc.Renderer Is GridTableFilterBarExtCellRenderer) Then
            Dim 
filter As GridTableFilterBarExtCellRenderer = CType(cc.Renderer,GridTableFilterBarExtCellRenderer)
            
'Customization of compareOperator Dropdown
            
If filter.ListBoxPart.Items.Contains("Starts With..."Then
                
'specify your needed item to be renamed
                
filter.ListBoxPart.Items(0"Renamed_Starts_With"
                
filter.ListBoxPart.SelectedValue "Renamed_Starts_With"
            
End If
            
'Customization of filterbar Dropdown items
            
If filter.ListBoxPart.Items.Contains("(All)"Then
                
'Specify your needed items to be renamed
                
filter.ListBoxPart.Items(0"Renamed_All"
                
filter.ListBoxPart.Items(1"Renamed_Custom"
                
filter.ListBoxPart.Items(2"Renamed_Empty"
            
End If
        End If
    End Sub

 

Please let me know if you have any concerns.

 

Regards,

Neelakandan


Attachment: Sample_VB_29ea9154.zip


FP Frank Piplak December 16, 2014 04:56 PM UTC

Hello Neelakandan,

works, thanks for your support.

But I mean the theme 'filter' is perhaps improvable.

Best Regards,
Frank


NK Neelakandan Kannan Syncfusion Team December 17, 2014 05:10 AM UTC

Hi Frank,

 

Thank you for your update.

 

We are glad to hear from you that your reported scenario has been achieved.

 

We analyzed your query with “filterbar theme”. For this, Please create a DT incident for your query so that we can update the further details regarding enhancement.

 

You can create the DT incident from the following link.

http://www.syncfusion.com/account/dashboard

 

Please let me know if you have any concerns.

 

Regards,

Neelakandan



FP Frank Piplak January 3, 2015 03:41 PM UTC

Hello Neelakandan,

after renamed the ListBoxPart.Items, the filter works not correct!?

Regards,
Frank


NK Neelakandan Kannan Syncfusion Team January 5, 2015 10:57 AM UTC

Hi Frank,

Thank you for your update.

We regret to let you know that we could not able to clearly understand your query. So that we need some more details regarding your scenario. Please provide us details regarding issue with replication procedure or screenshot. It would be more helpful for us to provide better solution as soon as possible.

Note:

Please ensure that the correct implementation for displaying the string(Localization language) in Dynamic FilterBar is using Localization class customization. In our previous update, we have provided the sample customization to show the customized items in dropdown list.

Please let me know if you have any concerns.

Regards,

Neelakandan



Loader.
Live Chat Icon For mobile
Up arrow icon