Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How can I add a new row in ListView of Xamarin.Form with default layout #13

Open
shivendramca10 opened this issue Nov 26, 2018 · 1 comment

Comments

@shivendramca10
Copy link

Hi
I am using list view for creating sale invoice my requirement is that when I will go in create sax Invoice form
So there is a list view and a button "New Row" in this list view show a row with products Drop down and quantity Text Box and price text box and total amount of this row. now end uses will select product name and enter quantity and price and when click new row then a new row will be add in list view with all fields.

@Selvamz
Copy link

Selvamz commented Dec 4, 2018

@shivendramca10 , This is the simplest one. You can add your new item into your listview's ItemsSource collection. Make sure your ItemsSource should be a type of ObservableCollection so that it will automatically refresh the UI on collection changed like below example.

var employeeList = listView.ItemsSource as ObservableCollection<Employess>();

//Mr. Mono will be added to the ListView because it uses an ObservableCollection
employeeList.Add(new Employee(){ DisplayName="Mr. Mono"});

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants