HeaderContextMenu is not workign with client-side bounded RadGrid.

5 posts, 1 answers
  1. Smruti Ranjan
    Smruti Ranjan avatar
    22 posts
    Member since:
    Feb 2012

    Posted 02 Nov 2012 Link to this post

    Hi,

    I am having a RadGrid on my page which is bounded in client-side to populate retrieving data from a WCFAjaxEnabledService.
    Everything works well to populate data., but the HeaderContextmenu operations(like filtering and sorting etc.) are not working.

    Also while sorting operation through the HeaderContextMenu, it does not find the MasterTableView for the particular grid while trying to populating the grid again after the reloading and nothing happens with filter through HeaderContextMenu operation.

    Do anybody is having any suggestions regarding this, Please help me ?

    Can i handle the click event of this HeaderContestMenu on client-side ?

    Thanks in advance..
  2. Answer
    Vasil
    Admin
    Vasil avatar
    1547 posts

    Posted 07 Nov 2012 Link to this post

    Hi Smruti,

    The header context menu sorting operation is currently works only with server binding, since the commands that the menu fires are handled server side. We are working on a improvement to make it work on client side, hopefully it will be done for the next release.

    Regards,
    Vasil
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Smruti Ranjan
    Smruti Ranjan avatar
    22 posts
    Member since:
    Feb 2012

    Posted 16 Jan 2013 Link to this post

    Hello Vasii,

    I need to hide the items from the HeaderContextMenu for the SORT functionality and only to view the Filter and SelectColumn menu item there.
    Also the filter operation is not working on the HeaderContextMenu Filter item click on the client-side bounded grid.
    Can you please help in this regard by supplying any client-side code example ?
  5. Smruti Ranjan
    Smruti Ranjan avatar
    22 posts
    Member since:
    Feb 2012

    Posted 22 Jan 2013 Link to this post

    I am now able to accomplish this by sorting the DataTable returned by the WCF service with all data to be populated,
    then rebinding the grid with the sorted rows data.

    Now i amd facing the problem like the header style does not changes as the column is sorted as it works for the server side bounded grid.
    I want to know is there an alternative way to set the header of the sorted column style as that of sorted column works in server-side bounded grid ?

    Please let me know.
  6. Vasil
    Admin
    Vasil avatar
    1547 posts

    Posted 25 Jan 2013 Link to this post

    Hi Smruti,

    To hide items from the header context menu you can handle it's PreRender event like this:
    protected void Page_Load(object sender, EventArgs e) 
        RadGrid1.HeaderContextMenu.PreRender += new EventHandler(HeaderContextMenu_PreRender); 
     
    void HeaderContextMenu_PreRender(object sender, EventArgs e)
    {
        //do your logic here
    }

    The sorting of the menu is designed to work for server side binding only. We will try to upgrade it in future, but I could not give a time estimate when it will be improved.

    Greetings,
    Vasil
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017