TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
sachi vasishta
NA
252
0
cell spacing between grid view cells
Nov 3 2009 5:14 AM
Hi,
In a web form I want to display some values stored in the db on the grid view. I have done this using the code below.
to retrieve data from db
protected
void
Page_Load(
object
sender,
EventArgs
e)
{
DataTable
dt =
new
DataTable
();
string
seltab =
string
.Format(
"select jobid JobID,jobtitle as Position,c2crate as Rate,vendorcompany as Vendor,endclientname as POC,empstatus as Status from jobdetails"
);
dt = obj.gettable(seltab);
GridView1.DataSource = dt;
GridView1.DataBind();
}
and the gridview control's property is
<
table
width
="100%">
<
tr
align
="center">
<
td
>
<
asp
:
GridView
ID
="GridView1"
runat
="server"
BackColor
="#DEBA84"
BorderColor
="#DEBA84"
BorderStyle
="None"
BorderWidth
="1px"
CellPadding
="3"
CellSpacing
="3">
<
RowStyle
BackColor
="#FFF7E7"
ForeColor
="#8C4510"
/>
<
FooterStyle
BackColor
="#F7DFB5"
ForeColor
="#8C4510"
/>
<
PagerStyle
ForeColor
="#8C4510"
HorizontalAlign
="Center"
/>
<
SelectedRowStyle
BackColor
="#738A9C"
Font-Bold
="True"
ForeColor
="White"
/>
<
HeaderStyle
BackColor
="#A55129"
Font-Bold
="True"
ForeColor
="White"
/>
</
asp
:
GridView
>
</
td
>
</
tr
>
</
table
>
when I ran the application I got the result but it was showing like below
JobID|Vendor|Rate|POC|Status
112|XXX|
I want to give some spacing and want the gridview to look better
Thanks
Reply
Answers (
1
)
How to Fetch Contact List using EmailID and Password programmatically in c# & asp.net?
Need Simple Progress Bar in asp.net