Fordraiders
asked on
asp gridview header over flow off border in page
asp.net c#
Newbie to asp c# .net
I have a grid view on a form..(not the sitemaster form).
I keep getting the headers of the grid to flow off the form.
The need the white space to fill up to the edge of the last header column.
Thanks
fordraiders
WHITE-SPACE.png
Newbie to asp c# .net
I have a grid view on a form..(not the sitemaster form).
I keep getting the headers of the grid to flow off the form.
The need the white space to fill up to the edge of the last header column.
Thanks
fordraiders
WHITE-SPACE.png
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
kyle, could it be padding ?
You need to apply styles to <asp:GridView>
ASKER
Prakash. Apply styles to asp gridview?
What compiler are you using?
overflow-x is a CSS3 property:
http://www.w3schools.com/cssref/css3_pr_overflow-x.asp
note that you can write it out like that. You'll get the warning but it should work in the browser as long as the browser supports css 3.
you could just change to overflow: auto as well.
overflow-x is a CSS3 property:
http://www.w3schools.com/cssref/css3_pr_overflow-x.asp
note that you can write it out like that. You'll get the warning but it should work in the browser as long as the browser supports css 3.
you could just change to overflow: auto as well.
ASKER
asp.net VS 2010
ASKER
kyle,I guess my question is also, does it look like I have the <div> in the right place. ?
ASKER
even with this code:
The overflow: auto still is not working.
The overflow: auto still is not working.
<div style="overflow:auto;width:2024px"> <!-- or 100% -->
<asp:GridView ID="RSVPGridview" runat="server" HeaderStyle-BackColor="#3AC0F2" OnRowDataBound="RSVPGridview_RowDataBound"
HeaderStyle-ForeColor="White" OnSelectedIndexChanged="RSVP_Click"
DataSourceID="SqlDataSourceRSVPGridview" CellSpacing="5" GridLines="None" >
<Columns>
<asp:CommandField ShowSelectButton="True" />
</Columns>
<HeaderStyle BackColor="#CCCCCC" ForeColor="Black"></HeaderStyle>
</asp:GridView>
</div>
how wide is the form. The div looks like it's in the correct place.
You could also try specifying a css class:
You could also try specifying a css class:
.myGrid
{
width:1024px;
}
<asp:GridView cssClass ="myGrid"
You need to apply styles to <asp:GridView>I already suggested to apply styles to Grid,
<style>.divContainer{
overflow-x: scroll;
width: 1000px;
Height: 300px;
position:relative;
}
.gridview{
position:inherit;overflow:auto;
}
</style>
<div class="divContainer">
<asp:GridView id="GridView1" cssClass="gridview" runat="server" />
</div>
Try changing overflow and position values to work your solution!
ASKER
prakash,
Does this get placed in the .aspx page ?
once i do , i keep getting a overflow is not a css property name.
ans "style" cannot be nested within a <div>
Does this get placed in the .aspx page ?
once i do , i keep getting a overflow is not a css property name.
ans "style" cannot be nested within a <div>
Which version of CSS or HTML you are working?
these are the normals css styles!
please include in first line of HTML/aspx (in case master) code
<!DOCTYPE html>
If nor resolve, please provide redered html code to check with
these are the normals css styles!
please include in first line of HTML/aspx (in case master) code
<!DOCTYPE html>
If nor resolve, please provide redered html code to check with
VS 2010 doesn't work well with html5. The errors that you're seeing don't mean that the page won't render correctly. The errors in the html page for that type can safely be ignored. The main thing is the output after the fact.
ASKER
kyle, your original post ending up working
ASKER