I think it’d be really nice to be able to expose the index number to a collection item for binding.
What will this allow you to do? Here’s a few examples
-
ALTERNATING COLORS OF ROWS: Bind the visibility or opacity of a rectangle in the collection item to it’s own index. Use a customer converter that makes a change based on whether the index is even or odd. And poof! You have alternating colors for your rows.
-
SHOW THE INDEX NUMBER to the user. Ex: Question number, photo number, record number, etc.
-
SHOW ICONS/TAGS BASEDON INDEX NUMBER: You can customize items to show based on their record index. For example, bind an icon to the index, and have it only shown at the 3rd item. Or as users add items to a shopping list, it shows different icons for each item they add.
Now, you may ask - why not just create an index field in your data? Well there’s a huge problem with that, primarily if your data changes. Most databases will not re-number your index if the user decides to add or remove records on the data. Therefore, for dynamic databases, an index field isn’t that useful. For example, if you have a directory of 10 people, and a staff member is removed at record #2 and a new one is added at the end. Then all of a sudden the record number will show 1,3,4,5…11 Any of your bindings in relation to record 2 will be broken, nothing will happen for record 11…even though there’s still only 10 records total.
So binding to the index number can be a really helpful thing. It’s already there…Intuiface shows it, but it’s not exposed to binding dynamically.
You know how there’s a property called “index in focus”? Let’s add one called “Index of Item”!
Let me know if you agree:
- AGREE! THIS WOULD BE A HUGE ADDITION TO DATA COLLECTIONS!
- Nah, don’t need it.
0 voters