473,513 Members | 2,575 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Only Data Grid should be scrollable!

Hi,

I have a web page (asp.net, code:c#). I havean html table with text boxes.
Based on the user input , records are displayed in the data grid below it.
Now the datagrid has a large no. of columns. & depending on what the user
enters, the data grid can grow very large. So to avoid scrolling the whole
page, I just want the data grid to be scrollable. For this I used the <div>
tags around the data grid,
<div id="DGMainHolder"style="OVERFLOW:scroll;WIDTH:960p x;HEIGHT:900px">
<asp:DataGrid>all data grid code here</asp:dataGrid>
</div>

But when I vertically scroll the grid , the grid enters into the html table
with text boxes at the top. Also at the top is an image. I just want to make
the data grid vertically scrollable, so that it doesnt get inside the
controls above it.

My HTML code is:
<form id="Form1" method="post" runat="server">

<asp:image id="Image1" style="Z-INDEX: 102; LEFT: 389px; POSITION:
absolute; TOP: 8px" runat="server"
ImageUrl="file:///C:\Documents and Settings\pmud\My
Documents\images\small.jpg"></asp:image><asp:label id="Label1"
style="Z-INDEX: 103; LEFT: 400px; POSITION: absolute; TOP: 119px"
runat="server"
Font-Bold="True" Font-Underline="True" Width="96px">VIEW
LOGS</asp:label><asp:linkbutton id="LinkButton1" style="Z-INDEX: 104; LEFT:
94px; POSITION: absolute; TOP: 99px"
runat="server" Width="9px" Height="3px">Home</asp:linkbutton></td>

<TABLE id="Table1" style="Z-INDEX: 107; LEFT: 303px; WIDTH: 305px;
POSITION: absolute; TOP: 148px; HEIGHT: 91px"
cellSpacing="1" cellPadding="1" width="305" border="1">
<TR>
<TD style="WIDTH: 126px; HEIGHT: 25px">
<asp:label id="lblCompany" runat="server" Font-Bold="True"
Width="117px" Height="5px">Company Name</asp:label></TD>
<TD style="HEIGHT: 25px">
<asp:textbox id="txtCompany" runat="server" Width="139px"
Height="24px"></asp:textbox></TD>
</TR>
<TR>
<TD style="WIDTH: 126px; HEIGHT: 27px">
<asp:label id="lblMonth" runat="server" Font-Bold="True"
Width="91px" Height="5px">Month</asp:label></TD>
<TD style="HEIGHT: 27px">
<asp:dropdownlist id="ddlMonth" runat="server" Width="115px"
Height="8px">
<asp:ListItem Value="None">None</asp:ListItem>
<asp:ListItem Value="January">January</asp:ListItem>
<asp:ListItem Value="Feburary">Feburary</asp:ListItem>
<asp:ListItem Value="March">March</asp:ListItem>
<asp:ListItem Value="April">April</asp:ListItem>
<asp:ListItem Value="May">May</asp:ListItem>
<asp:ListItem Value="June">June</asp:ListItem>
<asp:ListItem Value="July">July</asp:ListItem>
<asp:ListItem Value="August">August</asp:ListItem>
<asp:ListItem Value="September">September</asp:ListItem>
<asp:ListItem Value="October">October</asp:ListItem>
<asp:ListItem Value="November">November</asp:ListItem>
<asp:ListItem Value="December">December</asp:ListItem>
</asp:dropdownlist></TD>
</TR>
<TR>
<TD style="WIDTH: 126px">
<asp:label id="Label2" runat="server" Font-Bold="True" Width="5px"
Height="5px">Year</asp:label></TD>
<TD>
<asp:textbox id="txtYear" runat="server" Width="126px"
Height="25px"></asp:textbox></TD>
</TR>
</TABLE>

<asp:button id="btnSubmit" style="Z-INDEX: 101; LEFT: 397px; POSITION:
absolute; TOP: 261px"
runat="server" Text="Submit"></asp:button></td>
<div id="DGMainHolder"
style="OVERFLOW:scroll;WIDTH:960px;HEIGHT:900px">< asp:datagrid id=DataGrid1
style="Z-INDEX: 105; LEFT: 0px; POSITION: absolute; TOP: 478px"
runat="server" ForeColor="Black" CellPadding="4" BackColor="#CCCCCC"
CellSpacing="2" BorderWidth="3px" BorderStyle="Solid" BorderColor="#999999"
AutoGenerateColumns="False" DataKeyField="AsiOrder#" DataMember="FormFields"
DataSource="<%# dsCompany1 %>">
<FooterStyle BackColor="#CCCCCC"></FooterStyle>
<SelectedItemStyle Font-Bold="True" ForeColor="White"
BackColor="#000099"></SelectedItemStyle>
<ItemStyle BackColor="White"></ItemStyle>
<HeaderStyle Font-Bold="True" ForeColor="White"
BackColor="Black"></HeaderStyle>
<Columns>
<asp:EditCommandColumn ButtonType="LinkButton" UpdateText="Update"
CancelText="Cancel" EditText="Edit"></asp:EditCommandColumn>
<asp:BoundColumn DataField="Date" SortExpression="ActivationDate"
ReadOnly="True" HeaderText="Date"
DataFormatString="{0:d}">
<ItemStyle Width="70px"></ItemStyle>
</asp:BoundColumn>
<asp:BoundColumn DataField="Region" SortExpression="Region"
ReadOnly="True" HeaderText="Region">
<ItemStyle Width="55px"></ItemStyle>
</asp:BoundColumn>
<

<asp:BoundColumn DataField="CompanyRepID"
SortExpression="CompanyRepID" ReadOnly="True" HeaderText="Company RepID">
<ItemStyle Width="35px"></ItemStyle>
</asp:BoundColumn>
<asp:BoundColumn DataField="Account#" SortExpression="Account#"
ReadOnly="True" HeaderText="Account">
<ItemStyle Width="50px"></ItemStyle>
</asp:BoundColumn>
<asp:BoundColumn DataField="UserName" SortExpression="UserName"
ReadOnly="True" HeaderText="User">
<ItemStyle Width="60px"></ItemStyle>
</asp:BoundColumn>

</Columns>
<PagerStyle HorizontalAlign="Left" ForeColor="Black"
BackColor="#CCCCCC" Mode="NumericPages"></PagerStyle>
</asp:datagrid></div>
</body>
</form>

--
pmud
Nov 19 '05 #1
3 2193

not sure if this will help but the following is what i use to have a
vertical only scroll in my page..it's basically a datagrid inside a
div, which is inside another div:

<DIV id="divLog" style="BORDER-RIGHT: black 1px solid; PADDING-RIGHT:
0px; BORDER-TOP: black 1px solid; DISPLAY: inline; PADDING-LEFT: 0px;
Z-INDEX: 115; LEFT: 368px; PADDING-BOTTOM: 0px; MARGIN: 0px; OVERFLOW:
auto; BORDER-LEFT: black 1px solid; WIDTH: 401px; PADDING-TOP: 0px;
BORDER-BOTTOM: black 1px solid; POSITION: absolute; TOP: 544px;
HEIGHT: 116px; BACKGROUND-COLOR: #d8e1ea; TEXT-ALIGN: center"
ms_positioning="FlowLayout">
<div id="divLogmid" style="MARGIN-TOP: 2px; MARGIN-LEFT: 2px;
MARGIN-RIGHT: 2px"><b>Contact
Log</b> | New Contact</font><br>
<br>
<asp:datagrid id="dgLog" style="Z-INDEX: 118" runat="server"
BackColor="#D8E1EA" EnableViewState="false"
HeaderStyle-BackColor="#cccccc"
AutoGenerateColumns="false" GridLines="None" Width="373px"
BorderStyle="None">
<Columns>
<asp:BoundColumn DataField="Date" HeaderText="Date">
<ItemStyle Width="85px"></ItemStyle>
</asp:BoundColumn>
<asp:BoundColumn DataField="Person" HeaderText="Rep">
<ItemStyle Width="85px"></ItemStyle>
</asp:BoundColumn>
<asp:BoundColumn DataField="Result"
HeaderText="Result">
<ItemStyle Width="100px"></ItemStyle>
</asp:BoundColumn>
<asp:BoundColumn DataField="Comment"
HeaderText="Comment">
<ItemStyle Width="100px"></ItemStyle>
</asp:BoundColumn>
</Columns>
</asp:datagrid>
</div>
</DIV>
On Wed, 26 Jan 2005 07:31:14 -0800, "=?Utf-8?B?cG11ZA==?="
<pm**@discussions.microsoft.com> wrote:
Hi,

I have a web page (asp.net, code:c#). I havean html table with text boxes.
Based on the user input , records are displayed in the data grid below it.
Now the datagrid has a large no. of columns. & depending on what the user
enters, the data grid can grow very large. So to avoid scrolling the whole
page, I just want the data grid to be scrollable. For this I used the <div>
tags around the data grid,
<div id="DGMainHolder"style="OVERFLOW:scroll;WIDTH:960p x;HEIGHT:900px">
<asp:DataGrid>all data grid code here</asp:dataGrid>
</div>

But when I vertically scroll the grid , the grid enters into the html table
with text boxes at the top. Also at the top is an image. I just want to make
the data grid vertically scrollable, so that it doesnt get inside the
controls above it.

My HTML code is:
<form id="Form1" method="post" runat="server">

<asp:image id="Image1" style="Z-INDEX: 102; LEFT: 389px; POSITION:
absolute; TOP: 8px" runat="server"
ImageUrl="file:///C:\Documents and Settings\pmud\My
Documents\images\small.jpg"></asp:image><asp:label id="Label1"
style="Z-INDEX: 103; LEFT: 400px; POSITION: absolute; TOP: 119px"
runat="server"
Font-Bold="True" Font-Underline="True" Width="96px">VIEW
LOGS</asp:label><asp:linkbutton id="LinkButton1" style="Z-INDEX: 104; LEFT:
94px; POSITION: absolute; TOP: 99px"
runat="server" Width="9px" Height="3px">Home</asp:linkbutton></td>

<TABLE id="Table1" style="Z-INDEX: 107; LEFT: 303px; WIDTH: 305px;
POSITION: absolute; TOP: 148px; HEIGHT: 91px"
cellSpacing="1" cellPadding="1" width="305" border="1">
<TR>
<TD style="WIDTH: 126px; HEIGHT: 25px">
<asp:label id="lblCompany" runat="server" Font-Bold="True"
Width="117px" Height="5px">Company Name</asp:label></TD>
<TD style="HEIGHT: 25px">
<asp:textbox id="txtCompany" runat="server" Width="139px"
Height="24px"></asp:textbox></TD>
</TR>
<TR>
<TD style="WIDTH: 126px; HEIGHT: 27px">
<asp:label id="lblMonth" runat="server" Font-Bold="True"
Width="91px" Height="5px">Month</asp:label></TD>
<TD style="HEIGHT: 27px">
<asp:dropdownlist id="ddlMonth" runat="server" Width="115px"
Height="8px">
<asp:ListItem Value="None">None</asp:ListItem>
<asp:ListItem Value="January">January</asp:ListItem>
<asp:ListItem Value="Feburary">Feburary</asp:ListItem>
<asp:ListItem Value="March">March</asp:ListItem>
<asp:ListItem Value="April">April</asp:ListItem>
<asp:ListItem Value="May">May</asp:ListItem>
<asp:ListItem Value="June">June</asp:ListItem>
<asp:ListItem Value="July">July</asp:ListItem>
<asp:ListItem Value="August">August</asp:ListItem>
<asp:ListItem Value="September">September</asp:ListItem>
<asp:ListItem Value="October">October</asp:ListItem>
<asp:ListItem Value="November">November</asp:ListItem>
<asp:ListItem Value="December">December</asp:ListItem>
</asp:dropdownlist></TD>
</TR>
<TR>
<TD style="WIDTH: 126px">
<asp:label id="Label2" runat="server" Font-Bold="True" Width="5px"
Height="5px">Year</asp:label></TD>
<TD>
<asp:textbox id="txtYear" runat="server" Width="126px"
Height="25px"></asp:textbox></TD>
</TR>
</TABLE>

<asp:button id="btnSubmit" style="Z-INDEX: 101; LEFT: 397px; POSITION:
absolute; TOP: 261px"
runat="server" Text="Submit"></asp:button></td>
<div id="DGMainHolder"
style="OVERFLOW:scroll;WIDTH:960px;HEIGHT:900px"> <asp:datagrid id=DataGrid1
style="Z-INDEX: 105; LEFT: 0px; POSITION: absolute; TOP: 478px"
runat="server" ForeColor="Black" CellPadding="4" BackColor="#CCCCCC"
CellSpacing="2" BorderWidth="3px" BorderStyle="Solid" BorderColor="#999999"
AutoGenerateColumns="False" DataKeyField="AsiOrder#" DataMember="FormFields"
DataSource="<%# dsCompany1 %>">
<FooterStyle BackColor="#CCCCCC"></FooterStyle>
<SelectedItemStyle Font-Bold="True" ForeColor="White"
BackColor="#000099"></SelectedItemStyle>
<ItemStyle BackColor="White"></ItemStyle>
<HeaderStyle Font-Bold="True" ForeColor="White"
BackColor="Black"></HeaderStyle>
<Columns>
<asp:EditCommandColumn ButtonType="LinkButton" UpdateText="Update"
CancelText="Cancel" EditText="Edit"></asp:EditCommandColumn>
<asp:BoundColumn DataField="Date" SortExpression="ActivationDate"
ReadOnly="True" HeaderText="Date"
DataFormatString="{0:d}">
<ItemStyle Width="70px"></ItemStyle>
</asp:BoundColumn>
<asp:BoundColumn DataField="Region" SortExpression="Region"
ReadOnly="True" HeaderText="Region">
<ItemStyle Width="55px"></ItemStyle>
</asp:BoundColumn>
<

<asp:BoundColumn DataField="CompanyRepID"
SortExpression="CompanyRepID" ReadOnly="True" HeaderText="Company RepID">
<ItemStyle Width="35px"></ItemStyle>
</asp:BoundColumn>
<asp:BoundColumn DataField="Account#" SortExpression="Account#"
ReadOnly="True" HeaderText="Account">
<ItemStyle Width="50px"></ItemStyle>
</asp:BoundColumn>
<asp:BoundColumn DataField="UserName" SortExpression="UserName"
ReadOnly="True" HeaderText="User">
<ItemStyle Width="60px"></ItemStyle>
</asp:BoundColumn>

</Columns>
<PagerStyle HorizontalAlign="Left" ForeColor="Black"
BackColor="#CCCCCC" Mode="NumericPages"></PagerStyle>
</asp:datagrid></div>
</body>
</form>

--
pmud


Nov 19 '05 #2
You are using Grid layout all the time. Flow layout usually is a better
option, especially if you are using tables anyway. For your grid just
replace absolute positioning with width:100%. Also set overflow style for
the <div> to auto.

Eliyahu

"pmud" <pm**@discussions.microsoft.com> wrote in message
news:D5**********************************@microsof t.com...
Hi,

I have a web page (asp.net, code:c#). I havean html table with text boxes.
Based on the user input , records are displayed in the data grid below it.
Now the datagrid has a large no. of columns. & depending on what the user
enters, the data grid can grow very large. So to avoid scrolling the whole
page, I just want the data grid to be scrollable. For this I used the <div> tags around the data grid,
<div id="DGMainHolder"style="OVERFLOW:scroll;WIDTH:960p x;HEIGHT:900px">
<asp:DataGrid>all data grid code here</asp:dataGrid>
</div>

But when I vertically scroll the grid , the grid enters into the html table with text boxes at the top. Also at the top is an image. I just want to make the data grid vertically scrollable, so that it doesnt get inside the
controls above it.

My HTML code is:
<form id="Form1" method="post" runat="server">

<asp:image id="Image1" style="Z-INDEX: 102; LEFT: 389px; POSITION:
absolute; TOP: 8px" runat="server"
ImageUrl="file:///C:\Documents and Settings\pmud\My
Documents\images\small.jpg"></asp:image><asp:label id="Label1"
style="Z-INDEX: 103; LEFT: 400px; POSITION: absolute; TOP: 119px"
runat="server"
Font-Bold="True" Font-Underline="True" Width="96px">VIEW
LOGS</asp:label><asp:linkbutton id="LinkButton1" style="Z-INDEX: 104; LEFT: 94px; POSITION: absolute; TOP: 99px"
runat="server" Width="9px" Height="3px">Home</asp:linkbutton></td>

<TABLE id="Table1" style="Z-INDEX: 107; LEFT: 303px; WIDTH: 305px;
POSITION: absolute; TOP: 148px; HEIGHT: 91px"
cellSpacing="1" cellPadding="1" width="305" border="1">
<TR>
<TD style="WIDTH: 126px; HEIGHT: 25px">
<asp:label id="lblCompany" runat="server" Font-Bold="True"
Width="117px" Height="5px">Company Name</asp:label></TD>
<TD style="HEIGHT: 25px">
<asp:textbox id="txtCompany" runat="server" Width="139px"
Height="24px"></asp:textbox></TD>
</TR>
<TR>
<TD style="WIDTH: 126px; HEIGHT: 27px">
<asp:label id="lblMonth" runat="server" Font-Bold="True"
Width="91px" Height="5px">Month</asp:label></TD>
<TD style="HEIGHT: 27px">
<asp:dropdownlist id="ddlMonth" runat="server" Width="115px"
Height="8px">
<asp:ListItem Value="None">None</asp:ListItem>
<asp:ListItem Value="January">January</asp:ListItem>
<asp:ListItem Value="Feburary">Feburary</asp:ListItem>
<asp:ListItem Value="March">March</asp:ListItem>
<asp:ListItem Value="April">April</asp:ListItem>
<asp:ListItem Value="May">May</asp:ListItem>
<asp:ListItem Value="June">June</asp:ListItem>
<asp:ListItem Value="July">July</asp:ListItem>
<asp:ListItem Value="August">August</asp:ListItem>
<asp:ListItem Value="September">September</asp:ListItem>
<asp:ListItem Value="October">October</asp:ListItem>
<asp:ListItem Value="November">November</asp:ListItem>
<asp:ListItem Value="December">December</asp:ListItem>
</asp:dropdownlist></TD>
</TR>
<TR>
<TD style="WIDTH: 126px">
<asp:label id="Label2" runat="server" Font-Bold="True" Width="5px"
Height="5px">Year</asp:label></TD>
<TD>
<asp:textbox id="txtYear" runat="server" Width="126px"
Height="25px"></asp:textbox></TD>
</TR>
</TABLE>

<asp:button id="btnSubmit" style="Z-INDEX: 101; LEFT: 397px; POSITION:
absolute; TOP: 261px"
runat="server" Text="Submit"></asp:button></td>
<div id="DGMainHolder"
style="OVERFLOW:scroll;WIDTH:960px;HEIGHT:900px">< asp:datagrid id=DataGrid1 style="Z-INDEX: 105; LEFT: 0px; POSITION: absolute; TOP: 478px"
runat="server" ForeColor="Black" CellPadding="4" BackColor="#CCCCCC"
CellSpacing="2" BorderWidth="3px" BorderStyle="Solid" BorderColor="#999999" AutoGenerateColumns="False" DataKeyField="AsiOrder#" DataMember="FormFields" DataSource="<%# dsCompany1 %>">
<FooterStyle BackColor="#CCCCCC"></FooterStyle>
<SelectedItemStyle Font-Bold="True" ForeColor="White"
BackColor="#000099"></SelectedItemStyle>
<ItemStyle BackColor="White"></ItemStyle>
<HeaderStyle Font-Bold="True" ForeColor="White"
BackColor="Black"></HeaderStyle>
<Columns>
<asp:EditCommandColumn ButtonType="LinkButton" UpdateText="Update"
CancelText="Cancel" EditText="Edit"></asp:EditCommandColumn>
<asp:BoundColumn DataField="Date" SortExpression="ActivationDate"
ReadOnly="True" HeaderText="Date"
DataFormatString="{0:d}">
<ItemStyle Width="70px"></ItemStyle>
</asp:BoundColumn>
<asp:BoundColumn DataField="Region" SortExpression="Region"
ReadOnly="True" HeaderText="Region">
<ItemStyle Width="55px"></ItemStyle>
</asp:BoundColumn>
<

<asp:BoundColumn DataField="CompanyRepID"
SortExpression="CompanyRepID" ReadOnly="True" HeaderText="Company RepID">
<ItemStyle Width="35px"></ItemStyle>
</asp:BoundColumn>
<asp:BoundColumn DataField="Account#" SortExpression="Account#"
ReadOnly="True" HeaderText="Account">
<ItemStyle Width="50px"></ItemStyle>
</asp:BoundColumn>
<asp:BoundColumn DataField="UserName" SortExpression="UserName"
ReadOnly="True" HeaderText="User">
<ItemStyle Width="60px"></ItemStyle>
</asp:BoundColumn>

</Columns>
<PagerStyle HorizontalAlign="Left" ForeColor="Black"
BackColor="#CCCCCC" Mode="NumericPages"></PagerStyle>
</asp:datagrid></div>
</body>
</form>

--
pmud

Nov 19 '05 #3
Hi Mortar,

Thanks. You solved my problem. But instead of using 2 <div> tags, i used
only 1 , the 1st one of yours and it qnswered my question.

"Mortar" wrote:

not sure if this will help but the following is what i use to have a
vertical only scroll in my page..it's basically a datagrid inside a
div, which is inside another div:

<DIV id="divLog" style="BORDER-RIGHT: black 1px solid; PADDING-RIGHT:
0px; BORDER-TOP: black 1px solid; DISPLAY: inline; PADDING-LEFT: 0px;
Z-INDEX: 115; LEFT: 368px; PADDING-BOTTOM: 0px; MARGIN: 0px; OVERFLOW:
auto; BORDER-LEFT: black 1px solid; WIDTH: 401px; PADDING-TOP: 0px;
BORDER-BOTTOM: black 1px solid; POSITION: absolute; TOP: 544px;
HEIGHT: 116px; BACKGROUND-COLOR: #d8e1ea; TEXT-ALIGN: center"
ms_positioning="FlowLayout">
<div id="divLogmid" style="MARGIN-TOP: 2px; MARGIN-LEFT: 2px;
MARGIN-RIGHT: 2px"><b>Contact
Log</b> | New Contact</font><br>
<br>
<asp:datagrid id="dgLog" style="Z-INDEX: 118" runat="server"
BackColor="#D8E1EA" EnableViewState="false"
HeaderStyle-BackColor="#cccccc"
AutoGenerateColumns="false" GridLines="None" Width="373px"
BorderStyle="None">
<Columns>
<asp:BoundColumn DataField="Date" HeaderText="Date">
<ItemStyle Width="85px"></ItemStyle>
</asp:BoundColumn>
<asp:BoundColumn DataField="Person" HeaderText="Rep">
<ItemStyle Width="85px"></ItemStyle>
</asp:BoundColumn>
<asp:BoundColumn DataField="Result"
HeaderText="Result">
<ItemStyle Width="100px"></ItemStyle>
</asp:BoundColumn>
<asp:BoundColumn DataField="Comment"
HeaderText="Comment">
<ItemStyle Width="100px"></ItemStyle>
</asp:BoundColumn>
</Columns>
</asp:datagrid>
</div>
</DIV>
On Wed, 26 Jan 2005 07:31:14 -0800, "=?Utf-8?B?cG11ZA==?="
<pm**@discussions.microsoft.com> wrote:
Hi,

I have a web page (asp.net, code:c#). I havean html table with text boxes.
Based on the user input , records are displayed in the data grid below it.
Now the datagrid has a large no. of columns. & depending on what the user
enters, the data grid can grow very large. So to avoid scrolling the whole
page, I just want the data grid to be scrollable. For this I used the <div>
tags around the data grid,
<div id="DGMainHolder"style="OVERFLOW:scroll;WIDTH:960p x;HEIGHT:900px">
<asp:DataGrid>all data grid code here</asp:dataGrid>
</div>

But when I vertically scroll the grid , the grid enters into the html table
with text boxes at the top. Also at the top is an image. I just want to make
the data grid vertically scrollable, so that it doesnt get inside the
controls above it.

My HTML code is:
<form id="Form1" method="post" runat="server">

<asp:image id="Image1" style="Z-INDEX: 102; LEFT: 389px; POSITION:
absolute; TOP: 8px" runat="server"
ImageUrl="file:///C:\Documents and Settings\pmud\My
Documents\images\small.jpg"></asp:image><asp:label id="Label1"
style="Z-INDEX: 103; LEFT: 400px; POSITION: absolute; TOP: 119px"
runat="server"
Font-Bold="True" Font-Underline="True" Width="96px">VIEW
LOGS</asp:label><asp:linkbutton id="LinkButton1" style="Z-INDEX: 104; LEFT:
94px; POSITION: absolute; TOP: 99px"
runat="server" Width="9px" Height="3px">Home</asp:linkbutton></td>

<TABLE id="Table1" style="Z-INDEX: 107; LEFT: 303px; WIDTH: 305px;
POSITION: absolute; TOP: 148px; HEIGHT: 91px"
cellSpacing="1" cellPadding="1" width="305" border="1">
<TR>
<TD style="WIDTH: 126px; HEIGHT: 25px">
<asp:label id="lblCompany" runat="server" Font-Bold="True"
Width="117px" Height="5px">Company Name</asp:label></TD>
<TD style="HEIGHT: 25px">
<asp:textbox id="txtCompany" runat="server" Width="139px"
Height="24px"></asp:textbox></TD>
</TR>
<TR>
<TD style="WIDTH: 126px; HEIGHT: 27px">
<asp:label id="lblMonth" runat="server" Font-Bold="True"
Width="91px" Height="5px">Month</asp:label></TD>
<TD style="HEIGHT: 27px">
<asp:dropdownlist id="ddlMonth" runat="server" Width="115px"
Height="8px">
<asp:ListItem Value="None">None</asp:ListItem>
<asp:ListItem Value="January">January</asp:ListItem>
<asp:ListItem Value="Feburary">Feburary</asp:ListItem>
<asp:ListItem Value="March">March</asp:ListItem>
<asp:ListItem Value="April">April</asp:ListItem>
<asp:ListItem Value="May">May</asp:ListItem>
<asp:ListItem Value="June">June</asp:ListItem>
<asp:ListItem Value="July">July</asp:ListItem>
<asp:ListItem Value="August">August</asp:ListItem>
<asp:ListItem Value="September">September</asp:ListItem>
<asp:ListItem Value="October">October</asp:ListItem>
<asp:ListItem Value="November">November</asp:ListItem>
<asp:ListItem Value="December">December</asp:ListItem>
</asp:dropdownlist></TD>
</TR>
<TR>
<TD style="WIDTH: 126px">
<asp:label id="Label2" runat="server" Font-Bold="True" Width="5px"
Height="5px">Year</asp:label></TD>
<TD>
<asp:textbox id="txtYear" runat="server" Width="126px"
Height="25px"></asp:textbox></TD>
</TR>
</TABLE>

<asp:button id="btnSubmit" style="Z-INDEX: 101; LEFT: 397px; POSITION:
absolute; TOP: 261px"
runat="server" Text="Submit"></asp:button></td>
<div id="DGMainHolder"
style="OVERFLOW:scroll;WIDTH:960px;HEIGHT:900px"> <asp:datagrid id=DataGrid1
style="Z-INDEX: 105; LEFT: 0px; POSITION: absolute; TOP: 478px"
runat="server" ForeColor="Black" CellPadding="4" BackColor="#CCCCCC"
CellSpacing="2" BorderWidth="3px" BorderStyle="Solid" BorderColor="#999999"
AutoGenerateColumns="False" DataKeyField="AsiOrder#" DataMember="FormFields"
DataSource="<%# dsCompany1 %>">
<FooterStyle BackColor="#CCCCCC"></FooterStyle>
<SelectedItemStyle Font-Bold="True" ForeColor="White"
BackColor="#000099"></SelectedItemStyle>
<ItemStyle BackColor="White"></ItemStyle>
<HeaderStyle Font-Bold="True" ForeColor="White"
BackColor="Black"></HeaderStyle>
<Columns>
<asp:EditCommandColumn ButtonType="LinkButton" UpdateText="Update"
CancelText="Cancel" EditText="Edit"></asp:EditCommandColumn>
<asp:BoundColumn DataField="Date" SortExpression="ActivationDate"
ReadOnly="True" HeaderText="Date"
DataFormatString="{0:d}">
<ItemStyle Width="70px"></ItemStyle>
</asp:BoundColumn>
<asp:BoundColumn DataField="Region" SortExpression="Region"
ReadOnly="True" HeaderText="Region">
<ItemStyle Width="55px"></ItemStyle>
</asp:BoundColumn>
<

<asp:BoundColumn DataField="CompanyRepID"
SortExpression="CompanyRepID" ReadOnly="True" HeaderText="Company RepID">
<ItemStyle Width="35px"></ItemStyle>
</asp:BoundColumn>
<asp:BoundColumn DataField="Account#" SortExpression="Account#"
ReadOnly="True" HeaderText="Account">
<ItemStyle Width="50px"></ItemStyle>
</asp:BoundColumn>
<asp:BoundColumn DataField="UserName" SortExpression="UserName"
ReadOnly="True" HeaderText="User">
<ItemStyle Width="60px"></ItemStyle>
</asp:BoundColumn>

</Columns>
<PagerStyle HorizontalAlign="Left" ForeColor="Black"
BackColor="#CCCCCC" Mode="NumericPages"></PagerStyle>
</asp:datagrid></div>
</body>
</form>

--
pmud


Nov 19 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
11638
by: Matt Kruse | last post by:
This is a typical layout, but I have specific requirements. I'm trying to figure out a) if it's possible to meet the requirements and b) if so, how. +---------------+ | header | +---------------+ | body | | (scrollable) | +---------------+ | footer |
2
1638
by: scott | last post by:
Hi all, Iv got a slight problem with a datagrid and the ability to only display certain things in it. I have a Data grid which is connected to a data table. The data table is connected to a data set which in turn gets its info from
2
252
by: Jim Corey | last post by:
Hello, I've been using the datagrid, but now I need to sort on the columns, and I really want to do this on the client to save performance time. I had a third-party grid I used in ASP that worked great, but it was difficult to work with. So my list of requirements are simply: -- Sort by column (which implies that it'll be scrollable)
8
2395
by: pmud | last post by:
Hi, I have 2 questions: 1. I have an editable data grid with 21 columns. I need to edit only 2 cloumns in this data grid. But when the grid is displayed in Edit mode, all the columns show long text boxes whichmakes the user to SCROLL a lot. I need only these 2 cloumns to be displayed in Edit mode. Is that possible & how? 2. Also, even...
1
1297
by: Elhanan | last post by:
hi... i have a scrollable data grid with which is sortable via table control above that datagrid (i took it from an article somwhere).. trouble is i can't seem to set the columns width for the table control to match the ones on datagrid, when i almost did, changing the resolution messed everything up. (i'm % width) is there a way to...
1
1181
by: Cristof Falk | last post by:
Is there an easy way to have a scrollable grid where you can lcok top lines or left columns for headings? It seems like you have to purchase this, which we'd rather not do. We're most interested in VS2005, but have some apps in VS.NET 2003. If we need to purchase, any recommendations of controls that match the built-in one best? Thanks!
2
1845
by: Tom | last post by:
I need to display a series of controls (in my case, a custom control) in a grid-like fashion. This means this particular control would be repeated multiple times, arranged in a row/column format. It would also support scrolling, and fixed/scrollable headers/footers. Basically just like a grid control, but has the capability to use a custom...
3
1539
by: Steve | last post by:
is it possible to create a scrollable data grid without using the div command (i've tried this and it doesn't look good in our system). I was using a program called scrollinggrid, but the designers seem to have disappeared.
0
1774
by: sonali | last post by:
I Have A Grid With Drop Down List As Template Column In Scrolling There Is some Problem Code Is As Follows: <style type="text/css"> .gridFixedHeader { background-color:white; position:relative;
0
7178
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
1
7128
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7543
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
1
5103
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
4759
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3255
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3242
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1612
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
473
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.