Gridlayout in datagrid [message #870468] |
Tue, 08 May 2012 11:19 |
Trond Einar Nilsen Messages: 36 Registered: December 2011 |
Member |
|
|
Hi,
In a datagrid I placed a customized widget with a GridLayout and show it using editorBehaviors. In row 3 in the Grid Layout I placed an input field like this:
function mySNHPCPPFunction(grid DataGrid in, cell Widget in, rowData any in, rowIndex int in, column DataGridColumn in, value any in) returns(Widget)
case(column.name)
when("ALTERNATIVES")
CommonData.snhpcppREC.HPHUCD = rowdata.hphucd;
CommonData.snhpcppREC.HPK9NR = rowdata.hpk9nr;
Interest Interest{}; //widget containing a gridlayout with input field
return(interest);
end
When clicking inside the inputfield I get this ERROR:
[CRRUI1083E] An error occurred while the click browser event was being handled.
[CRRUI2022E] Index 3 is out of bounds for this array. Array size is 2
[CRRUI2094E] Here are the EGL function calls leading to this error:
org/eclipse/edt/rui/widgets/DataGrid.egl() at line 1148
org/eclipse/edt/rui/widgets/DataGrid.egl() at line 978
As far as I can see the problem is that the datagrid consist of two rows, but the row number from the gridlayout (row 3) is used and creates the array out of bounds.
A workaround for me is to make sure the datagrid consist of more than two rows or move the input field to gridlayout row 1. With either of those alternatives it works as it should. Is this a bug or have a messed something up?
Regards
Trond
[Updated on: Tue, 08 May 2012 11:19] Report message to a moderator
|
|
|
|
Re: Gridlayout in datagrid [message #871153 is a reply to message #871029] |
Fri, 11 May 2012 07:28 |
Trond Einar Nilsen Messages: 36 Registered: December 2011 |
Member |
|
|
Hi Justin,
I made a simple handler to show the error. Click in textfield and error shows.
By changing line 45 from:
Glayout1 gridlayout{cellPadding = 4, rows = 4, columns = 1, children =[textfield1{layoutData = new GridLayoutData{row = 4, column = 1}, height = 20}
to:
Glayout1 gridlayout{cellPadding = 4, rows = 4, columns = 1, children =[textfield1{layoutData = new GridLayoutData{row = 3, column = 1}, height = 20}
the error do not occur
If textfield is placed in gridlayout row greater than number of rows in datagrid the error appears. This is not a big problm for me now as I have found a workaround.
Rgds, Trond
-
Attachment: gridtest.egl
(Size: 1.82KB, Downloaded 459 times)
[Updated on: Fri, 11 May 2012 07:29] Report message to a moderator
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.02653 seconds