|
|
|
ข้อความล้นออกนอกกรอบ gridview ที่ได้กำหนดให้ gridview ยาวเท่ากับ Panel |
|
|
|
|
|
|
|
เอา Code หน้า .aspx มาดูหน่อยครับ
|
|
|
|
|
Date :
2012-08-27 17:35:00 |
By :
mr.win |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Code (VB.NET)
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Show.aspx.vb" Inherits="Show" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<table border="0" cellpadding="0" cellspacing="0" width="1900px">
<tr>
<td valign="top" style="height: 600px; width: 950px;">
<asp:Panel ID="Panel1" runat="server" Height="600px" Font-Bold="False"
Font-Names="Tahoma" Font-Size="18pt">
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False"
DataSourceID="SqlDataSource1" BackColor="#DEBA84" BorderColor="#DEBA84"
BorderStyle="None" BorderWidth="1px" CellPadding="3" CellSpacing="2"
style="font-family: Tahoma; " Width="950px">
<RowStyle BackColor="#FFF7E7" ForeColor="#8C4510" />
<Columns>
<asp:TemplateField HeaderText="วันที่" SortExpression="q_date">
<ItemTemplate>
<asp:Label ID="lbl_d" runat="server"
Text='<%# Bind("q_date","{0:dd/MM/yyyy}") %>'></asp:Label>
</ItemTemplate>
<ItemStyle Width="150px" />
</asp:TemplateField>
<asp:TemplateField HeaderText="ผู้ขนส่งสินค้า" SortExpression="t_id">
<ItemTemplate>
<asp:Label ID="lbl_t" runat="server" Text='<%# Bind("t_id") %>' Visible="False"></asp:Label>
<asp:Label ID="name" runat="server"></asp:Label>
</ItemTemplate>
<ItemStyle Width="150px" Wrap="True" />
</asp:TemplateField>
<asp:TemplateField HeaderText="คิวที่" SortExpression="q_id" Visible="False">
<ItemTemplate>
<asp:Label ID="lbl_q" runat="server" Text='<%# Bind("q_id") %>'></asp:Label>
</ItemTemplate>
<ControlStyle Width="50px" />
</asp:TemplateField>
<asp:BoundField DataField="bill_id" HeaderText="เลขที่บิล"
SortExpression="bill_id" Visible="False" />
<asp:BoundField DataField="cus" HeaderText="ลูกค้า" SortExpression="cus"
Visible="False" />
<asp:BoundField DataField="place" HeaderText="สถานที่" SortExpression="place"
Visible="False" />
<asp:TemplateField HeaderText="status" SortExpression="status" Visible="False">
<ItemTemplate>
<asp:Label ID="status" runat="server" Text='<%# Bind("status") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="รายการ">
<ItemTemplate>
<asp:Label ID="lbl_detail" runat="server"></asp:Label>
</ItemTemplate>
<ControlStyle Font-Names="Tahoma" Font-Size="18pt" />
<ItemStyle Width="650px" />
</asp:TemplateField>
</Columns>
<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>
<asp:Label ID="Label1" runat="server" Text="Label" Visible="False"></asp:Label>
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="<%$ ConnectionStrings:connect %>"
SelectCommand="SELECT DISTINCT TblQueuing.q_id, TblQueuing.t_id, TblQueuing.q_date, TblQueuing.status FROM TblQueuing INNER JOIN transport ON TblQueuing.bill_id = transport.bill WHERE (transport.bill_status = 'Use') AND (TblQueuing.status = '1') ORDER BY TblQueuing.status DESC, TblQueuing.q_date DESC">
</asp:SqlDataSource>
<asp:Timer ID="Timer1" runat="server" Interval="30000">
</asp:Timer>
</asp:Panel>
</td>
<td valign="top" style="height: 600px; width: 950px;">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td colspan="4">
<asp:Panel ID="Panel2" runat="server" Height="600px">
<asp:GridView ID="GridView5" runat="server"
AutoGenerateColumns="False" BackColor="#FF99FF" BorderColor="#DEBA84"
BorderStyle="None" BorderWidth="1px" CellPadding="3" CellSpacing="2"
DataSourceID="SqlDataSource5" Width="950px" Font-Names="Tahoma"
Font-Size="18pt">
<RowStyle BackColor="#FFF7E7" ForeColor="#8C4510" />
<Columns>
<asp:TemplateField HeaderText="วันที่" SortExpression="q_date">
<ItemTemplate>
<asp:Label ID="lbl_d2" runat="server"
Text='<%# Bind("q_date","{0:dd/MM/yyyy}") %>'></asp:Label>
</ItemTemplate>
<ItemStyle Width="150px" />
</asp:TemplateField>
<asp:TemplateField HeaderText="ผู้ขนส่งสินค้า" SortExpression="t_id">
<ItemTemplate>
<asp:Label ID="lbl_t2" runat="server" Text='<%# Bind("t_id") %>'
Visible="False"></asp:Label>
<asp:Label ID="name2" runat="server"></asp:Label>
</ItemTemplate>
<ItemStyle Width="150px" />
</asp:TemplateField>
<asp:TemplateField HeaderText="คิวที่" SortExpression="q_id" Visible="False">
<ItemTemplate>
<asp:Label ID="lbl_q2" runat="server" Text='<%# Bind("q_id") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField DataField="status" HeaderText="status" SortExpression="status"
Visible="False" />
<asp:TemplateField HeaderText="รายการ">
<ItemTemplate>
<asp:Label ID="lbl_detail2" runat="server"></asp:Label>
</ItemTemplate>
<ItemStyle Width="650px" />
</asp:TemplateField>
</Columns>
<FooterStyle BackColor="#F7DFB5" ForeColor="#8C4510" />
<PagerStyle ForeColor="#8C4510" HorizontalAlign="Center" />
<SelectedRowStyle BackColor="#738A9C" Font-Bold="True" ForeColor="White" />
<HeaderStyle BackColor="#CC3399" Font-Bold="True" ForeColor="White" />
</asp:GridView>
</asp:Panel>
</td>
</tr>
<tr>
<td>
<asp:SqlDataSource ID="SqlDataSource3" runat="server"
ConnectionString="<%$ ConnectionStrings:connect %>"
SelectCommand="SELECT DISTINCT TblQueuing.t_id, Tbltruck.t_reg FROM TblQueuing INNER JOIN transport ON TblQueuing.bill_id = transport.bill INNER JOIN Tbltruck ON TblQueuing.t_id = Tbltruck.t_id WHERE (transport.bill_status = 'Use') AND (TblQueuing.q_date = @dd) AND (TblQueuing.status='1')">
<SelectParameters>
<asp:ControlParameter ControlID="Label1" Name="dd" PropertyName="Text" />
</SelectParameters>
</asp:SqlDataSource>
</td>
<td>
<asp:SqlDataSource ID="SqlDataSource4" runat="server"
ConnectionString="<%$ ConnectionStrings:connect %>"
SelectCommand="select * from tbltruck where t_id not in (SELECT TblQueuing.t_id FROM TblQueuing INNER JOIN transport ON TblQueuing.bill_id = transport.bill INNER JOIN Tbltruck ON TblQueuing.t_id = Tbltruck.t_id WHERE (transport.bill_status = 'Use') AND (TblQueuing.q_date = @dd) AND (TblQueuing.status='1')) AND t_id not in (SELECT Tbltruck.t_id FROM Tbltruck INNER JOIN Tbltruck_stop ON Tbltruck.t_id = Tbltruck_stop.t_id WHERE (Tbltruck_stop.t_date = @dd))">
<SelectParameters>
<asp:ControlParameter ControlID="Label1" Name="dd" PropertyName="Text" />
</SelectParameters>
</asp:SqlDataSource>
</td>
<td>
<asp:SqlDataSource ID="SqlDataSource2" runat="server"
ConnectionString="<%$ ConnectionStrings:connect %>"
SelectCommand="SELECT Tbltruck.t_id, Tbltruck.t_reg, Tbltruck_stop.t_date, Tbltruck_stop.t_status FROM Tbltruck INNER JOIN Tbltruck_stop ON Tbltruck.t_id = Tbltruck_stop.t_id WHERE (Tbltruck_stop.t_date = @dd)">
<SelectParameters>
<asp:ControlParameter ControlID="Label1" Name="dd" PropertyName="Text" />
</SelectParameters>
</asp:SqlDataSource>
</td>
<td>
<asp:SqlDataSource ID="SqlDataSource5" runat="server"
ConnectionString="<%$ ConnectionStrings:connect %>"
SelectCommand="SELECT DISTINCT TblQueuing.q_id, TblQueuing.t_id, TblQueuing.q_date, TblQueuing.status FROM TblQueuing INNER JOIN transport ON TblQueuing.bill_id = transport.bill WHERE (transport.bill_status = 'Use') AND (TblQueuing.status = '0') ORDER BY TblQueuing.status DESC, TblQueuing.q_date DESC">
</asp:SqlDataSource>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="2" style="height: 110px; background-color: #FFFFFF; font-family: Tahoma;
font-size: 50px; font-weight: bold;" valign="middle">
<asp:Literal ID="Literal1" runat="server"></asp:Literal>
</td>
</tr>
<tr>
<td style="width: 950px; background-color: #99FF99;" valign="top">
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td style="font-family: Tahoma; font-size: 25px; font-weight: bold;
width: 300px; height: 40px;" align="right">
รายการบิลที่กำลังจัดส่ง :</td>
<td style="width: 100px;" align="center">
<asp:Label ID="lbl_num1" runat="server" Font-Bold="True" Font-Names="Tahoma"
Font-Size="20pt" ForeColor="#FF6600"></asp:Label>
</td>
<td style="font-family: Tahoma; font-size: 25px; font-weight: bold;
width: 150px; height: 40px;" align="left">
รายการ</td>
<td style="font-family: Tahoma; font-size: 25px; font-weight: bold;
width: 400px; background-color: #FFFF99; color: #006600;" align="left">
ข้อมูล ณ วันที่ <asp:Label ID="lbl_date" runat="server"></asp:Label></td>
</tr>
<tr>
<td style="font-family: Tahoma; font-size: 25px; font-weight: bold;
width: 300px; height: 40px;" align="right">
รายการบิลที่รอการจัดส่ง :</td>
<td style="width: 100px;" align="center">
<asp:Label ID="lbl_num2" runat="server" Font-Bold="True" Font-Names="Tahoma"
Font-Size="20pt" ForeColor="#FF0066"></asp:Label>
</td>
<td style="font-family: Tahoma; font-size: 25px; font-weight: bold;
width: 150px; height: 40px;" align="left">
รายการ</td>
<td style="font-family: Tahoma; font-size: 25px; font-weight: bold;
width: 400px; background-color: #FFFF99; color: #006600;" align="left">
เวลา <asp:Label ID="lbl_time" runat="server"></asp:Label></td>
</tr>
<tr>
<td style="font-family: Tahoma; font-size: 25px; font-weight: bold;
width: 300px; height: 40px;" align="right">
รายการบิลคงเหลือ :</td>
<td style="width: 100px;" align="center">
<asp:Label ID="lbl_num3" runat="server" Font-Bold="True" Font-Names="Tahoma"
Font-Size="20pt" ForeColor="#000099"></asp:Label>
</td>
<td style="font-family: Tahoma; font-size: 25px; font-weight: bold;
width: 150px; height: 40px;" align="left">
รายการ</td>
<td style="font-family: Tahoma; font-size: 25px; font-weight: bold;
width: 400px;" align="left"></td>
</tr>
</table>
</td>
<td style="width: 950px; background-color: #99FF99;" valign="top">
<table style="width:100%;">
<tr>
<td style="font-family: Tahoma; font-size: 25px; font-weight: bold;
width: 280px;" align="right" valign="top">
รายการรถที่กำลังจัดส่ง:
</td>
<td>
<asp:RadioButtonList ID="RadioButtonList1" runat="server"
DataSourceID="SqlDataSource3" DataTextField="t_reg" DataValueField="t_id"
RepeatColumns="6" Font-Names="Tahoma" Font-Size="16pt">
</asp:RadioButtonList>
</td>
</tr>
<tr>
<td style="font-family: Tahoma; font-size: 25px; font-weight: bold;
width: 280px;" align="right" valign="top">
รายการรถกำลังขึ้นของ:</td>
<td valign="top">
<asp:RadioButtonList ID="RadioButtonList3" runat="server"
DataSourceID="SqlDataSource4" DataTextField="t_reg" DataValueField="t_id"
RepeatColumns="6" Font-Names="Tahoma" Font-Size="16pt">
</asp:RadioButtonList>
</td>
</tr>
<tr>
<td style="font-family: Tahoma; font-size: 25px; font-weight: bold;
width: 280px; color: #FF0000;" align="right" valign="top">
รายการรถที่ลาหยุดวันนี้:</td>
<td>
<asp:RadioButtonList ID="RadioButtonList2" runat="server"
DataSourceID="SqlDataSource2" DataTextField="t_reg" DataValueField="t_id"
RepeatColumns="6" Font-Names="Tahoma" Font-Size="16pt">
</asp:RadioButtonList>
</td>
</tr>
</table>
</td>
</tr>
</table>
</form>
</body>
</html>
|
|
|
|
|
Date :
2012-08-28 08:37:41 |
By :
mintjira |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ลองใช้ event datapagging แบ่งหน้าดูน่ะครับ
|
|
|
|
|
Date :
2012-08-29 14:37:03 |
By :
Tittee |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
select top 7
7 คือจำนวน record ที่จะแสดง
|
|
|
|
|
Date :
2012-08-29 16:13:02 |
By :
ห้ามตอบเกินวันละ 2 กระทู้ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ลองดูพวก style ครับ ว่าที่เป็น px ทั้งหลาย มันกว้างเกินกรอบหรือเปล่าครับ หรือไม่ก็ไม่ต้องกำหนดความกว้างหรือสูงครับ
|
|
|
|
|
Date :
2012-08-31 17:46:30 |
By :
mr.win |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Load balance : Server 03
|