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
Re: Add Listview group thru code
Do you have the ShowGroups property set to true?
Re: Add Listview group thru code
yes, ShowGroups property is True by default..
any idea?