DataGrid is broken? [message #915306] |
Mon, 17 September 2012 03:13 |
Dan Darnell Messages: 145 Registered: November 2011 Location: Arkansas |
Senior Member |
|
|
I may have missed something but when I create a new project and drop a DataGrid on my form I get errors. This is in EDT 0.8.1.
Code looks right to me but the following...
grid DataGrid{
behaviors = [ ],
headerBehaviors = [ ],
columns = [
new DataGridColumn{name = "field1", displayName = "Column 1 Header", width=120},
new DataGridColumn{name = "field2", displayName = "Column 2 Header", width=120}
],
data = [
new Dictionary { field1 = "Row 1, Column 1", field2 = "Row 1, Column 2"},
new Dictionary { field1 = "Row 2, Column 1", field2 = "Row 2, Column 2"}
]
};
...reports errors on the "new DataGridColumn" column lines:
IWN.VAL.6653.e 52/13 scoresDialog - DataGridColumn[] and DataGridColumn[] are not compatible
types in the expression columns = [new DataGridColumn,new DataGridColumn].
Same thing on other working code that I have ported over from RBD.
I'm hoping that someone can offer some guidance and, if this is a bug, perhaps a code fix. Kind of a big deal to not have data grids...
--Dan
|
|
|
|
|
|
|
Re: DataGrid is broken? [message #916161 is a reply to message #915533] |
Tue, 18 September 2012 16:28 |
Dan Darnell Messages: 145 Registered: November 2011 Location: Arkansas |
Senior Member |
|
|
Paul,
I couldn't recreate the issue but it went away when I connected to a new workspace and then connected back to the original workspace.
Now that I have a functioning DataGrid I encountered a new issue ... perhaps you could validate that this is a bug and I will submit the report...
I get an error in the IDE when I try to create a behavior function. Below is a simple case, using the tooling to create the grid and generate the stub behavior function:
grid DataGrid{
behaviors = [ format ],
headerBehaviors = [ ],
columns = [
new DataGridColumn{name = "field1", displayName = "Column 1 Header", width=120},
new DataGridColumn{name = "field2", displayName = "Column 2 Header", width=120}
],
data = [
new Dictionary { field1 = "Row 1, Column 1", field2 = "Row 1, Column 2"},
new Dictionary { field1 = "Row 2, Column 1", field2 = "Row 2, Column 2"}
function format(grid DataGrid in, cell Widget in, rowData any in, dataIndex int in, column DataGridColumn in)
//Auto-generated method stub
end
]
};
Error:
IWN.VAL.6653.e 18/15 testrui - DataCellBehavior[] and format[] are not compatible types in the
expression behaviors = [format]. At line 18 in file \TestRUI\EGLSource\client\TestRUI.egl
--Dan
|
|
|
Powered by
FUDForum. Page generated in 0.04027 seconds