Last post Mar 31, 2010 06:16 AM by KeFang Chen - MSFT
Mar 30, 2010 01:19 AM|srachuri|LINK
hello friends. i am using asp.net mvc..
i have db2 database with one table.....
i have a stroed procedure with input parmater as userid
i need to pass userid to get all the results from table to display in jquery grid on UI
please can any one tell me how to do this using asp.nt mvc urgent
Mar 30, 2010 01:29 AM|Das.Sandeep|LINK
Mar 30, 2010 01:46 AM|srachuri|LINK
thanks for your reply.
but my requirement is that i need to pass userid as input to the stored procedure to get the result data to show on jquery...
how to call the stroed procedure with input parameter and how to assigned the out put result to grid?
Mar 30, 2010 04:29 AM|thangchung|LINK
As me, when implemeting JQuery Grid, I built the Repository for called store-proc (with any ORM framework as you know, or call store-proc from ADO.NET's Microsoft). Certainly, you need using Projection operation for getting data from many tables. Then you
load all data to your ModelView. Using any convert tools to convert your object to JSON object(NewtonSoft is good library for converting to JSON formating). And finally, you can bind to JQuery Grid normally. And JQuery Grid have many function ship along with
it for CRUD operation. You can references to it's website for using.
Mar 31, 2010 06:16 AM|KeFang Chen - MSFT|LINK
It seems that your key concern is how to pass parameter to the stored procedure to get result.
If it was, you could post data to one action method, then the method would call store procedure with the received parameter and return json data.
Regarding how to post data to server, you can take a look at the following document about jqGrid.