Questions concerning detailsview or datagrid ASP.NET 2.0

S

Stefan Gsundbrunn

Hello,

first of all - let me introduce myself. I am a german ColdFusion developer
since 1997. I watched the development of Asp.net for a few years and now,
with the beta of 2.0 I would like to learn this language.

I´ve tested certain record viewer components pretty successfully - but
a few things I cannot solve - even google didn´t show me the
information I was looking fo (maybe I just cannot find them as I don´t
kjnow exactly what I am looking for)

Please let me know if this is not the correct group.

My code is:

<form runat="server">
<asp:detailsview runat="server" id="detailView"
datasourceid="testDB" allowpaging="true" headertext="Fischarten"
datakeynames="ftbFischArtId" autogenerateeditbutton="true"
autogeneratedeletebutton="true" autogenerateinsertbutton="true"
GridLines="both" width="250px"
BorderWidth="1" BorderColor="Black" cellpadding="2">

<headerstyle Font-Name="arial"
Font-Size="9pt"
Font-Bold="false"
ForeColor="black"
BackColor="#f55405" />
<rowstyle Font-Name="arial"
Font-Size="9pt"
Font-Bold="false"
ForeColor="black"
BackColor="white"/>
<editrowstyle Font-Name="arial"
Font-Size="9pt"
Font-Bold="false"
ForeColor="black"
BackColor="#D4D0C8"/>
<pagerstyle BackColor="#D4D0C8"
horizontalalign="left" />
<pagersettings firstpageimageurl="images/left_all.jpg"
lastpageimageurl="images/right_all.jpg"
nextpageimageurl="images/right.jpg"
previouspageimageurl="images/left.jpg"
mode="NextPreviousFirstLast" />
</asp:detailsview>
</form>

Works pretty fine - except the layout. And this are my questions:

How can I set borders to header and pager (including the color)?
How can I change the color of the gridlines? They always gray -
independend on what I do.
How can I change the width of a cell? Maybe the left cell of all rows. And
how to change the color of them?

Any hint is appreciated. Thanks in advance!

Stefan
 
S

Stefan Gsundbrunn

Looks really good for me - thanks a lot! I will check and find out.

Best regards

Stefan
 
B

Brock Allen

The DetailsView has it's own predefined layout. If you want more control
look into the <asp:FormView>. It's the same idea, except you provide your
own template for the entire layout. When databinding, don't use the <%# Eval
%> syntax, instead be sure to use the <%# Bind %> syntax so your posted changes
will be sent back to your DataSource control.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top