oBrw:cFilterFld

oBrw:cFilterFld

Postby FranciscoA » Sun Mar 22, 2015 9:58 pm

Compañeros en el foro:

Tengo un xBrowse con el cual quiero auditoriar una tabla dbf, con dos indices TEMPORARY

Al hacer click en cada una de las columnas que estan indexadas, todo trabaja bien, incluso busqueda incremental, pero cuando uso oBrw::lIncrFilter := .t., el filtro permanece con el de la primer busqueda, indistintamente cambie de columna (click en header).

Es decir, si al entrar al browse click una de las columnas indexadas, la condicion de filtro se mantiene por esa columna cuando cambio a la otra.

He intentado lo siguiente pero no funciona:
Code: Select all  Expand view  RUN
...
   WITH OBJECT oBrw
      :lIncrFilter      := .t.
      :lSeekWild        := .t.

      :MakeTotals()
      :CreateFromCode()
   END
...
oBrw:aCols[6]:bRClickHeader := {|| oBrw:cFilterFld := "Cliente", oBrw:Refresh() }    //no hace caso
oBrw:aCols[8]:bRClickHeader := {|| oBrw:cFilterFld := "Descrip", oBrw:Refresh() }   //no hace caso

   oBrw:aCols[6]:cFilterFld := "Cliente"   // da error
   oBrw:aCols[8]:cFilterFld := "Descrip"   // da error
 

Hay alguna manera de corregir este comportamiento?
Alguien ya lo ha hecho y quiere compartirlo?

Muchas gracias.
Francisco J. Alegría P.
Chinandega, Nicaragua.

Fwxh-MySql-TMySql
User avatar
FranciscoA
 
Posts: 2159
Joined: Fri Jul 18, 2008 1:24 am
Location: Chinandega, Nicaragua, C.A.

Re: oBrw:cFilterFld

Postby nageswaragunupudi » Mon Mar 23, 2015 4:02 am

Code: Select all  Expand view  RUN
oBrw:aCols[6]:bRClickHeader := {|| oBrw:Seek( "" ). oBrw:cFilterFld := "Cliente" }  
oBrw:aCols[8]:bRClickHeader := {|| oBrw:Seek( "" ), oBrw:cFilterFld := "Descrip" }  
 

I personally prefer offering the choice of filter-field to the user in a combobox. That is more clear to the user. Please note filter field has nothing to do with index order.
Regards

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

Re: oBrw:cFilterFld

Postby FranciscoA » Mon Mar 23, 2015 2:15 pm

nageswaragunupudi wrote:oBrw:aCols[6]:bRClickHeader := {|| oBrw:Seek( "" ). oBrw:cFilterFld := "Cliente" }  
oBrw:aCols[8]:bRClickHeader := {|| oBrw:Seek( "" ), oBrw:cFilterFld := "Descrip" }  
 

Mr. Nages, thanks por your reply.

The behavior still the same.
The incremental filter continues working on the previous column even when you click on the header of the other column.
Best regards
Last edited by FranciscoA on Mon Mar 23, 2015 2:48 pm, edited 1 time in total.
Francisco J. Alegría P.
Chinandega, Nicaragua.

Fwxh-MySql-TMySql
User avatar
FranciscoA
 
Posts: 2159
Joined: Fri Jul 18, 2008 1:24 am
Location: Chinandega, Nicaragua, C.A.

Re: oBrw:cFilterFld

Postby FranciscoA » Mon Mar 23, 2015 2:29 pm

I personally prefer offering the choice of filter-field to the user in a combobox. That is more clear to the user. Please note filter field has nothing to do with index order.


I will try your sugestion

Regards
Francisco J. Alegría P.
Chinandega, Nicaragua.

Fwxh-MySql-TMySql
User avatar
FranciscoA
 
Posts: 2159
Joined: Fri Jul 18, 2008 1:24 am
Location: Chinandega, Nicaragua, C.A.

Re: oBrw:cFilterFld

Postby FranciscoA » Mon Mar 23, 2015 4:21 pm

Mr. Nages.
Sorry... was my mistake!!. It is working now.
Thanks for your attention, again.

Regards.
Francisco J. Alegría P.
Chinandega, Nicaragua.

Fwxh-MySql-TMySql
User avatar
FranciscoA
 
Posts: 2159
Joined: Fri Jul 18, 2008 1:24 am
Location: Chinandega, Nicaragua, C.A.

Re: oBrw:cFilterFld

Postby nageswaragunupudi » Mon Mar 23, 2015 4:35 pm

Glad to know it is working.
Regards

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


Return to FiveWin para Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 112 guests