Multiple Collapsable Sections with non-collapsable sections divided by headers - swift

So I have been scouring the internet but can't find the solution. Currently I have a tableview with collapsable sections, the rows within these sections are off course related to the section. I have two other categories that don't need these collapsable sections, these are just rows. Currently I have a segment control that has the following:
Category 1 (Collapsable sections with each a different number of rows)
Category 2 (Standard list of rows)
Category 3 (Standard list of rows)
Category 4 (all of the above)
Category 1-3 work fine. But I can't combine all in one view. I would like to have three headers with each showing their corresponding category. First header should show all sections that are collapsable. The other two just rows.
What I tried:
Using section count to give each category a header but this ends if giving a header to all sections individually.
Using section count to give each category a view.
Potentially, creating three TableViews for each category if all Segment is selected.
Can anyone help in the right direction to what would be the best solutution.
I don't think my code will help because I'm still not sure what method I should use.
I did make a drawing to show what I mean:
if anyone has an idea that would be fantastic, thanks!

Related

Multiple records per row

My Details section currently looks like this:
How can I arrange it like this instead?
Go to your Section Expert and select Format with Multiple Columns. This will make the Layout tab appear.
From that tab, you can set the relevant width such that four records appear per row. (Depending on the dimensions of the page.)

How to display two grids with different data on the same form

I have a form with two grids. I have one table with rows where each row has a status of Yes or No. I'd like to display all the yes's in the top and the no's in the bottom grid.
A similar scenario would be if I wanted to show SalesTable header records. The top grid would be only those with a status of Delivered, and the bottom grid those with a status of Invoiced.
How can I accomplish this?
I've gotten close by adding another datasource of the same table type. I add a QueryBuildRange to filter the records but I get two issues:
When I click on a row in the top/bottom, it moves both row lines at the same time (the highlighting thing
It wants to show an equal number of top rows as bottom rows for some reason?? If I have 3 delivered sales orders, and 5 invoiced sales orders, it will show 3 in the top and 3 in the bottom.
Seams like the Grid-controls are being controlled by the same DataSource.
Check the properties of the Grid-control: make sure they are not set to the same DataSource!
Anyway, it would be helpful to know how the Form is structured and how the QueryBuildRange was added.
I created a very simple Form and it worked correctly:
added two Datasets with T-SalesTable each
added two Grid-controls to the Design (or to a TabPage, both worked)
adjusted the DataSource-property of each Grid to point to each DataSource
added fields (the AutoReport group) from the corresponding DataSource to each Grid
this one worked correctly (despite having the same contents. Then I
added a range in the init method of each of the Datasets
and it still worked.

How To customize different rows in UITableView

I want to create a page in iphone sdk which looks same as flight search result
problem is that each there are different number of stops some has 2 stops some has 1 etc. and not only leave flight detail but return flight detail can also be asked.
It must sorted on the basis of charges.
I am not getting from where I start
I make 3 custom cells
showing source n destination detail
the flight detail
to make separator between leave n return results
this is demo i have tried with fixed value! [1 row a SimpleTableIdentifier(background color not able to set) 2 and 3 row are 2 different CustemCell, there is separator custom cell too]
but I think i make it complex unnecessary
any tips and help will be apprecited thanks in advance.
Go like this make three customCell one for each of your three category
cell structure to show source and destination detail
cell structure to show flight detail
cell structure to make seperator
Now your UITableView will be a grouped tableView with numberOfSections = number to total flight you have to show
Each section will have three rows (if it has all three information available) else you can reduce the number of rows in any section by delegate method of UITableView named numberOfRowsInSection.
Try not to forget to give all different custom cells other dequeueReusableCellWithIdentifier's for re-usability.

sort elements of a table view in sections

in my app I have a table view where I download a list of hotels parsed by an XML(for every hotel i put in xml an attribute STARS); I need to view hotels by stars (from 5 stars to three stars), dividing it into three sections.
So I have a section "5 stars" where there are 5-star hotel, a section "4 stars" where there are the 4-star hotel and thus also for the 3-star hotels.
How can do this??
I'd go with three separate arrays to hold your data, and then use your delegate to answer 3 for the number of sections, and populate the cells accordingly.

iPhone - Multiple TableViews in one View?

How exactly does one implement two separate "tableviews" on one view like in this image:
alt text http://www.jamespwright.com/images/public/multitableviews.jpg
This is just simple tableView with groupedStyle, numbers of sections = 2 and number of rows is sections - 5 and 2.
It's very, very likely that that is not two table views, but one table in grouped style, with two sections. Please see the Table View Programming Guide and the Human Interface Guide for more.