Here I have a Class ContactA
I want Data Will not Populate in ListView on ListView Activated
Data Will Show when I search any Thing from search Button
protected override void OnActivated()
{
base.OnActivated();
if (View is ListView && View.ObjectTypeInfo.Type == typeof(ContactA))
{
ListView lv = (ListView)View;
lv.CollectionSource.CollectionChanged += new EventHandler(CollectionSource_CollectionChanged);
}
}
void CollectionSource_CollectionChanged(object sender, EventArgs e)
{
ListView listView = (ListView)View ;
if (listView.CollectionSource.Collection.Count > 0)
{
if (!listView.CollectionSource.Criteria.ContainsKey("EmptyCollectionCriteria"))
{
listView.CollectionSource.Criteria.Add("EmptyCollectionCriteria", CollectionSource.EmptyCollectionCriteria);
}
listView.CollectionSource.Criteria.Changed += new EventHandler(Criteria_Changed);
}
}
void Criteria_Changed(object sender, EventArgs e)
{
ListView listView = (ListView)View;
listView.CollectionSource.Criteria.Remove("EmptyCollectionCriteria");
}
Subscribe to:
Post Comments (Atom)
Mat Table Angular
Mat Table in Angular Mat table is used to display data . its a material designed styled data-table . For using Material Table MatTableMo...
-
CriteriaOperator criteria = new BinaryOperator("Age", 30, BinaryOperatorType.Greater); CriteriaOperator criteria = CriteriaOperato...
-
SortingCollection sc = new SortingCollection(); sc.Add (new SortProperty("field on which you want to sort",DevExpress.Xpo.DB.Sorti...
-
Minification and Uglyfication in Angular Deployement Minification : While building Angular Application white spaces , unused variable , u...
No comments:
Post a Comment