Telerick RadGridView

Posted by Admin on 26-Feb-2009 15:48

I am using Telerik RadGridView. I have a probindingsource that is working fine when I bind it to the MS .NET System.Windows.Forms.DataGridView control.

However when i bind it to Telerik.WinControls.UI.RadGridView it generates following lines of code ...

gridViewTextBoxColumn1:FieldName = "company".

gridViewTextBoxColumn1:HeaderText = "company".

gridViewTextBoxColumn1:IsAutoGenerated = TRUE.

gridViewTextBoxColumn1:UniqueName = "company".

gridViewTextBoxColumn2:FieldName = "contract-num".

gridViewTextBoxColumn2:HeaderText = "contract-num".

gridViewTextBoxColumn2:IsAutoGenerated = TRUE.

gridViewTextBoxColumn2:UniqueName = "contract-num".

gridViewDecimalColumn1:DataType = Progress.Util.TypeHelper:GetType("System.Int32").

gridViewDecimalColumn1:FieldName = "trx-num".

gridViewDecimalColumn1:HeaderText = "trx".

gridViewDecimalColumn1:IsAutoGenerated = TRUE.

gridViewDecimalColumn1:UniqueName = "trx-num".

THIS-OBJECT:radGridView1:MasterGridViewTemplate:Columns:Add(gridViewTextBoxColumn1).

THIS-OBJECT:radGridView1:MasterGridViewTemplate:Columns:Add(gridViewTextBoxColumn2).

THIS-OBJECT:radGridView1:MasterGridViewTemplate:Columns:Add(gridViewDecimalColumn1).

THIS-OBJECT:radGridView1:MasterGridViewTemplate:DataSource = THIS-OBJECT:bs.

THIS-OBJECT:radGridView1:Name = "radGridView1".

THIS-OBJECT:radGridView1:Size = NEW System.Drawing.Size(588, 144).

THIS-OBJECT:radGridView1:TabIndex = 2.

THIS-OBJECT:radGridView1:ThemeName = "Vista".

The following three lines from above snippet has error.

THIS-OBJECT:radGridView1:MasterGridViewTemplate:Columns:Add(gridViewTextBoxColumn1).

THIS-OBJECT:radGridView1:MasterGridViewTemplate:Columns:Add(gridViewTextBoxColumn2).

THIS-OBJECT:radGridView1:MasterGridViewTemplate:Columns:Add(gridViewDecimalColumn1).

I get this error in Architect ...

Multiple markers at this line

- Could not locate element 'Add' in class

'Telerik.WinControls.UI.GridViewColumnCollection'. (12927)

- ** C:\XP\smartpro\test\Test.cls Could not understand line 196. (196)

There is nothing seems to be wrong here... There is a Add method if i look into the Telerik documentation ...

Any idea how to debug it ..

IK

All Replies

Posted by Peter Judge on 26-Feb-2009 16:02

There is nothing seems to be wrong here... There is a

Add method if i look into the Telerik documentation

...

Any idea how to debug it ..

The Gui for .NET doens't currently support Generics. If you search on generics in this forum you'll be able to see the dicussions around the topic.

-- peter

Posted by Admin on 04-Aug-2009 09:57

I am having the same problem ...

is there a work around ?


Gerd

Posted by Thomas Mercer-Hursh on 04-Aug-2009 11:44

10.2B is supposed to support .NET generics.

Posted by Admin on 05-Aug-2009 01:36

Thanks Thomas

I will wait for the 10.2B Beta release ...

Posted by Martha Lynch on 05-Aug-2009 13:49

gerddb wrote:

I will wait for the 10.2B Beta release ...

In the case described here GridViewColumnCollection inherits from a Generic type, which - as noted - is not supported in 10.2A.  That restriction has been lifted in the forthcoming 10.2A02 service pack (expected release September 2009). 10.2B (including the soon-to-be-available Beta) will also include support for instantiating and accessing a .NET Generic class from ABL.


     -Martha

Posted by Admin on 06-Aug-2009 00:15

That restriction has been lifted in the forthcoming 10.2A02 service pack (expected release September 2009).


     -Martha

Hi Martha,

can you share some information about what will exactly be "lifted" in 10.2A02?

Mike

Posted by mbanks on 06-Aug-2009 10:06

Hello Mike,

What will change with 10.2A02 is that our type system will correctly handle closed generic types.

For example, in the issue described in this thread,  RadGridView:MasterGridViewTemplate:Columns is a property of the type GridViewColumnCollection.  GridViewColumnCollection extends ItemObservableCollection.  It's this closed generic parent class that has the Add method.

Previously, our type system was not handling generic types at all, so cases like this where type A extends type B, anything inherited from B was not available from the ABL.

Best,

Mike

Posted by Admin on 06-Aug-2009 23:53

mbanks schrieb:

Hello Mike,

What will change with 10.2A02 is that our type system will correctly handle closed generic types.

Sounds promising!

Posted by Admin on 16-Nov-2009 10:59

Telerik Gridview still doesn't work with 10.2A SP2.

Posted by Thomas Mercer-Hursh on 16-Nov-2009 11:44

10.2B

This thread is closed