I have a tab control in which there are several tab items, I calculate the data grid item while closing tab gates. For the first time it works fine (I mean walk first). After closing a tab item, DTG is zero in selling second frequency. Does anyone know why this is happening? I am in the subject that this UI is a problem, layout is not being refreshed. Please help me or show directions.
while (tc.HasItems) {TabItem ti = tc.selectedItem TabItem; If (Tiwari == "Ð ?? Ñ ?? оÐ'Ð ° жР°") {Microsoft.Windows.Controls.DataGrid sellDtg = FindChild & lt; Microsoft.Windows.Controls.DataGrid & gt; (TC, "SellDataGrid"); If (sellDtg.Items.Count> gt; 0) {Sell sl = new Sell (); If (Sell.basketfromSellDateListBox == incorrect) {sl.ClearBasket (sellDtg); Sell.ClearFromSellBasket ((int) sellDtg.Tag); }}} If (TI! = Null) TC ITEMS. Rev. (TI); } Thanks advance!
I did LogicalTreeHelper in a simple analog for FindHildLogical The function is written: Public Fixed T FindChildLogical & lt; T & gt; (DependencyObject parent, string childName) where T: dependency object {if (parent == zero) returns to the return; Var kids = LogicalTreeHelper.FindLogicalNode (parent, childName); Return (t) children; } And you say it in this form:
Microsoft.Windows.Controls.DataGrid sellDtg = FindChildLogical & lt; Microsoft.Windows.Controls.DataGrid & gt; (Ti, "SellDataGrid"); I hope you will be there where you want to.
No comments:
Post a Comment