xBrowse Edit Group Column (DONE)

xBrowse Edit Group Column (DONE)

Postby fraxzi » Tue Jun 19, 2018 12:18 am

Hi Mr. Rao,

with xbrowse:

Code: Select all  Expand view  RUN

 ...
 oBrw:aCols[ 4]:SetColsAsRows(  4,  5,  6 )
 ...
 oBrw:aCols[ 4]:nEditType := EDIT_GET
 oBrw:aCols[ 5]:nEditType := EDIT_GET
 oBrw:aCols[ 6]:nEditType := EDIT_GET
 ...
 


Image

But I can only edit the "project" field ... How to edit the remaining field belong in the column group?
Last edited by fraxzi on Tue Jun 19, 2018 12:33 am, edited 1 time in total.
Kind Regards,
Frances

Fivewin for xHarbour v18.07
xHarbour v1.2.3.x
BCC 7.3 + PellesC8 ( Resource Compiler only)
ADS 10.1 / MariaDB
Crystal Reports 8.5/9.23 DE
xMate v1.15
User avatar
fraxzi
 
Posts: 811
Joined: Tue May 06, 2008 4:28 am
Location: Philippines

Re: xBrowse Edit Group Column

Postby nageswaragunupudi » Tue Jun 19, 2018 12:21 am

Inline edit is not possible when using SetColsAsRows()
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10662
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: xBrowse Edit Group Column (DONE)

Postby fraxzi » Tue Jun 19, 2018 12:33 am

nageswaragunupudi wrote:Inline edit is not possible when using SetColsAsRows()



Thanks Mr. Rao, well noted.
Kind Regards,
Frances

Fivewin for xHarbour v18.07
xHarbour v1.2.3.x
BCC 7.3 + PellesC8 ( Resource Compiler only)
ADS 10.1 / MariaDB
Crystal Reports 8.5/9.23 DE
xMate v1.15
User avatar
fraxzi
 
Posts: 811
Joined: Tue May 06, 2008 4:28 am
Location: Philippines

Re: xBrowse Edit Group Column (DONE)

Postby nageswaragunupudi » Tue Jun 19, 2018 1:38 am

Please try this:
Assuming the headers of columns 4,5,6 are "PROJECT NAME", "ADDRESS1", "ADDRESS2",

