passing name of control into a class

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,
I am pretty new at this, and that's why this question might be not possible, but anyway. I have create a new control class based on the datagrid. I am storing the settings of the grid in a database, mapping name column name etc, and I have managed to create the grid in my forms. However my problem now is that I want to have a filter on the dataset in the class to filter on the correct grid. When I use me.name in the class it returns an empty string, but I guess there should be a way to retrieve the name of the datagrid I created on my form. Or is there a better solution to do this?

Thanks in advance

DJ
 
does this new control you have created INHERIT from the datagrid control?
if so then you would need to call MyBase.Name in VB.NET.

David J said:
Hi,
I am pretty new at this, and that's why this question might be not
possible, but anyway. I have create a new control class based on the
datagrid. I am storing the settings of the grid in a database, mapping name
column name etc, and I have managed to create the grid in my forms. However
my problem now is that I want to have a filter on the dataset in the class
to filter on the correct grid. When I use me.name in the class it returns an
empty string, but I guess there should be a way to retrieve the name of the
datagrid I created on my form. Or is there a better solution to do this?
 
Hi Patrick
Yes I inherit the datagrid in my class. I tried your solution just by putting a line like
msgbox(mybase.name)
after the initialize call, but still it remain empty. Any suggestions

Cheer
David
 
Back
Top