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

FilterWindow.SetOptions.SelectedIndexChanged Event

2 Answers 62 Views
PivotGrid
This is a migrated thread and some comments may be shown as answers.
Warner
Top achievements
Rank 2
Warner asked on 10 Sep 2014, 04:20 PM
Our pivot grid is using OLAP settings bound to a data-cube.  I need to grab a handle on the SelectedIndexChanged event in the filter window's SetOptions; "Includes/Excludes".

I have tried the traditional mechanisms to wire the event during the FilterBox's Pre_Render event:

filterWindow.SetOptions.SelectedIndexChanged += SetOptions_SelectedIndexChanged;  

However, I can not get the event to fire.  Could I get some help?

2 Answers, 1 is accepted

Sort by
0
Warner
Top achievements
Rank 2
answered on 10 Sep 2014, 04:25 PM
As a follow up; I have set the AutoPostBack to true and interestingly enough that will fire, but the event I'm tying to will not.
0
Accepted
Angel Petrov
Telerik team
answered on 15 Sep 2014, 02:17 PM
Hi Warner,

I have to say that the behavior experienced is expected. The PreRender event is not suitable for attaching event handlers as it is fired too late. Moreover setting the AutoPostBack property of the RadioButtonList to true will cause a postback after selection and will close the filter window thus preventing the user from changing the filter criteria.

Considering the aforementioned I recommend capturing the event on the client. This can be achieved by modifying the logic as demonstrated below.

C#:
filterWindow.SetOptions.Attributes.Add("onclick", "optionClick(this,event);");

JavaScript:
function optionClick(sender, args) {
                //execute code here
            }


Regards,
Angel Petrov
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
PivotGrid
Asked by
Warner
Top achievements
Rank 2
Answers by
Warner
Top achievements
Rank 2
Angel Petrov
Telerik team
Share this question
or