
Obonye
Forum Replies Created
-
The main form should not know the subform layout. So I do not see the need to send the iLayout to the main form as you have explained. The problem is I get a #null value when I trap the pBreakpoint in $event On evLayoutChanged in the subform.
-
This reply was modified 1 year, 7 months ago by
Obonye Mato.
-
This reply was modified 1 year, 7 months ago by
-
You are always dependable and very helpful. Thank you, Andreas.
-
Hi @Doug Easterbrook ,
I’m following this discussion with interest. I have a similar challenge. I have created a datagrid in a subform to display list. The iDataList contained a variable column lIselected (Boolean) which I would then assign $ref.$selected as (kTrue). Multiple selection is allowed. Then pass this iDataList to the main form like this:-
Do $cinst.$container().$getDataList(iDataList)
This allows me to get the iDataList from the main form when I am in the second sub form for editing the selected row, like this:-
Do $cwind.$getDataList Returns iDataList
Is there a way I can get the iDataList from the first subform of displaying the list containing the selected rows without passing data around?
I do apologize IF I have bombed the discussion. I could start a new thread IF this is the case.
Kind regards
Martin Obongita.
-
A boolean column in a datagrid has a fixed width and there is no need to adjust it’s width by a percentage.
-
Which version of Omnis is this library?
-
There is still a small issue. In my datagrid, I have 2 columns: name, and isselect. isselect column is a boolean. It remains the same width irrespective of the window layout. Therefore $columnwidtharepercentage should be kfalse. I have created an entry field in the subform with a dataname iBreakpoint. I have calculated iBreakpoint as pBreakpoint. If I test the form, the value is 0.
-
Your solution is great @andreas-pfeiffer . The column width issue is now sorted. This forum is super-lovely.
-
Shouldn’t I learn all the features of 10.22 well then progress to a later version?
-
That’s a great idea that will solve the layout issue. But how do I assign the column % in decimals eg 300/350*100=85.71 as column width? The $columnwidths property seems to accept integer values only.
-
$OS 10.22 build 31896
-
yes, like this,
On evLayoutChanged
Calculate lBreakpoint as pBreakpoint
Switch pBreakpoint
Case 320
Do $cinst.$objs.DataGrid.$::columnwidths.$assign(‘250,50’)
Do $cinst.$objs.DataGrid.$width.$assign(‘300’)
-
That worked as expected. Problem solved. Thank you so much @Giacomo Manzoli .
-
But why I am unable to get the property of an object’s $designcols? I am able to get other properties such as name.
-
Aha! I see where I am drifting off. The property insight is a pointer in the right direction. Thank you.
-
Please see the attached screenshot of the returned reference. The jsChildDataListCustomReport inherits from a parentForm. If I run “Calculate <b style=”font-family: inherit; font-size: inherit; color: var(–bb-body-text-color);”>designcol as <b style=”font-family: inherit; font-size: inherit; color: var(–bb-body-text-color);”>pQueryDataGridRef.$designcols” I get 1 which is wrong.