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

HeaderContextMenu is not workign with client-side bounded RadGrid.

4 Answers 76 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Smruti Ranjan
Top achievements
Rank 1
Smruti Ranjan asked on 02 Nov 2012, 08:15 AM
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..

4 Answers, 1 is accepted

Sort by
0
Accepted
Vasil
Telerik team
answered on 07 Nov 2012, 09:33 AM
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.
0
Smruti Ranjan
Top achievements
Rank 1
answered on 16 Jan 2013, 03:05 PM
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 ?
0
Smruti Ranjan
Top achievements
Rank 1
answered on 22 Jan 2013, 07:01 AM
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.
0
Vasil
Telerik team
answered on 25 Jan 2013, 08:22 AM
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.
Tags
Grid
Asked by
Smruti Ranjan
Top achievements
Rank 1
Answers by
Vasil
Telerik team
Smruti Ranjan
Top achievements
Rank 1
Share this question
or