D
DenDuze
Guest
Hi, I found some code that I would like to convert to Progress but I can't manage that. Can someone help? DataTable table = this .radGridView1.DataSource as DataTable; this .radGridView1.LoadLayout(@ "C:\grid.xml" ); foreach (DataColumn column in table.Columns) { if (! this .radGridView1.Columns.Contains(column.ColumnName)) { GridViewDataColumn dataColumn = GridViewHelper.AutoGenerateGridColumn(column.DataType); dataColumn.IsVisible = false ; dataColumn.Name = column.ColumnName; dataColumn.FieldName = column.ColumnName; this .radGridView1.Columns.Add(dataColumn); } } So I tried: define variable oDataTable as System.Data.DataTable no-undo. define variable oColumn as System.Data.DataColumn no-undo. define variable i as integer no-undo. assign oDataTable = cast(radGridView1
ataSource, "System.Data.DataTable"). do i = 1 to oDataTable:Columns:Count: oColumn = cast(oDataTable:Columns, "System.Data.DataColumn"). message program-name(1) skip valid-object(oColumn) skip oColumn:ColumnName view-as alert-box. end. But I get the error 12869, something about wrong casting of a Progress.Data.BindingSourse to System.Data.DataTable. When I look to radGridView then the type of the DataSource is System.Object. But a System.Object has no Columns property. In the example they clearly use a System.Data.DataTable so why do I get errors there? Regards Didier
Continue reading...
Continue reading...