Link to home
Start Free TrialLog in
Avatar of Member_2_7966896
Member_2_7966896

asked on

jqGrid custom search filters - Null being allowed

Hello!

I was hoping if someone can help me understand how to have one or multiple parameters to be null and still execute the search with whatever filter options is chosen.

At the moment I have TWO dropdowns:

   url: "/DataService/Webservice2.asmx/filter?d=" + d+ "&n=" + n,

Open in new window


lets say both parameters are filled, it executes with no issues. But when one is blank it will shoot me an error telling me:
Conversion from string "" to type 'Integer' is not valid.
^ that error is shown in the webservice:

        Dim n As Integer = HttpContext.Current.Request.QueryString("n")

Open in new window

or
        Dim d As String = HttpContext.Current.Request.QueryString("d")

Open in new window


depends on which one is left blank.


Thank you!
ASKER CERTIFIED SOLUTION
Avatar of Julian Hansen
Julian Hansen
Flag of South Africa image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Member_2_7966896
Member_2_7966896

ASKER

Thank you! Got it working.