The UltraTreeNode object has the property, ListObject which "Returns the object corresponding to this row from the IList that the control is bound to.", how does one get the same information from a selected tab in a UltraTabStripControl?
Sam
This code was written a while ago so I'm not really sure if there was a reason to hide it or not. I can say that the UltraTab class is shared between the UltraTabControl and UltraTabStripControl, only the latter of which is bindable, so it's possible that it was hidden to avoid confusion when using the UltraTabControl. If you would like this property to be exposed, you should submit a feature request; it's possible that there are some additional tests and scenarios to be looked into if the property were made public (and be supported as such).
-Matt
Thank you! Actually .Net 3.5 introduced the concept of Extension Methods, so I simply created a GetListObject using your code and it works great:
public static class InfragisticsExtensions { public static object GetListObject(this UltraTab tab) { PropertyInfo propInfo = typeof(UltraTab).GetProperty("ListObject", BindingFlags.Instance | BindingFlags.NonPublic); object listObject = propInfo.GetValue(tab, null); return listObject; } }
Just wondering... Is that by design or is it a bug, aka can I look for it to be exposed someday?
There is a ListObject property on the UltraTab object, but it is internal so you would have to use reflection to access it:
UltraTab tab = this.ultraTabStripControl1.Tabs[0];PropertyInfo propInfo = typeof(UltraTab).GetProperty("ListObject", BindingFlags.Instance | BindingFlags.NonPublic);object listObject = propInfo.GetValue(tab, null);
Any chance someone might have a though regarding this Q?