This is a migrated thread and some comments may be shown as answers.

Pivot Table : Filter Window menu item/ Label Filter header/ Field Setting Window header

11 Answers 50 Views
PivotGrid
This is a migrated thread and some comments may be shown as answers.
Shilpa
Top achievements
Rank 1
Shilpa asked on 13 Jul 2015, 01:23 PM
Hi

 

As shown in attachments:

1. Filter window:  As we have column in pivot table row fields (Restaurant name), we need with space only in the menu items of Filter Window (Needed : restaurant Name ,Currently showing is without space : restaurantname)

2. In Label Filter/Value Filter headers also we need same thing.

3. In Summarize by settings window header also we need same thing.

 

Currently its showing the name as in database column name

11 Answers, 1 is accepted

Sort by
0
Shilpa
Top achievements
Rank 1
answered on 16 Jul 2015, 09:23 AM

Hello team,

 

Please suggest on this.I need this very urgently.

 

Thanks

0
Viktor Tachev
Telerik team
answered on 16 Jul 2015, 12:20 PM
Hi Shilpa,

If you would like to change the text that is displayed next to the filter icon you can use the Caption property of the field.

Additionally, if you would like to change the text only visually you could use JavaScript and modify it. You can handle the OnMenuShown client-side event and implement the logic in it.


Regards,
Viktor Tachev
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Shilpa
Top achievements
Rank 1
answered on 16 Jul 2015, 03:32 PM

Hi Viktor,

Can you please provide the example of OnMenuShow event.

0
Shilpa
Top achievements
Rank 1
answered on 16 Jul 2015, 03:33 PM
And also will this be applicable for all three type of window pop ups
0
Shilpa
Top achievements
Rank 1
answered on 20 Jul 2015, 06:56 AM

Hi team,

 

please reply

 

Thanks

0
Viktor Tachev
Telerik team
answered on 21 Jul 2015, 07:44 AM
Hello Shilpa,

Actually the OnMenuShown would not be suitable because postback is performed when the filter icon is clicked. You can use the PivotGridCreated event in order to change the text in the popup.

<ClientSettings>
    <ClientEvents OnPivotGridCreated="pivotCreated" />
</ClientSettings>


function pivotCreated(sender, args) {
    var spanElement;
    var windowTitle;
 
    if (sender.get_filterDialog()) {
        spanElement = $telerik.$(".rmRootLink.rmDisabled .rmText");
        spanElement.html(spanElement.html().replace(/([A-Z])/g, ' $1'));
    }
}



Regards,
Viktor Tachev
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Shilpa
Top achievements
Rank 1
answered on 22 Jul 2015, 09:59 AM

thanks for reply Viktor

The code you provided is adding space. 

Actually we want to replace the column names with name as shown in pivot table(i used caption feild to replace the name in table), please find attached image

 

Please reply at earliest.

0
Viktor Tachev
Telerik team
answered on 24 Jul 2015, 11:40 AM
Hi Shilpa,

If you would like to change the FieldName text in the filter dialog you can use similar logic like before. However, instead of adding spaces to the text you should analyze the value and put the necessary replacement text.


Regards,
Viktor Tachev
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Praveen
Top achievements
Rank 1
answered on 28 Sep 2015, 10:16 AM

Hi Viktor,

The above sample code provided by you helped me a lot.

Is there any way to access header for Summarize by Settings/Value Filter as per my findings no css class is present for that.

 

Thanks in advance

0
Praveen
Top achievements
Rank 1
answered on 30 Sep 2015, 11:37 AM

Hi team,

 

Please update we need this urgently.We tried below code on function pivotCreating:

if (sender.get_fieldSettingsWindow()) {
                var pivotGrid = $find("<%=RadPivotGrid1.ClientID%>");
                pivotGrid.get_fieldSettingsWindow().set_title("abc");
            }

But its not working also we tried 

  $find("<%=RadPivotGrid1.ClientID%>").get_fieldSettingsWindow().set_title("abc"); on function pageLoad()

But its not working.

 ‚Äč

 

0
Viktor Tachev
Telerik team
answered on 30 Sep 2015, 01:58 PM
Hello,

In order to change the text in the header of the setting window you can use the following selector.

$telerik.$(".rwTitlebarControls em").html("your custom text")


Regards,
Viktor Tachev
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
PivotGrid
Asked by
Shilpa
Top achievements
Rank 1
Answers by
Shilpa
Top achievements
Rank 1
Viktor Tachev
Telerik team
Praveen
Top achievements
Rank 1
Share this question
or