1. eugrid, quick question
- Posted by ChrisB (moderator) Nov 22, 2009
- 965 views
Hi
I have the code
object void integer colday, colmeal sequence meal_data = { {"Monday", "-"}, {"Tuesday", " "}, {"Wednesday", " "}, {"Thursday", " "}, {"Friday", " "}, {"Saturday", " "}, {"Sunday", " "} } ...... procedure Window1_onOpen (integer self, integer event, sequence params)--params is () --prepare and size the grid --set columns void = EGW_SetGridProperty( EuGrid6, EGW_ROW_HEADER_WIDTH, 0 ) colday = EGW_AddColumn( EuGrid6, "Day", 100, EGW_LAST, EGW_STATIC, 1 ) void = EGW_SetColumnProperty( EuGrid6, colday, EGW_COL_WIDTH, 75 ) colmeal = EGW_AddColumn( EuGrid6, "Meal", 100, EGW_LAST, EGW_STATIC, 1 ) void = EGW_SetColumnProperty( EuGrid6, colmeal, EGW_COL_WIDTH, 410-75 ) void = EGW_LoadData(EuGrid6, meal_data, EGW_REPLACE )
The first and second columns both display a list of day names - if a I set the second column to editable, then editinfg the second column, leads to changes corresponding to the edit in the first column. The second column cells should all be blank (at this stage). Any ideas as to what I'm doing wrong?
TIA
Chris
Hi - never mind, I sorted it, colmeal should have had its column id set to 2. Ta
Chris
2. Re: eugrid, quick question
- Posted by ghaberek (admin) Nov 23, 2009
- 993 views
Yes, the last parameter of EGW_AddColumn tells the grid where to pull the data from in the row. This allows you to have hidden columns and to rearrange columns without rearranging your data.
-Greg