Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 368640

Summary: grid will not display without columns setting
Product: z_Archived Reporter: Huo Zhen Zhong <huozz>
Component: EDTAssignee: lu lu <lulu>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: hjiyong, jinfahua, mayunf, svihovec
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
test project
none
screen shot
none
sample
none
Grid can display correctly with data when without column setting
none
use egl.unboxAny instead of eze$$value hjiyong: iplog+, lulu: review?

Description Huo Zhen Zhong CLA 2012-01-16 02:02:12 EST
Created attachment 209524 [details]
test project

1. import attached test project
2. open PageDemo.egl in preview tab of VE
3. the grid can not display, you must uncomment the columns setting code to make it display:
        columns = [            
            new DataGridColumn{name = "id", displayName = "id", width=120},
            new DataGridColumn{name = "age", displayName = "age", width=120},
            new DataGridColumn{name = "name", displayName = "name"},
            new DataGridColumn{name = "home", displayName = "home"}
        ],

4. In RBD, you don't need the columns setting code to display the grid.
Comment 1 Huo Zhen Zhong CLA 2012-01-16 02:12:34 EST
Created attachment 209525 [details]
screen shot
Comment 2 fahua jin CLA 2012-01-16 02:16:23 EST
Forest, you'd better provide the EDT build # as well. Thanks.
Comment 3 Huo Zhen Zhong CLA 2012-01-16 02:19:48 EST
find in 0.8.0.v201201152102
Comment 4 lu lu CLA 2012-01-19 05:57:39 EST
Had taken new comer training on Wed and Thu, and will take vacation from 1.20 to 1.28, so need to defer this defect to 0.8.0 I2. Thanks.
Comment 5 Brian Svihovec CLA 2012-01-19 13:50:39 EST
Please provide more information about the intended result (i.e. a screen capture, etc).  Also, the attached project does not contain a file named 'PageDemo.egl', so please attach the correct project.

I tried the following in EDT .7:

DataGrid DataGrid{
    behaviors = [ ],
    headerBehaviors = [ ],
	columns = [
//	    new DataGridColumn{name = "field1", displayName = "Column 1 Header", width=120},
//	    new DataGridColumn{name = "field2", displayName = "Column 2 Header", width=120}
	]
};

and nothing is displayed for the Grid unless I uncomment the 'columns' field.  

Based on this test, I do not believe that this is a regression from the .7 release.  Also, I believe that having a grid with no columns is an edge case, so I am leaving this as deferred to I2.
Comment 6 Huo Zhen Zhong CLA 2012-02-01 04:08:37 EST
Created attachment 210359 [details]
sample

please use the sample project
Comment 7 lu lu CLA 2012-02-03 03:12:34 EST
Created attachment 210492 [details]
Grid can display correctly with data when without column setting

Grid can display correctly with data when without column setting. Hi, YunFeng, Can you help to review my changes? Thanks.
Comment 8 lu lu CLA 2012-02-06 02:15:20 EST
Created attachment 210551 [details]
use egl.unboxAny instead of eze$$value

Have been modified according to JiYong's comment, using egl.unboxAny method to get values from object. Thanks.
Comment 9 Huang Ji Yong CLA 2012-02-06 06:32:55 EST
Comment on attachment 210551 [details]
use egl.unboxAny instead of eze$$value

Approved, commited
Comment 10 lu lu CLA 2012-02-06 21:16:08 EST
Mark the bug as resolved.
Comment 11 Huo Zhen Zhong CLA 2012-02-20 00:15:27 EST
verified in 0.8.0.v201202190901