[Gambas-user] Gridview_ColumnClick(). How...

tobi tobiasboege01 at ...1601...
Mon Jun 25 18:30:15 CEST 2012


On Mon, 25 Jun 2012, Ru Vuott wrote:
> Hello,
> 
> I have a Gridview with an "horizontal" Header. I saw there would be an event that it rises when I click on a cell of the Header: GridView1_ColumnClick()
> 
> ...the documentatio says:
> 
>     Event ColumnClick ( Column As Integer )
> 
> Sorry, I didn't understand, can you write a little example ?
> 
> Thanks
> 
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and 
> threat landscape has changed and how IT managers can respond. Discussions 
> will include endpoint security, mobile security and the latest in malware 
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user

Hi,

you get the number of the column that was clicked on as the Column argument, so that you can design
actions depending on the column number (like sorting after the type of data in that column, e.g.)
How you use it, depends on your application but generally speaking:

Public Sub GridView1_ColumnClick(Column As Integer)
  Print "You clicked on column #";; Column
End

Regards,
Tobi




More information about the User mailing list