• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 436
  • Last Modified:

How to put a line seperator between two <asp:BoundField DataField> controls.

Hello, I have a DetailsView control on one line, and then immediately followed by another line that has a save and cancel button. These rows are too close together and I need an empty line
so that there is a space between the data bound field and my button control. Can someone tell me how to but some type of spacer before this line of code:
             <asp:CommandField InsertText="Save" ShowEditButton="True" ButtonType="Button"  
                ShowInsertButton="True" />

The code snippet below shows this code again with the other code
<asp:DetailsView ID="DetailsView1" runat="server" AutoGenerateRows="False" 
         DataKeyNames="TempUserID" DataSourceID="SqlDataSource1" 
        DefaultMode="Insert" Height="50px" Width="333px" GridLines="None">
        <Fields>
            <asp:BoundField DataField="TempUserID" HeaderText="TempUserID" 
                InsertVisible="False" ReadOnly="True" SortExpression="TempUserID" />
            <asp:BoundField DataField="UserFirstName" HeaderText="First Name" 
                SortExpression="UserFirstName" />
            <asp:BoundField DataField="UserLastName" HeaderText="Last Name" 
                SortExpression="UserLastName" />
            <asp:BoundField DataField="userEmail" HeaderText="Email" 
                SortExpression="userEmail" />
             <asp:CommandField InsertText="Save" ShowEditButton="True" ButtonType="Button"  
                ShowInsertButton="True" />
        </Fields>
    </asp:DetailsView>

Open in new window

0
brgdotnet
Asked:
brgdotnet
1 Solution
 
spprivateCommented:
You can use <CommandRowStyle BackColor="#E2DED6" Font-Bold="True" /> to give a distinct color to that button row.
Alternatively you can trick it by adding a dummy column before the command button
0
 
brgdotnetcontractorAuthor Commented:
Hi spprivate,

Cool, the dummy column option sounds good. In html I know how to do this easily. But how would I do it using asp.net for the code above? Can you show me how?
0

Featured Post

The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now