hide column from a datagrid + change rows colors

Hi,
i need to hide a column from a vb.net datagrid.
the datagrid source is a table from the dataset

+

i need to change the color of the rows in this grid, say fst one is blue second white third blue fourth white....

what is the simpler way to do it...
thanks
LVL 3
mte01Asked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

razorback041Commented:
try this for the column
http://msdn.microsoft.com/library/en-us/dnwinforms/html/wnf_custdatagrid.asp

and for the alternating colors
use the AlternatingBackColor property of the datagrid  ala

DataGrid1.AlternatingBackColor = Yellow
DataGrid1.BackColor = White


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
aki4uCommented:
to hide columns, use:
DataGrid.Columns(columnnumber).Visible = False

to change the colors you'll need to add this to html view of your datagrid:
<AlternatingItemStyle BackColor="Blue" ForeColor="White" ></AlternatingItemStyle>
mte01Author Commented:
Hi aki4u
im talking about the VB.net's datagrid DataGrid.Columns(columnnumber).Visible = False didnt compile
razorback041 methods worked just fine,
thanks for the help anyway aki4u


It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic.NET

From novice to tech pro — start learning today.