none
How do I implement grouping in the JSGrid RRS feed

  • Question

  • There seems to be loose information on the JSGrid supporting grouping. Can someone at microsoft post a quick example of how to do this?

    Carlos

     

    Friday, September 17, 2010 5:24 AM

All replies

  • Hi Carlos,

    I noticed you have a few JSgrid postings without answers - I will endeavor to find answers for these today.

    Best regards,

    Brian.


    Blog | Facebook | Twitter | Posting is provided "AS IS" with no warranties, and confers no rights.
    Project Server TechCenter | Project Developer Center | Project Server Help | Project Product Page
    Tuesday, September 21, 2010 3:01 PM
    Owner
  • Was there a answer / example to this question? I'm very interested in the same information. I know this is a trivial task in Silverlight, but I would like to know how it can be done with the JSGrid. Thanks..
    Tuesday, July 12, 2011 6:23 PM
  • Hello Michael,

    Now I see lot of information/example on MSDN articles:(Updated/Published in June 2011)

    Example/walk through: take a look at the below links
    http://msdn.microsoft.com/en-us/library/ee535898.aspx
    http://msdn.microsoft.com/en-us/library/ee535898.aspx


    Thanks, Amit Khare |EPM Consultant| Blog: http://amitkhare82.blogspot.com http://www.linkedin.com/in/amitkhare82
    Wednesday, July 13, 2011 6:48 AM
  • There is no information about grouping in the Examples/Walk throughs. I am having the same problem. I need to implement grouping and I can't figure out how to do it exactly. 

     

    I have

     

           gds.EnableGrouping(new FieldOrderCollection(new String[] { "Resource Name", }), null, null, new PopulateGroupingRows(popGroupingRow), "Resource Name", false);

     

     

            private void popGroupingRow(IEnumerable<GroupingNode> node)

            {

                foreach (GroupingNode n in node)

                {

                   //no idea what to do here....

                }

            }

     

    I get a grouping but the grouping row is blank. I don't know how to populate information in the grouping row. I would prefer to have the "Resource Name" written in the grouping row and not underneath but I have no idea how to do this. I have been struggling with this for some time.

     

    Wednesday, August 24, 2011 4:36 AM
  • So I spent about an hour of this myself. The JSGrid seems nice, but documentation is really, really bad. Unless something is in one of the walk-thrus, you have to pretty much use the debugger and inspect things ... which is what I did.

    Each GroupingNode contains a DataRow object that represents the "grouping row". You can assign the grouping label to whichever column you wish. I happened to have a column "Name" and we group by JobType. I suppose you'd use "Resource Name" for your code. You'd think it would be default behavior to label it with the grouping value and you'd only need to do this if you wanted to get fancy with the label ... but oh well ... hope this gets you going.

     

    private void popGroupingRow(IEnumerable<GroupingNode> node)
    {
      foreach (GroupingNode gn in node)
      {
         gn.Row[
    "Resource Name"] = gn.DataVal;
      }
    }

    A lot of time spent for one line of code! Microsoft, please provide better documentation for your JSGrid ... otherwise people will just use jqGrid instead!



    Tuesday, September 27, 2011 9:19 PM