ComboSearchGrid

HMG Samples and Enhancements

Moderator: Rathinagiri

EduardoLuis
Posts: 682
Joined: Tue Jun 04, 2013 6:33 pm
Location: Argentina

Re: ComboSearchGrid

Post by EduardoLuis »

Hola Andy

Lindo ejemplo.
Prodrias publicar el codigo ??
Gracias por compartir
Como realizaste el gif ?? muy interesante y util.-
Eduardo


Hi Andy:

Nice sample
Could you post the code ??
Thanks for share.
How do you produce the gif ?? Very interest and usefull.
With regards
Eduardo
User avatar
andyglezl
Posts: 1461
Joined: Fri Oct 26, 2012 7:58 pm
Location: Guadalajara Jalisco, MX
Contact:

Re: ComboSearchGrid

Post by andyglezl »

Aquí el link del programa que utilizo para los gif.
+------------------------------------------------------------
Here the link of the program that I use for gifs.

https://www.screentogif.com


El código de la busqueda aún está en desarrollo por la necesidad de un cliente :oops:
*--------------------------------------------------------------------------------------------------------
The search code is still under development due to the need of a client. :oops:
Andrés González López
Desde Guadalajara, Jalisco. México.
EduardoLuis
Posts: 682
Joined: Tue Jun 04, 2013 6:33 pm
Location: Argentina

Re: ComboSearchGrid

Post by EduardoLuis »

Hi Andy:

Thanks for the link
About the code, my request was about the basic routine you perform combining two way of search, looks very usefull, positioning the found item on listbox.-
With regards.
Eduardo
User avatar
andyglezl
Posts: 1461
Joined: Fri Oct 26, 2012 7:58 pm
Location: Guadalajara Jalisco, MX
Contact:

Re: ComboSearchGrid

Post by andyglezl »

OK, Practicamente todo se reduce a esto.
*----------------------------------------------------
OK, practically everything comes down to this.

Code: Select all

		Ctes->( DBSetOrder(1) )
		cCod := GetProperty( cWind, "TB_Codigo", "Value" )
		IF Ctes->( DBSeek( GetProperty( cWind, "TB_Codigo", "Value" ), .T. ) ) 
			cNom := UPPER( ALLTRIM( Ctes->NOMBRE ) )
			SetProperty( cWind, "TB_Nombre", "Value", ALLTRIM( Ctes->NOMBRE ) + " " + ALLTRIM( Ctes->APELLIDOS ) )
			Ctes->( DBGOTOP() )
			DoMethod( cWind, "CB_1", "DeleteAllItems" )
			DO WHILE Ctes->( OrdWildSeek( "*" + cCod + "*", .T. ) )
				DoMethod( cWind, "CB_1", "AddItem", Ctes->CODIGO +" - " + ALLTRIM( Ctes->NOMBRE ) + " " + ALLTRIM( Ctes->APELLIDOS ) )
			ENDDO
			Ctes->( DBSetOrder(2) )
			Ctes->( DBGOTOP() )
			DoMethod( cWind, "CB_2", "DeleteAllItems" )
			DO WHILE Ctes->( OrdWildSeek( "*" + cNom + "*", .T. ) )
				DoMethod( cWind, "CB_2", "AddItem", Ctes->CODIGO +" - " + ALLTRIM( Ctes->NOMBRE ) + " " + ALLTRIM( Ctes->APELLIDOS ) )
			ENDDO
		ELSE
			SetProperty( cWind, 'L_Warning', "Value", 'Cliente no encontrado !'  )
		ENDIF

Andrés González López
Desde Guadalajara, Jalisco. México.
EduardoLuis
Posts: 682
Joined: Tue Jun 04, 2013 6:33 pm
Location: Argentina

Re: ComboSearchGrid

Post by EduardoLuis »

Hi Andy:

Thanks. Simple and effectiv.-
Eduardo

Hola Andy:

Gracias. Simple y efectivo
Eduardo
User avatar
tonton2
Posts: 444
Joined: Sat Jun 29, 2013 1:26 pm
Location: Algerie
Contact:

Re: ComboSearchGrid

Post by tonton2 »

andyglezl wrote: Tue Feb 12, 2019 9:07 pm OK, Practicamente todo se reduce a esto.
*----------------------------------------------------
OK, practically everything comes down to this.

Code: Select all

		Ctes->( DBSetOrder(1) )
		cCod := GetProperty( cWind, "TB_Codigo", "Value" )
		IF Ctes->( DBSeek( GetProperty( cWind, "TB_Codigo", "Value" ), .T. ) ) 
			cNom := UPPER( ALLTRIM( Ctes->NOMBRE ) )
			SetProperty( cWind, "TB_Nombre", "Value", ALLTRIM( Ctes->NOMBRE ) + " " + ALLTRIM( Ctes->APELLIDOS ) )
			Ctes->( DBGOTOP() )
			DoMethod( cWind, "CB_1", "DeleteAllItems" )
			DO WHILE Ctes->( OrdWildSeek( "*" + cCod + "*", .T. ) )
				DoMethod( cWind, "CB_1", "AddItem", Ctes->CODIGO +" - " + ALLTRIM( Ctes->NOMBRE ) + " " + ALLTRIM( Ctes->APELLIDOS ) )
			ENDDO
			Ctes->( DBSetOrder(2) )
			Ctes->( DBGOTOP() )
			DoMethod( cWind, "CB_2", "DeleteAllItems" )
			DO WHILE Ctes->( OrdWildSeek( "*" + cNom + "*", .T. ) )
				DoMethod( cWind, "CB_2", "AddItem", Ctes->CODIGO +" - " + ALLTRIM( Ctes->NOMBRE ) + " " + ALLTRIM( Ctes->APELLIDOS ) )
			ENDDO
		ELSE
			SetProperty( cWind, 'L_Warning', "Value", 'Cliente no encontrado !'  )
		ENDIF

Bonjour,
Peut on avoir un exemple complet,merci a vous
can you put a sample, thank you
L'Algerie vous salut
Y.TABET
User avatar
jairpinho
Posts: 420
Joined: Mon Jul 18, 2011 5:36 pm
Location: Rio Grande do Sul - Brasil
Contact:

Re: ComboSearchGrid

Post by jairpinho »

Rathinagiri wrote: Wed Apr 24, 2013 4:56 pm Hi,

Here I am sharing my experimentation for multi-column combosearchgrid based on Esgici's ComboSearchBox. I was very much longing for a control like in MS Access with multi-column combobox. Now it is possible.

Features of ComboSearchGrid:

- I have used SQLite temporary database and table to optimize the search
- Since the combosearchgrid is based on Virtual Grid there is no limitation as to the number of rows! In the sample I have used 10000 rows. But you can check for more rows and find out how fast it is. Actually there is no program degradation because of the number of rows.
- The text is searched in all the columns.
- Anywhere search is also available
- You can show/hide the headers too.
- SQLite operations are totally hidden and you need not know anything about SQLite.

csg.jpg

Please give your suggestions, we can make a better control!

combosearchgrid.zip
Hello Rathi, this is a fantastic function, just missing an example with mysql.
Jair Pinho
HMG ALTA REVOLUÇÃO xBASE
HMG xBASE REVOLUTION HIGH
http://www.hmgforum.com.br
Post Reply