Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 58056

How to refresh or reload the tableView?

$
0
0

I am looking for a method to refresh tableview in Xamarin forms , after I remove a cell. How to do this in Xamarin form? Anyone?

Here is my source code:

`var myCustomControl = new MyCustomControl {
Height = 100,
BindingContext = userDetails[1],
StyleId = "abc"
};

var tableView = new TableView {
RowHeight = 70,
BackgroundColor = Color.Yellow,
};

var root = new TableRoot ("TableView Title");
var section1 = new TableSection ("Info section");

root.Add (section1);
tableView.Root = root;

section1.Add (myCustomControl);

var layout = new StackLayout {
BackgroundColor = Color.Blue,
Children = {tableView}
};

myCustomControl.Tapped += (sender, e) => {
section1.RemoveAt(0);
section1.CollectionChanged += (s1, e1) => {
//How to refresh the tableview???????
};
};

`


Viewing all articles
Browse latest Browse all 58056

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>