tags:

views:

383

answers:

2

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 trying to bind implements ICollection Here Mytype is a class which i have written.

+1  A: 

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

Alexander
Let me try this.
Ravisha
I am able to view the rows in getRows,but the rows do not contain any columns.the column in each row is zero.:(Here is am trying to set tooltip for each cell in the grid.Soon after i bind the data i want to assign tooltip.
Ravisha
what type of datasource is it? GridEX control can only work with collections that implement System.Collections.IList interface and IList<T> does not implement IList interface. You need to return a List<T> or an IList to make it work.
Alexander
Edited my question to provide info about list
Ravisha
try add Implements IList to your class. there are some default functions that the grid needs. for example the property Count to count your rows http://msdn.microsoft.com/en-us/library/system.collections.ilist.aspx
Alexander
how is it going for you?
Alexander
+1  A: 

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

Chris