Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.clipper.visual-objects > #10271 > unrolled thread
| Started by | Lu <lu2k@hotmail.com> |
|---|---|
| First post | 2017-03-10 03:00 -0800 |
| Last post | 2017-03-15 08:03 +0100 |
| Articles | 6 — 2 participants |
Back to article view | Back to comp.lang.clipper.visual-objects
Show other column for one row in bbrowser Lu <lu2k@hotmail.com> - 2017-03-10 03:00 -0800
Re: Show other column for one row in bbrowser "Karl-Heinz" <invalid@invalid.invalid> - 2017-03-12 10:40 +0100
Re: Show other column for one row in bbrowser Lu <lu2k@hotmail.com> - 2017-03-13 06:52 -0700
Re: Show other column for one row in bbrowser "Karl-Heinz" <invalid@invalid.invalid> - 2017-03-13 20:22 +0100
Re: Show other column for one row in bbrowser Lu <lu2k@hotmail.com> - 2017-03-14 06:21 -0700
Re: Show other column for one row in bbrowser "Karl-Heinz" <invalid@invalid.invalid> - 2017-03-15 08:03 +0100
| From | Lu <lu2k@hotmail.com> |
|---|---|
| Date | 2017-03-10 03:00 -0800 |
| Subject | Show other column for one row in bbrowser |
| Message-ID | <838a04c6-7920-4a2c-a6de-28006cc5058f@googlegroups.com> |
Hello! Is it possible, that I change the column only for one row? With self:oDCbBrowser:OpenColumn(oColumn,6) in all rows the data are refreshed. The reason is following: In the bbrowser there is a recordgroup and in one column there should be different data shown. If the recordgroup is closed then show column1, and if its open then show column2 at the root group. The bBrowser is filled with a stored procedure. A solution would maybe, that I use an additional parameter for open and close, but I don't want that the stored procedure is called evertime the users click on the (+) oder (-). My idea: Method RecordGroupItemOpen() class Test show column2 Method RecordGroupItemClose() class Test show column1 Do you have any ideas? Lu
[toc] | [next] | [standalone]
| From | "Karl-Heinz" <invalid@invalid.invalid> |
|---|---|
| Date | 2017-03-12 10:40 +0100 |
| Message-ID | <eikjd2F9826U1@mid.individual.net> |
| In reply to | #10271 |
Hi Lu
> Is it possible, that I change the column only for one row?
>
>
> With self:oDCbBrowser:OpenColumn(oColumn,6) in all rows the data are
> refreshed.
>
> The reason is following:
> In the bbrowser there is a recordgroup and in one column there should be
> different data shown.
not sure, i understand your problem correctly.
It is not a requirement to bound a datacolumn to a specific server field
only. Try it with a #Expression Datacolumn instead and return whatever you
want from the callback method.
e.g.
METHOD PostInit(oWindow,iCtlID,oServer,uExtra) CLASS Yourwindow
...
oDCYourBrowser :use ( SELF:server ,{} )
oCol := bDataColumn{ oDCYourBrowser , SELF:server , { | oServer, oOwner
| oOwner:FillRecordGroupItemCol ( oServer ) } , #EXPRESSION ,
SELF }
...
METHOD FillRecordGroupItemCol ( oServer ) CLASS Yourwindow
local cRet as string
if _lShowField1Content
cRet := oServer:Fieldget ( #Field1 )
else
cRet := oServer:Fieldget ( #Field2 )
endif
RETURN cRet
regards
Karl-Heinz
[toc] | [prev] | [next] | [standalone]
| From | Lu <lu2k@hotmail.com> |
|---|---|
| Date | 2017-03-13 06:52 -0700 |
| Message-ID | <825fa401-4ae1-4bd4-b1db-f22426a9bd5f@googlegroups.com> |
| In reply to | #10275 |
Hi Karl-Heinz! Thank you for your answer. Now I have tried it with the #EXPRESSION Datacolumn. It works great, but all rows in the bBrowser where changed and not only the one where I click on the + of the RecordGroup. I hoped that only the row where the (+) is, would be changed (only one cell). I hope you know what I mean. Lu
[toc] | [prev] | [next] | [standalone]
| From | "Karl-Heinz" <invalid@invalid.invalid> |
|---|---|
| Date | 2017-03-13 20:22 +0100 |
| Message-ID | <eio9vmF1qntU1@mid.individual.net> |
| In reply to | #10284 |
Hi Lu, > It works great, but all rows in the bBrowser where changed and not only > the one where I click on the + of the RecordGroup. I hoped that only > the row where the (+) is, would be changed (only one cell). i´m using bBrowser 3, so i don´t know what bBrowser 4 offers to detect a [+] row in a RecordGroup. Maybe someone else can jump in ? regards Karl-Heinz
[toc] | [prev] | [next] | [standalone]
| From | Lu <lu2k@hotmail.com> |
|---|---|
| Date | 2017-03-14 06:21 -0700 |
| Message-ID | <90ab7ca7-3feb-43e8-9ab3-6b33dbfb46bc@googlegroups.com> |
| In reply to | #10287 |
Hi
Thank you Johan and Karl-Heinz for your answers. Now it works:
Method FillRecordGroupItemCol(oServer) class Test
local cRet as string
local oRecordGroupItem as bRecordGroupItem
oRecordGroupItem:= self:oDCbBrowser:RecordGroup:ItemList:ItemFromRecNo(oServer:Recno,BRGILIFRO_SUBSEARCH)
If oRecordGroupItem:IsOpen() .or. oRecordGroupItem:LevelNo = 2
cRet := oServer:FIELDGET(#Rep)
else
cRet := oServer:FIELDGET(#Rep1)
ENDIF
return cRet
Method RecordGroupItemOpen() class Test
self:oDCbBrowser:Refresh(#RefreshBuffer)
Method RecordGroupItemClose() CLASS Test
self:oDCbBrowser:Refresh(#RefreshBuffer)
Lu
[toc] | [prev] | [next] | [standalone]
| From | "Karl-Heinz" <invalid@invalid.invalid> |
|---|---|
| Date | 2017-03-15 08:03 +0100 |
| Message-ID | <eis79jFp9b5U1@mid.individual.net> |
| In reply to | #10288 |
Hi Lu, > Now it works: good to know ! > oRecordGroupItem:= > self:oDCbBrowser:RecordGroup:ItemList:ItemFromRecNo(oServer:Recno,BRGILIFRO_SUBSEARCH) haven't seen for awhile such an impressive nested single line of code ;-) regards Karl-Heinz
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.clipper.visual-objects
csiph-web