Hi,
RadGrid Grid - Excel-like Filtering not work in .ascx page... but it work in .aspx.
In .ascx page when i click on the Header Context Filter Menu button the Filter Popup is not show .... nothing is happen but in .aspx page it works well
would you please help me so that Excel-like Filtering is also work on a grid that is in my .aspx page
Here is my grid code Mostly taken from your example
//////////////////
<telerik:RadGrid ID="grdBracketPlayers" Width="1120" runat="server" Skin="Metro"
AllowFilteringByColumn="true" FilterType="HeaderContext" EnableHeaderContextMenu="true" EnableHeaderContextFilterMenu="true" AllowPaging="True" OnFilterCheckListItemsRequested="grdBracketPlayers_FilterCheckListItemsRequested" AllowSorting="true" GroupingEnabled="true"
OnNeedDataSource="grdBracketPlayers_NeedDataSource">
<MasterTableView DataKeyNames="FullName" AutoGenerateColumns="False" >
<Columns>
<telerik:GridBoundColumn FilterCheckListEnableLoadOnDemand="true" DataField="FullName" FilterControlAltText="Filter ContactName column" HeaderText="PlayLevelName" SortExpression="PlayLevelName" UniqueName="PlayLevelName" AutoPostBackOnFilter="true" CurrentFilterFunction="StartsWith">
</telerik:GridBoundColumn>
</Columns>
</MasterTableView>
</telerik:RadGrid>
11 Answers, 1 is accepted
Thank you for contacting us.
I tried to replicate the described problem in simple runnable project and excel-like filtering is working properly when the grid is inside .ascx page. Find attached my test page and let me know what is the difference in your case.
Additionally, check the browser console for errors when you click context menu button. Javascript error on the page could prevent the menu from opening.
I hope this helps.
Regards,
Pavlina
Telerik
Mostafa --
Perhaps this is the source of your problems. This is the response I received back from Telerik with the same problem.
From Telerik Tech Support ---------------------------------------
"Indeed in the described scenario excel-like filtering would not work. For the time being, you could try binding the ListBox inside the filter menu with Web Services. You could take a look at the blog post "Add Excel-like Multi-select Filtering to Your ASP.NET DataGrid" for more information about the suggested approach.
Another option would be to create the grid declaratively as it is done in the project I sent you. Please excuse us for the inconvenience caused.
-------------------------------------------------------------------
So we are back to this again. I cannot believe they even bothered releasing this. It is just marketing fluff.
Hi Pavlina
i try that but its not work for me.In my page i need to rebind the radgrid from server.After Rebind the grid from sever side my grid is shown but when i click on the header button for "excel-like filter" nothing is happen ... no popup is open.
the sample project that you send to me if you rebind the grid in page prerender even then it no open the filter popup
Please use the same project that you send me and just add the following code in your WebUserControl.ascx.cs file .. you can easily find the problem that filter is not work
/////////////////////
protected void Page_PreRender(object sender, EventArgs e)
{
RadGrid1.Rebind();
}
Note that in order to enable LoadOnDemand of the checklist you should Rebind() the grid on PageLoad. This is so because control events and RaiseCallbackEvent (ListBox method) are called before PreRender. This means that in order event to be raised and listbox to populate with data the control should be rendered on the page at this point. More information for the page lifecycle is available here:
https://msdn.microsoft.com/en-us/library/ms178472.aspx
Pavlina
Telerik
Hi Pavlina,
well i was use Checklist Filter i mean Filter type ="CheckList" and rebind my Radgrid in Page_PreRender event and that filter works well .... but new Excel-like Filtering is not work why i think it is a bug. if you use the same code that you sand me and change the filter type to "Checklist" Filter and rebind the grid in Page_PreRender . then it work well you see your checklist ..... but "Excel-like Filtering" not work why .. is not it is a Bug .. because if Checklist Filter is work After Rebind the Grid In Page_PreRender Event then Excel-like Filtering also should be work after Rebind Grid In Page_PreRender Event
.. not only me Most of people Rebind their Grid in Page_PreRender Event when they use MultiView...
so please take a look on this thing and give me a solution so that i can use Excel-like Filtering after rebind the grid in Page_PreRender Event
The behavior is different because the ListBox in the case with Excel-like filtering is placed in HeaderContextMenu which needs to be rendered earlier than the filter menu due to the other composite controls placed in it. However, I forwarded your concerns to our developers and they will do their best to unify different filter type behavior.
Please excuse us for the inconvenience caused.
Regards,
Pavlina
Telerik
I've already responded to your query in the support thread about the same matter. I suggest that we continue our technical conversation on the mentioned thread.
Kind regards,
Tsvetomir
Progress Telerik