1

I developed a gridview by following this tutorial but i want to change it's css, can someone point me to right direction please,

Here's a little bit of markup

<asp:GridView ID="GridView1"
runat="server"
DataKeyNames="CustomerID" AutoGenerateColumns="false"
OnRowDataBound="gv_RowDataBound" Width="80%"
AllowPaging="True" PageSize="20" cssClass="myclass" />

I added a css class but not sure what will go in class so that I make my gridview attractive,

3
  • Your gridview will be rendered like a table (just check HTML source of rendered apx page), so you'll need to style a table with class myclass in CSS. Eventually you can give other classes to rows or even cell, but still you'll need to define it in a css file... Commented May 10, 2013 at 11:08
  • @Bartdude thanks that is helpful, do you know any post which is doing it, so that I can follow it please Commented May 10, 2013 at 11:09
  • Do you know about CSS at all actually ? I would consider learning about it as a start... Then if you got specific problem, SO can help Commented May 10, 2013 at 11:12

2 Answers 2

2

Please check below codeproject link. This may help you.

Add some style to your datagrids

Sign up to request clarification or add additional context in comments.

Comments

0

You can use the this : http://msdn.microsoft.com/en-us/library/aa479342.aspx . Skin is easy to maintain and change

1 Comment

On the other hand I'm quite sure it will generate inline-style, which is not to be recommended...

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.