I am Using Janus.Windows.GridEX control in My User interface.I am trying to bung list of objects.But it is not happening as and when the binding object is assigned to DataSource. Soon after i assign the binding source ,if i check the row count it still shows 0,even though the binding data has list of objects. The collection class which i am tr开发者_如何学Pythonying to bind implements ICollection Here Mytype is a class which i have written.
if you use Gridex1.Datasource = Object
GridEX1.SetDataBinding(Object, "")
Gridex1.RetriveStructure()
also add
Implements IList
to your class.
there are some default functions that the grid needs.
for example the property Count()
to count your rows
see more info about Ilist http://msdn.microsoft.com/en-us/library/system.collections.ilist.aspx
The reason for this is because Janus GridEx's do not read from the datasource until the control is visible (i.e. the control has loaded). If you need to access the fields in the underlying datastructure, then you can do this through GridEx.Datasource. However, if you need access to bound grid fields like the RowCount, your only solution is access them during the Load event of the parent, or some event that fire's after the control has been setup.
Hope this helps, Chris
精彩评论