oBrw:aCols[ 4 ]:bLDClickData := { || oBrw:EditBrowse( .f., "PROJECT NAME,ADDRESS1,ADDRESS2", .f. ) }
oBrw:aCols[ 4 ]:bKeyChar := { |k| If( k == 13, ( oBrw:EditBrowse( .f., "PROJECT NAME,ADDRESS1,ADDRESS2", .f. ), 0 ), nil }
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10662
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: xBrowse Edit Group Column (DONE)

Postby fraxzi » Tue Jun 19, 2018 2:47 am

nageswaragunupudi wrote:Please try this:
Assuming the headers of columns 4,5,6 are "PROJECT NAME", "ADDRESS1", "ADDRESS2",

oBrw:aCols[ 4 ]:bLDClickData := { || oBrw:EditBrowse( .f., "PROJECT NAME,ADDRESS1,ADDRESS2", .f. ) }
oBrw:aCols[ 4 ]:bKeyChar := { |k| If( k == 13, ( oBrw:EditBrowse( .f., "PROJECT NAME,ADDRESS1,ADDRESS2", .f. ), 0 ), nil }



Hi Rao,

Thanks for the alternative way of doing it.

Image

I got blank fields to edit even if I move the record.
Kind Regards,
Frances

Fivewin for xHarbour v18.07
xHarbour v1.2.3.x
BCC 7.3 + PellesC8 ( Resource Compiler only)
ADS 10.1 / MariaDB
Crystal Reports 8.5/9.23 DE
xMate v1.15
User avatar
fraxzi
 
Posts: 811
Joined: Tue May 06, 2008 4:28 am
Location: Philippines

Re: xBrowse Edit Group Column (DONE)

Postby nageswaragunupudi » Tue Jun 19, 2018 2:52 am

Please adopt my modified code.
It is working here fine for me.
Please try again.
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10662
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: xBrowse Edit Group Column (DONE)

Postby fraxzi » Tue Jun 19, 2018 3:24 am

nageswaragunupudi wrote:Please adopt my modified code.
It is working here fine for me.
Please try again.



I exactly copied it. and checked with headers.. it is a Child Record Set..
Kind Regards,
Frances

Fivewin for xHarbour v18.07
xHarbour v1.2.3.x
BCC 7.3 + PellesC8 ( Resource Compiler only)
ADS 10.1 / MariaDB
Crystal Reports 8.5/9.23 DE
xMate v1.15
User avatar
fraxzi
 
Posts: 811
Joined: Tue May 06, 2008 4:28 am
Location: Philippines

Re: xBrowse Edit Group Column (DONE)

Postby nageswaragunupudi » Tue Jun 19, 2018 4:25 am

First, please try this sample as it is. Copy to fwh\samples folder and build it.
Code: Select all  Expand view  RUN
#include "fivewin.ch"

function Main()

   local oDlg, oBrw, oFont, aStates

   USE STATES
   aStates  := FW_DbfToArray( "CODE,NAME" )
   CLOSE STATES

   USE CUSTOMER
   DEFINE FONT oFont NAME "TAHOMA" SIZE 0,-14
   DEFINE DIALOG oDlg SIZE 700,500 PIXEL TRUEPIXEL FONT oFont
   @ 20,20 XBROWSE oBrw SIZE -20,-20 PIXEL OF oDlg ;
      DATASOURCE "CUSTOMER" ;
      COLUMNS "ID", "FIRST", "LAST", "STREET", "CITY", "STATE", "ZIP", "AGE", "MARRIED", "SALARY" ;
      CELL LINES NOBORDER

   WITH OBJECT oBrw
      :nEditTypes := EDIT_GET
      :Married:SetCheck()
      WITH OBJECT :State
         :nEditType     := EDIT_LISTBOX
         :aEditListTxt  := aStates
      END
      :aCols[ 2 ]:SetColsAsRows( { 2, 3 } )
      :aCols[ 4 ]:SetColsAsRows( { 4, 5, 6, 7 } )
      :aCols[ 8 ]:SetColsAsRows( { 8, 9, 10 } )
/*
      // With new xbrowse, you do not need this anymore
      :aCols[ 2 ]:bLDClickData   := { || oBrw:EditBrowse( .f., "FIRST,LAST", .f. ) }
      :aCols[ 2 ]:bKeyChar := { |k| If( k == 13, ( oBrw:EditBrowse( .f., "FIRST,LAST", .f. ), 0 ), nil ) }
      :aCols[ 4 ]:bLDClickData   := { || oBrw:EditBrowse( .f., "STREET,CITY,STATE,ZIP", .f. ) }
      :aCols[ 4 ]:bKeyChar := { |k| If( k == 13, ( oBrw:EditBrowse( .f., "STREET,CITY,STATE,ZIP", .f. ), 0 ), nil ) }
      :aCols[ 8 ]:bLDClickData   := { || oBrw:EditBrowse( .f., "AGE,MARRIED,SALARY", .f. ) }
      :aCols[ 8 ]:bKeyChar := { |k| If( k == 13, ( oBrw:EditBrowse( .f., "AGE,MARRIED,SALARY", .f. ), 0 ), nil ) }
*/

      //
      :CreateFromCode()
   END

   ACTIVATE DIALOG oDlg CENTERED
   RELEASE FONT oFont

return nil
 

After you see how this is working, please try adapting to your data.
Let me know any difficulties you face.
I would like to build this behaviour into xbrowse, after your testing.
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10662
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: xBrowse Edit Group Column (DONE)

Postby fraxzi » Tue Jun 19, 2018 6:52 am

Mr. Rao,

The samples works great! but this is with dbf...

Using Child RecordSet with Grouped column, I get Blank fields (the content of child's field value not reflected)

:?:
Kind Regards,
Frances

Fivewin for xHarbour v18.07
xHarbour v1.2.3.x
BCC 7.3 + PellesC8 ( Resource Compiler only)
ADS 10.1 / MariaDB
Crystal Reports 8.5/9.23 DE
xMate v1.15
User avatar
fraxzi
 
Posts: 811
Joined: Tue May 06, 2008 4:28 am
Location: Philippines

Re: xBrowse Edit Group Column (DONE)

Postby nageswaragunupudi » Tue Jun 19, 2018 6:56 am

I sent you revised xbrowse.
Also see the above sample modified.
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10662
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: xBrowse Edit Group Column (DONE)

Postby fraxzi » Tue Jun 19, 2018 7:48 am

nageswaragunupudi wrote:I sent you revised xbrowse.
Also see the above sample modified.



That was a very good fix! :wink:
Kind Regards,
Frances

Fivewin for xHarbour v18.07
xHarbour v1.2.3.x
BCC 7.3 + PellesC8 ( Resource Compiler only)
ADS 10.1 / MariaDB
Crystal Reports 8.5/9.23 DE
xMate v1.15
User avatar
fraxzi
 
Posts: 811
Joined: Tue May 06, 2008 4:28 am
Location: Philippines


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: nageswaragunupudi and 62 guests