ASP .net MVC Jqgrid data binding

Posted by SARAVAN on Stack Overflow See other posts from Stack Overflow or by SARAVAN
Published on 2010-03-12T16:19:26Z Indexed on 2010/03/12 17:27 UTC
Read the original article Hit count: 315

Filed under:
|
|

Hi, I am using a jqgrid with a column named 'Comments'. My controller code returns data as follows:


var jsonData = new
{
rows=
....
....
   select new
             {
             col1....
             col2....
             Comments = _Model.GetComments(id),
             })

.......
.....
   return Json(jsonData, JsonRequestBehavior.AllowGet);
}


_Model.GetComments(id) will return a ClientComments Object which has a few properties say CommentID, FirstName, MiddleName etc., which will be bound to each row in the grid

Now in my jqgrid I need to build a tool tip based on Comments column properties and for that I need to use the properties of my Comments in JQGrid for each row. May I know How I can manipulate Comment's properties for each row? Any help would be appreciated.

I tried in my javascript that for each row rowObject.Comments.FirstName and it did not work.

© Stack Overflow or respective owner

Related posts about ASP.NET

Related posts about mvc