We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

QueryParam Implementation (Essential Studio 11.4.0.26)

I am trying to use QueryParam in the GridPropertiesModel to pass additional information into my grids post actions for paging, sort, filtering, etc, but am finding little to no documentation on how to use it, only that it can be used for this function. (http://help.syncfusion.com/ug/asp.net%20mvc/grid/default.htm#!documents/throughgridpropertie68.htm)


How can I access the QueryParam data in my post actions? I have set up two parameters as below, but have no idea how to access them,

            gridModel.QueryParam = "account=" + account;
            gridModel.QueryParam = "openFlag=" + openFlag;

Is this the correct usage of the QueryParam property?

Thanks for your help.

Thomas


2 Replies

TK Thomas Kiehl March 6, 2014 08:10 PM UTC

Seems I was using it correctly but was accidentally overwriting the value I wanted. 


            gridModel.QueryParam = "account=" + account;
            gridModel.QueryParam += "&openFlag=" + openFlag;

Then to use it in the postback,

[AcceptVerbs(HttpVerbs.Post)]
        public ActionResult Index(PagingParams args, string account, string openFlag)
        {

Monday morning details will get you every time...


AM Abdul Matin M Syncfusion Team March 14, 2014 09:27 AM UTC

Hi Thomas,

 

Thanks for your interest in Syncfusion products.

 

We have analyzed your requirement and created a simple sample for your requirement and used QueryParam as you have specified in your first update (without + operator in second QueryParam) and found that the value was overwriting as you have specified. Later we tried using + operator as you have used and suggested in your next update, now the issue has been resolved.

 

Thanks for your update. Please let us know if you need any further assistance.

 

Regards,

Abdul Matin M


Loader.
Up arrow icon