Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
785
IGGridView EditMode
posted

Hi - I'm curious to know if you have a recommendation for handling an insert of a row in your gridView. I know how to perform an insert, but I'm looking if their is a recommendation on the design. Xamarin recommends using the:

(Image below of the standard UITableView in EditMode)

EditingStyleForRow – returns    UITableViewCellEditingStyle.Delete for the rows containing    data, and returns UITableViewCellEditingStyle.Insert for the    last row (which will be added specifically to behave as an insert button).

 

Do you guys have anything like this where the last row in the gridVIew will be a button to "Add New" or should I just use a button somewhere?

 

http://docs.xamarin.com/guides/ios/user_interface/tables/part_4_-_editing

 

UITableView

Parents
  • 40030
    Offline posted

    Hi, 

    Honestly, i guess it really comes down to preference. I personally don't like having "Add New" as the last rows. If you wanted to it to be part of the list, i'd place the add new at the top where it's more discoverable. 

    But my personal preference when it comes to having insert functionality is a "+" UIBarButtonItem in the NavigationBar. 

    Now, if you'd like to have an AddNew button in the grid, the functionality isn't built in. However, its achievable, by using the IGGridViewDataSource protocol. You'd simply need to increase the number of rows you return from: 

    – gridView:numberOfRowsInSection:

    And then in: 

    – gridView:cellAt:

    You would return a cell that has an add button in it. 

    If you need a sample that shows this, let me know and i'll put one together. 

    Hope this helps, 

    -SteveZ

Reply Children