Page 1 of 1

oBrw:cFilterFld

PostPosted: Sun Mar 22, 2015 9:58 pm
by FranciscoA
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
...
   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.

Re: oBrw:cFilterFld

PostPosted: Mon Mar 23, 2015 4:02 am
by nageswaragunupudi
Code: Select all  Expand view
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.

Re: oBrw:cFilterFld

PostPosted: Mon Mar 23, 2015 2:15 pm
by FranciscoA
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

Re: oBrw:cFilterFld

PostPosted: Mon Mar 23, 2015 2:29 pm
by FranciscoA
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

Re: oBrw:cFilterFld

PostPosted: Mon Mar 23, 2015 4:21 pm
by FranciscoA
Mr. Nages.
Sorry... was my mistake!!. It is working now.
Thanks for your attention, again.

Regards.

Re: oBrw:cFilterFld

PostPosted: Mon Mar 23, 2015 4:35 pm
by nageswaragunupudi
Glad to know it is working.