jvcoach23 Posted June 30, 2004 Posted June 30, 2004 I'm trying to learn more about create classes. I might be taking the wrong approach, so please advise. I want to create something that holds my tablestyle info in it. I have a windows form that has several grids on it.. all are the exact same layout but are hittting different datasets. I would like to create something that I could put all my formatting in adn then just make a call to this passing in the grid name.. how should I go about doing that thanks shannon Quote JvCoach23 VB.Net newbie MS Sql Vet
Moderators Robby Posted June 30, 2004 Moderators Posted June 30, 2004 You don't need a seperate class for this, you can just create a sub like this... Private sub FormatGrid(byRef dg as Datagrid) with dg .Do stuff to format the grid here end with end sub Then to use this in your code.... FormatGrid(myFirstGrid) FormatGrid(mySecondGrid) FormatGrid(myThirdGrid) Quote Visit...Bassic Software
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.