Results 1 to 3 of 3

Thread: Add Listview group thru code

Hybrid View

  1. #1
    Fanatic Member
    Join Date
    Nov 03
    Posts
    701

    Add Listview group thru code

    Dear All,

    How to add listview group thru code? .. I am trying codes below.. but nothing appear on my lv (listview)..

    Code:
     while (dr.Read())
    {
        string groupname = dr.GetString(dr.GetOrdinal("groupname"));
        lv.Groups.Add(new ListViewGroup(groupname, HorizontalAlignment.Center));
    }
    could anybody please help?

    Thanks & Regards

  2. #2
    .NUT jmcilhinney's Avatar
    Join Date
    May 05
    Location
    Sydney, Australia
    Posts
    80,869

    Re: Add Listview group thru code

    Do you have the ShowGroups property set to true?

  3. #3
    Fanatic Member
    Join Date
    Nov 03
    Posts
    701

    Re: Add Listview group thru code

    yes, ShowGroups property is True by default..

    any idea?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •