Please provide getSectionCount() and getSection(position)
See original GitHub issuePlease, correct me, if I’m doing something wrong. I have sections with header and items. Each section has id. When I need to add\remove\update item in this section I do:
for (s in 0 until adapter.groupCount) {
val section = adapter.getGroup(s) as DFLineSection
if (section.sectionKey != tournamentId) continue
val groupCount = section.groupCount
for (i in 1 until groupCount) { // 1 to ignore header
val item = section.getGroup(i) as DFLineItem
if (item.event.key != serverMarket.key.eventId) continue
...
The problem - adapter.groupCount returns number of all items I have in the list, not sections. adapter.getGroup(s) works almost correctly - for each s it returns correct section, but as many times as many items this section has. What I believe would be very useful - possibility to get number of and then navigate directly by sections.
Also I would like to have adapter.removeSection(position) and section.removeItem(position), now it is only possible to remove using section\item as argument.
Issue Analytics
- State:
- Created 4 years ago
- Comments:5
Top Results From Across the Web
Why is static Configuration.GetSection() not available?
Those examples from MS site do not call GetSection as static method: ... public ContentResult OnGet() { positionOptions = Configuration.
Read more >About Tabs/Sections API - XLineSoft
count(). Returns the number of tabs in the Tab control object. ... The m-th tab is moved to the n-th position. Sections methods....
Read more >Options pattern in ASP.NET Core - Microsoft Learn
Discover how to use the options pattern to represent groups of related settings in ASP.NET Core apps.
Read more >ECSCW 2005: Proceedings of the Ninth European Conference on ...
getGID(),“title”, “setter”,newObject[]{title})); } The second option may be ... Our implementation provides two generalpurpose reusable event adapters for ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@AlexMatiash agreed on that point. Those methods need to be named better. Perhaps it’ll be useful to have a
getTopLevelGroup(topLevelGroupPosition)
type method. I agree the current naming is confusing.I’ll explore for the next release
Now deployed in 2.7.0