Steps to use Group Template
1. First create a Layout Template and add a place holder in it.
2. Add a Group Template and add table in it as follow
3. Create Item Template and all all fields which u want to display
4. Add Group Separator Template to separate groups
5. In List view properties set below
GroupItemCount:- Set it to number of records you want to display as coulumn.for ex:- If you set it to 2 then you can view 2 records per row in 2 columns.
GroupPlaceHolderId:- Set Layout Template PlaceHolder Id to this property.
ItemPlaceHolderId:- Set it to display the items of Item Template.In our case it'll be group placeholder id ie:- itemplaceholder. By default the id for Itemplaceholder is "itemplaceholder".If you used this id then you dont need to set ItemPlaceholderId for Item
ASPX Code
Class File Code
Output
That's it. Using above steps you can group your records. In next post i'll add code for data Manipulation in List View control.
Thanks & Regards,
Vikas Sharma
No comments:
Post a Comment