Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
Developer
Posts: 65
Registered: ‎03-20-2013
My Device: Z10(Red Limited Edition)
My Carrier: MY COMPANY
Accepted Solution

How can i fixed header of listView in GroupDataModel.

Hello,

           i want to fixed my listview header like suppose i have set header of listView in GroupDataModel (grouping: ItemGrouping.ByFirstChar). and now when we scroll in listview header should be fixed on what is current title of item in listview. just like Blackberry Hub.

 

thanks

 

 

 

Developer
Posts: 86
Registered: ‎05-21-2012
My Device: Blackberry 10 Dev Alpha
My Carrier: IDEA

Re: How can i fixed header of listView in GroupDataModel.

You can use the sample to achive this.

 

dataModel: GroupDataModel {
                grouping: ItemGrouping.ByFirstChar
                sortingKeys: [ "title" ]
            }
            layout: StackListLayout {
                headerMode: ListHeaderMode.Sticky
            }

 

- Raju
Developer
Posts: 65
Registered: ‎03-20-2013
My Device: Z10(Red Limited Edition)
My Carrier: MY COMPANY

Re: How can i fixed header of listView in GroupDataModel.

Thanks a lot.

Developer
Posts: 65
Registered: ‎03-20-2013
My Device: Z10(Red Limited Edition)
My Carrier: MY COMPANY

Re: How can i fixed header of listView in GroupDataModel.

Could you tell me one thing, When i am adding an item in listview via groupdatamdoel,why groupdatamodel add items in reverse order. 

Developer
Posts: 109
Registered: ‎08-23-2012
My Device: Blackberry Z10
My Carrier: TATA DOCOMO

Re: How can i fixed header of listView in GroupDataModel.

yes, you are correct ankursahu19 , while we add data in list view it will added in reverse order.
For that problem first reverse your data order and then add in ListView.
This solve your problem.
Dharmender Singh
Regular Contributor
Posts: 51
Registered: ‎08-07-2013
My Device: blackberry z10
My Carrier: asif

Re: How can i fixed header of listView in GroupDataModel.

i m developing a blackberry app. and i m make a list view but list view show data in reverse order. you know these problem then tell me i am waiting ....

New Developer
Posts: 16
Registered: ‎09-01-2014
My Device: q10
My Carrier: at&t

Re: How can i fixed header of listView in GroupDataModel.

I believe this:

 

layout: StackListLayout {
                headerMode: ListHeaderMode.Sticky
            }

 

Should be part of the listview definition, not the datamodel....