I have following code for dispay items. like :-
function DisplayNewList()
{
$("#list").jqGrid({
datatype: 'json',
url: 'Service.svc/json/getIngredients/',
mtype: 'GET',
colNames: ['Ingredents', 'Value'],
colModel: [
{ name: 'Ingredents', index: 'Ingredents', width: 100 },
{ name: 'value' }
]
});
}
I used the above jqgrid. But not getting table in proper place and not displaying any data on it.
I'm getting 2 cells(heading of table) in the bottom of my page. Not inside the box where i specified.
'list' is table id and it is there in .aspx file. The above code is there in external java script file.
Can you please tell me where to place jqgrid. and how to use it here.
Now Getting the table like this:-
For getIngredients I have Service Like this:- IService:
[OperationContract]
[WebInvoke(Method = "GET",
UriTemplate = "json/getIngredients",
ResponseFormat = WebMessageFormat.Json,
BodyStyle = WebMessageBodyStyle.Wrapped)]
[return: MessageParameter(Name = "Status")]
List<ItemList> GetIngredients;
Thank you.