That is I have a RadGrid with a NestedViewTemplate. In that template I have an asp:Panel and in that I have a RadTabStrip. The first page view contains a label with a key value for EmployeeID and a RadGrid that uses that label to get the data and populate that grid. Just like the example.
However, I need to edit and insert items into that grid that is in the first tab of the strip in the nested view. I have an ascx file that I'm using for that purpose. Edit works just fine. When I insert, however, I need to access that value from the label to put in the database as the foreign key. The insert function seems to wipe all the data from the binding expressions used in the ascx page. All of the code samples I've seen don't cover the ascx file for inserts.
<MasterTableView DataSourceID="SqlDataSource1" DataKeyNames="EmployeeID" AllowMultiColumnSorting="True" |
GroupLoadMode="Server"> |
<NestedViewTemplate> |
<asp:Panel runat="server" ID="InnerContainer" CssClass="viewWrap" Visible="false"> |
<telerik:RadTabStrip runat="server" ID="TabStip1" MultiPageID="Multipage1" |
SelectedIndex="0"> |
<Tabs> |
<telerik:RadTab runat="server" Text="Sales" PageViewID="PageView1"> |
</telerik:RadTab> |
<telerik:RadTab runat="server" Text="Contact Information" PageViewID="PageView2"> |
</telerik:RadTab> |
<telerik:RadTab runat="server" Text="Statistics Chart" PageViewID="PageView3"> |
</telerik:RadTab> |
</Tabs> |
</telerik:RadTabStrip> |
<telerik:RadMultiPage runat="server" ID="Multipage1" SelectedIndex="0" RenderSelectedPageOnly="false"> |
<telerik:RadPageView runat="server" ID="PageView1"> |
<asp:Label ID="Label1" Font-Bold="true" Font-Italic="true" Text='<%# Eval("EmployeeID") %>' |
Visible="false" runat="server" /> |
<telerik:RadGrid runat="server" ID="OrdersGrid" DataSourceID="SqlDataSource2" |
ShowFooter="true" AllowSorting="true" EnableLinqExpressions="false"> |
<MasterTableView ShowHeader="true" AutoGenerateColumns="False" AllowPaging="true" |
DataKeyNames="OrderID" PageSize="7" HierarchyLoadMode="ServerOnDemand"> |
To use the ID's from the example, I need the OrdersGrid to function where the insert form is an ascx page and it needs to know the value of Label1 in PageView1. Oh, and my OrdersGrid doesn't have any detail tables.
The ascx page has a button on it:
<asp:Button ID="btnUpdate" |
Text='<%# (Container is GridEditFormInsertItem) ? "Insert" : "Update"%>' |
runat="server" |
CommandName='<%# (Container is GridEditFormInsertItem) ? "Insert" : "Update" %>' |
onclick="btnUpdate_Click"/> |
and that button event needs to be able to reference the label.
protected void btnUpdate_Click(object sender, EventArgs e) |
{ |
if (btnUpdate.Text == "Update") |
{ |
//This works swimmingly with the bindings from the form |
} |
if (btnUpdate.Text == "Insert") |
{ |
//This doesn't work because I can't pass the datakey that is in the label. Using the insert command button on the grid clears the data sent to the form. |
} |
} |
I'm assuming I can put something in the page load event of the ascx page to access the value of that label, but I don't have any idea where to begin.
Thanks in advance.
5 Answers, 1 is accepted
You can access the label in the InsertCommand of the nested grid since you have set the command name of the Insert button as shown below:
aspx.cs:
protected void OrdersGrid_ItemCommand(object source, GridCommandEventArgs e) |
{ |
if (e.CommandName == "Insert") |
{ |
GridNestedViewItem nestedview = (GridNestedViewItem)((GridEditFormInsertItem)(e.Item)).OwnerTableView.Parent.NamingContainer; |
Label lbl = (Label)nestedview.FindControl("Label1"); |
string strtxt = lbl.Text; |
} |
} |
Hope this helps..
Princy.
By using the aspx page I can assign the value of the label, but not the values in the ascx form.
The info that we're working with is a many to many relationship table. Keeping with the example, In my scenario, they are using the OrdersGrid to associate more orders with the Employee:
protected void btnUpdate_Click(object sender, EventArgs e) |
{ |
if (btnUpdate.Text == "Update") |
{ |
OrdersEmployee se = new SalesEmployee(Convert.ToInt32(lblSalesEmployeeID.Text)); |
se.EmployeeID = (Convert.ToInt32(lblEmployeeID.Text)); |
se.OrdersID = (Convert.ToInt32(radOrdersName.SelectedValue)); |
se.Save(Page.User.Identity.Name.ToString()); |
} |
if (btnUpdate.Text == "Insert") |
{ |
OrdersEmployee se = new SalesEmployee(); |
se.EmployeeID = //This needs a value |
se.OrdersID = (Convert.ToInt32(radOrdersName.SelectedValue)); |
se.Save(Page.User.Identity.Name.ToString()); |
} |
This button executes before the OrdersGrid_ItemCommand event does. I need a way to assign that variable in the ascx page when the page has been called from the insert command button on the OrdersGrid.
If I try to assign values in the OrdersGrid_ItemCommand event, I can't access any of the values from the ascx page. radOrdersName does not exist in that context.
Is there a way to override the insert event of the rad grid and make it pass variables like the edit command column does? Or a syntax for DataBinder.Eval (Container, "DataItem.EmployeeID") that would let me bind the label and not a dataitem from the grid?
I could probably make it easier on myself by just eliminating the ascx page, but I'm reusing them in multiple places.
edit: That label is populated from the value of an the EmployeeGrid that is in expanded mode. I wonder if I could access that value from the page load event? Or is it possible to put a detail table in a nestedviewtemplate?
With a little help from my friends at Telerik, we've discovered an answer. Although, I'm not sure why this would be the case.
GridEditFormItem item = this.NamingContainer as GridEditFormItem; |
RadGrid OrdersGrid = item.OwnerTableView.OwnerGrid; |
GridNestedViewItem nestedView = OrdersGrid.Parent.NamingContainer as GridNestedViewItem; |
Label Label1 = nestedView.FindControl("Label1") as Label; |
//Label1.Text is the key I'm looking for |
So the question is: Why isn't the naming container for the OrdersGrid the RadPageView? When you ask for the naming container you're given a GridNestedViewItem. Just curious.
Hi,
I have a radgrid which contains two tabs. 'RadGrid1' and 'rgHeaderLog'. The edit functionality on the RadGrid1 works fine. I has one detail table. However, the edit functionality on the second tab (rgHeaderLog) doesn't work. This has two detail tables as in nested tables. Any suggestions are highly appreciable.
Thank you.
ASPX:
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="MIA_INQUIRY.aspx.vb" Inherits="MIA_INQUIRY" MaintainScrollPositionOnPostback="true" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<%@ Register src="Top2.ascx" tagname="Top" tagprefix="uc1" %>
<!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 id="Head1" runat="server">
<title>MIA INQUIRY</title>
<style type="text/css">
.controlProp
{
border: 1px solid gray !important;
font-family: Arial !important;
font-size: 10pt !important;
}
body
{
background-repeat: repeat-x;
background-position: top left;
background-color: silver;
height: 100%;
}
.editFormStyle
{
padding: 10px 20px 10px 20px;
border: 2px inset #000;
background-color: white;
text-align: left;
width: 100%;
}
.editFormStyleBody
{
padding: 10px 10px 10px 10px;
border: 1px solid darkgray;
background-color: #ECE9D8;
width: 100%;
text-align: left;
}
.editFormStyle_small
{
padding: 10px 20px 10px 20px;
border: 2px inset #000;
background-color: white;
text-align: left;
width: 100%;
}
.editFormStyleBody_small
{
padding: 10px 10px 10px 10px;
border: 1px solid darkgray;
background-color: #ECE9D8;
width: 100%;
text-align: left;
}
.editFormRow
{
padding: 5px 0px 0px 5px;
}
.editFormRow0
{
padding: 5px 0px 0px 10px;
font-weight: bold;
font-size: 10pt;
}
.label00
{
font-family: Arial;
font-weight: bold;
padding: 5px 0px 0px 5px;
}
.align00
{
text-align: center;
align-content: center;
}
.watermarked
{
color:gray;
font-family: Arial;
font-size: 12pt;
}
.errText
{
color: red;
font-size: 10pt;
font-weight: bold;
}
div.radGridClass .rgAltRow td,
div.radGridClass .rgRow td
{
border-left-color: silver !important;
border-left-style: solid !important;
border-right-color: silver !important;
border-right-style: solid !important;
}
.popSection_gen
{
padding: 10px 20px 10px 20px;
border: 1px solid silver;
background-color: white;
text-align: left;
width: 100%;
}
.auto-style2 {
width: 221px;
}
.auto-style9 {
width: 225px;
}
.auto-style12 {
width: 272px;
}
.auto-style13 {
width: 225px;
height: 51px;
}
.auto-style14 {
width: 272px;
height: 51px;
}
.auto-style15 {
height: 51px;
}
</style>
</head>
<body bgcolor="Black">
<form id="form1" runat="server">
<telerik:RadScriptManager id="RadScriptManager1" runat="server" />
<div>
<table cellpadding="0" cellspacing="0">
<tr>
<td style="width: 100%">
<uc1:Top ID="Top1" runat="server" />
</td>
</tr>
</table>
</div>
<asp:Panel ID="pnlErrors" runat="server">
<table id="tblErrors" runat="server" style="width: 100%; background-color: white; border-bottom: 1px solid black; border-top: 1px solid black;" cellpadding="0" cellspacing="0">
<tr>
<td valign="middle" style="height: 30px; text-align: center;">
<asp:Label ID="lblError" runat="server" style="font-size: 12pt; font-weight: bold;" />
</td>
</tr>
</table>
</asp:Panel>
<br />
<table cellpadding="0" cellspacing="0">
<tr>
<td class="auto-style2" style="padding: 0 0 0 15px;">
<asp:Label ID="lblSysname" runat="server" ForeColor="#0099FF" style="font-size: small" Font-Bold="true" Text="DETL CROSSDOCK"></asp:Label>
</td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td class="auto-style2" style="padding: 0 0 0 15px; font-size: small;">
MIA INQUIRY</td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
</table>
<telerik:RadTabStrip ID="RadTabStrip1" runat="server" MultiPageID="RadMultiPage1" SelectedIndex="1" Skin="Black">
<Tabs>
<telerik:RadTab runat="server" PageViewID="PV_MIAINFO" Selected="True" SelectedIndex="1" Text="MIA INFO">
</telerik:RadTab>
<telerik:RadTab runat="server" PageViewID="PV_HISTORY" SelectedIndex="0" Text="MIA LOG HISTORY">
</telerik:RadTab>
</Tabs>
</telerik:RadTabStrip>
<telerik:RadMultiPage ID="RadMultiPage1" runat="server" BackColor="Transparent" BorderStyle="None" SelectedIndex="1" Width="100%">
<telerik:RadPageView ID="PV_MIAINFO" runat="server" BackColor="Black" ForeColor="#FF3300" Selected="True" Width="100%">
<asp:Panel ID="Panel1" runat="server">
<span style="font-size: 9pt; color: #ffffff">
</span>
</asp:Panel>
<table cellpadding="0" cellspacing="0" width="100%">
<tr>
<td>
<telerik:RadDockZone ID="RadDockZone3" runat="server" BorderStyle="None"
Skin="Black" Width="100%">
<telerik:RadDock ID="RadDock4" runat="server" BorderStyle="None"
DefaultCommands="ExpandCollapse" DockMode="Docked" EnableDrag="False"
Pinned="True" Resizable="True" Skin="Black" Title="Enter Information"
Width="100%" EnableRoundedCorners="True">
<ContentTemplate>
<table width="100%" cellpadding="0" cellspacing="0">
<tr>
<td align="left" class="auto-style13">
<asp:Label ID="Label7" runat="server" Font-Size="9pt" ForeColor="White"
Height="16px" style="font-family: Arial" Text="FROM: "></asp:Label>
<telerik:RadDatePicker ID="rdDateFrom" Runat="server" Skin="Black" >
<Calendar ID="Calendar1" Skin="Black" UseColumnHeadersAsSelectors="False" runat="Server"
UseRowHeadersAsSelectors="False">
</Calendar>
<DatePopupButton />
<DateInput ID="DateInput1" runat="server" DateFormat="M/d/yyyy" DisplayDateFormat="M/d/yyyy" Height="16px">
<EmptyMessageStyle Resize="None" />
<ReadOnlyStyle Resize="None" />
<FocusedStyle Resize="None" />
<DisabledStyle Resize="None" />
<InvalidStyle Resize="None" />
<HoveredStyle Resize="None" />
<EnabledStyle Resize="None" />
</DateInput>
</telerik:RadDatePicker>
</td>
<td align="left" class="auto-style14">
<asp:Label ID="Label8" runat="server" Font-Size="9pt" ForeColor="White"
Height="16px" style="font-family: Arial" Text="AND INCLUDING: "></asp:Label>
<telerik:RadDatePicker ID="rdDateTo" Runat="server" Skin="Black">
<Calendar ID="Calendar2" Skin="Black" UseColumnHeadersAsSelectors="False" runat="server"
UseRowHeadersAsSelectors="False">
</Calendar>
<DatePopupButton />
<DateInput ID="DateInput2" runat="server" DateFormat="M/d/yyyy" DisplayDateFormat="M/d/yyyy">
<EmptyMessageStyle Resize="None" />
<ReadOnlyStyle Resize="None" />
<FocusedStyle Resize="None" />
<DisabledStyle Resize="None" />
<InvalidStyle Resize="None" />
<HoveredStyle Resize="None" />
<EnabledStyle Resize="None" />
</DateInput>
</telerik:RadDatePicker>
</td>
<td align="left" class="auto-style15">
<asp:Label ID="Label9" runat="server" Font-Size="9pt" ForeColor="White" Height="30px" style="font-family: Arial" Text="STATUS:"></asp:Label>
<telerik:RadComboBox ID="ddlStatus" runat="server" MarkFirstMatch="True" width="150px" Font-Bold="True" DataSourceID="" DataTextField="STATUS" DataValueField="STATUS" Skin="Black">
<Items>
<telerik:RadComboBoxItem runat="server" Text="OPN" Value="OPN" />
<telerik:RadComboBoxItem runat="server" Text="CLS" Value="CLS" />
</Items>
</telerik:RadComboBox>
<asp:ImageButton ID="btnSubmit" runat="server" ImageUrl="~/images/SEARCH.gif" Height="22px" Width="81px" />
</td>
</tr>
<tr>
<td align="left" style="text-align: left; vertical-align: top;">
</td>
</tr>
</table>
</ContentTemplate>
</telerik:RadDock>
</telerik:RadDockZone>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<telerik:RadGrid ID="RadGrid1" AutoGenerateColumns="false" AllowSorting="TRUE" runat="server" Skin="Black" ShowFooter="True" Width="100%" Height="100%" AllowPaging="True" pagesize ="20" OnUpdateCommand="rgMain_Update" OnNeedDataSource="RadGrid1_NeedDataSource">
<HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Black" >
</HeaderContextMenu>
<MasterTableView DataKeyNames="LOAD_ID, TRANS_QREF" DataMember="Parent" DataSourceID="" >
<EditFormSettings>
<%--<EditColumn FilterControlAltText="Filter EditCommandColumn column" />--%>
<EditColumn CancelImageUrl="Cancel.gif" EditImageUrl="Edit.gif" InsertImageUrl="Update.gif" UpdateImageUrl="Update.gif">
</EditColumn>
</EditFormSettings>
<DetailTables> <%--kiran--%>
<telerik:GridTableView runat="server" AutoGenerateColumns="False" DataKeyNames="" DataSourceID="SqlDataSource2" Name="CHILD" Width="100%">
<ParentTableRelation>
<telerik:GridRelationFields DetailKeyField="LOAD_ID" MasterKeyField="LOAD_ID" />
</ParentTableRelation>
<CommandItemSettings ExportToPdfText="Export to Pdf" />
<RowIndicatorColumn FilterControlAltText="Filter RowIndicator column" />
<ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column" />
<Columns>
<telerik:GridBoundColumn DataField="SYS_DT_TM" DefaultInsertValue="" HeaderText="TRANS DATE" ReadOnly="True" SortExpression="SYS_DT_TM" UniqueName="TRANS_SYS_DT_TM" Visible="True">
<HeaderStyle ForeColor="LIME" HorizontalAlign="LEFT" />
<ItemStyle ForeColor="White" HorizontalAlign="LEFT" Width="80px" />
<FooterStyle Font-Bold="False" ForeColor="WHITE" HorizontalAlign="LEFT" />
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="TRANS_ID" DefaultInsertValue="" HeaderText="TRANS ID" ReadOnly="True" SortExpression="TRANS_ID" UniqueName="TRANS_ID" Visible="True">
<HeaderStyle ForeColor="LIME" HorizontalAlign="LEFT" />
<ItemStyle ForeColor="White" HorizontalAlign="LEFT" Width="80px" />
<FooterStyle Font-Bold="False" ForeColor="WHITE" HorizontalAlign="LEFT" />
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="START_LOC" DefaultInsertValue="" HeaderText="START LOC" ReadOnly="True" SortExpression="START_LOC" UniqueName="START_LOC" Visible="True">
<HeaderStyle ForeColor="LIME" HorizontalAlign="LEFT" />
<ItemStyle ForeColor="White" HorizontalAlign="LEFT" Width="80px" />
<FooterStyle Font-Bold="False" ForeColor="WHITE" HorizontalAlign="LEFT" />
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="END_LOC" DefaultInsertValue="" HeaderText="END LOC" ReadOnly="True" SortExpression="END_LOC" UniqueName="END_LOC" Visible="True">
<HeaderStyle ForeColor="LIME" HorizontalAlign="LEFT" />
<ItemStyle ForeColor="White" HorizontalAlign="LEFT" Width="80px" />
<FooterStyle Font-Bold="False" ForeColor="WHITE" HorizontalAlign="LEFT" />
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="LOAD_ID" DefaultInsertValue="" HeaderText="LOAD ID" ReadOnly="True" SortExpression="LOAD_ID" UniqueName="LOAD_ID" Visible="True">
<HeaderStyle ForeColor="LIME" HorizontalAlign="LEFT" />
<ItemStyle ForeColor="White" HorizontalAlign="LEFT" Width="80px" />
<FooterStyle Font-Bold="False" ForeColor="WHITE" HorizontalAlign="LEFT" />
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="USER_ID" DefaultInsertValue="" HeaderText="USER ID" ReadOnly="True" SortExpression="USER_ID" UniqueName="USER_ID" Visible="True">
<HeaderStyle ForeColor="LIME" HorizontalAlign="LEFT" />
<ItemStyle ForeColor="White" HorizontalAlign="LEFT" Width="80px" />
<FooterStyle Font-Bold="False" ForeColor="WHITE" HorizontalAlign="LEFT" />
</telerik:GridBoundColumn>
</Columns>
<EditFormSettings>
<EditColumn FilterControlAltText="Filter EditCommandColumn column">
</EditColumn>
<%-- <EditColumn CancelImageUrl="Cancel.gif" EditImageUrl="Edit.gif" InsertImageUrl="Update.gif" UpdateImageUrl="Update.gif">
</EditColumn>--%>
</EditFormSettings>
<PagerStyle AlwaysVisible="FALSE" />
</telerik:GridTableView>
</DetailTables>
<Columns> <%--Kiran--%>
<telerik:GridButtonColumn ButtonType="ImageButton" CommandName="EDIT" HeaderText="EDIT" ImageUrl="images/EDIT2.gif" UniqueName="EDIT">
<HeaderStyle ForeColor="WHITE" HorizontalAlign="left" Width="10px" />
<ItemStyle Width="20px" />
</telerik:GridButtonColumn>
<%-- <telerik:GridBoundColumn DataField="SYS_ID" DefaultInsertValue=""
HeaderText="SYS ID" ReadOnly="True" SortExpression="SYS_ID" UniqueName="SYS_ID" Visible="TRUE">
<HeaderStyle Font-Size="8pt" />
<ItemStyle Font-Size="10pt" ForeColor="AQUA" HorizontalAlign="LEFT" Width="20px" />
</telerik:GridBoundColumn>--%>
<telerik:GridBoundColumn DataField="TRANS_QREF" Aggregate="Count" DefaultInsertValue=""
HeaderText="INBOUND QREF" ReadOnly="True" SortExpression="TRANS_QREF" UniqueName="TRANS_QREF" Visible="TRUE">
<HeaderStyle Font-Size="8pt" />
<ItemStyle Font-Size="10pt" ForeColor="AQUA" HorizontalAlign="LEFT" Width="20px" />
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="SID" DefaultInsertValue=""
HeaderText="SID" ReadOnly="True" SortExpression="SID" UniqueName="SID" Visible="TRUE">
<HeaderStyle Font-Size="8pt" />
<ItemStyle Font-Size="10pt" ForeColor="WHITE" HorizontalAlign="LEFT" Width="20px" />
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="LOAD_ID" DefaultInsertValue=""
HeaderText="LOAD ID" ReadOnly="TRUE" SortExpression="LOAD_ID" UniqueName="LOAD_ID" Visible="TRUE">
<HeaderStyle Font-Size="8pt" />
<ItemStyle Font-Size="10pt" ForeColor="WHITE" HorizontalAlign="LEFT"
Width="100px" />
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="LOAD_DT_TM" DefaultInsertValue=""
HeaderText="LOAD DATE" ReadOnly="TRUE" SortExpression="LOAD_DT_TM" UniqueName="LOAD_DT_TM" Visible="TRUE">
<HeaderStyle Font-Size="8pt" />
<ItemStyle Font-Size="10pt" ForeColor="WHITE" HorizontalAlign="LEFT"
Width="100px" />
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="LOC_ID" DefaultInsertValue=""
HeaderText="LOC ID" ReadOnly="TRUE" SortExpression="LOC_ID" UniqueName="LOC_ID" Visible="TRUE">
<HeaderStyle Font-Size="8pt" />
<ItemStyle Font-Size="10pt" ForeColor="WHITE" HorizontalAlign="LEFT"
Width="100px" />
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="PLANT" DefaultInsertValue=""
HeaderText="PLANT" ReadOnly="TRUE" SortExpression="PLANT" UniqueName="PLANT" Visible="TRUE">
<HeaderStyle Font-Size="8pt" />
<ItemStyle Font-Size="10pt" ForeColor="WHITE" HorizontalAlign="LEFT"
Width="100px" />
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="DOCK" DefaultInsertValue=""
HeaderText="DOCK" ReadOnly="TRUE" SortExpression="DOCK" UniqueName="DOCK" Visible="TRUE">
<HeaderStyle Font-Size="8pt" />
<ItemStyle Font-Size="10pt" ForeColor="WHITE" HorizontalAlign="LEFT"
Width="100px" />
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="SUP_ID" DefaultInsertValue=""
HeaderText="SUPERVISOR ID" ReadOnly="TRUE" SortExpression="SUP_ID" UniqueName="SUP_ID" Visible="TRUE">
<HeaderStyle Font-Size="8pt" />
<ItemStyle Font-Size="10pt" ForeColor="WHITE" HorizontalAlign="LEFT"
Width="100px" />
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="USER_ID" DefaultInsertValue=""
HeaderText="USER ID" ReadOnly="True" SortExpression="USER_ID" UniqueName="USER_ID" Visible="TRUE">
<HeaderStyle Font-Size="8pt" />
<ItemStyle Font-Size="10pt" ForeColor="WHITE" HorizontalAlign="LEFT"
Width="100px" />
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="TIME_OVERRIDE" DefaultInsertValue=""
HeaderText="TIME OVERRIDE" ReadOnly="True" SortExpression="TIME_OVERRIDE" UniqueName="TIME_OVERRIDE" Visible="TRUE">
<HeaderStyle Font-Size="8pt" />
<ItemStyle Font-Size="10pt" ForeColor="WHITE" HorizontalAlign="LEFT"
Width="100px" />
</telerik:GridBoundColumn>
<telerik:GridTemplateColumn DataField="STATUS" HeaderText="STATUS" ItemStyle-Width ="50px" UniqueName ="STATUS" >
<ItemTemplate>
<%--<asp:Label ID="Label2" runat="server" Text='<%# Bind("STATUS")%>' />--%>
<%#DataBinder.Eval(Container.DataItem, "STATUS")%>
</ItemTemplate>
<EditItemTemplate>
<telerik:RadDropDownList RenderMode="Lightweight" runat="server" ID="RadDropDownList1" DataTextField="STATUS"
DataValueField="" DataSourceID="" SelectedValue='<%#Bind("STATUS")%>' AppendDataBoundItems="True" >
<Items>
<telerik:DropDownListItem Text="OPN" Value="OPN" />
<telerik:DropDownListItem Text="CLS" Value="CLS" />
</Items>
</telerik:RadDropDownList>
</EditItemTemplate>
</telerik:GridTemplateColumn>
<telerik:GridTemplateColumn UniqueName="RESOLUTION" DataField="RESOLUTION" HeaderText="RESOLUTION" Visible="TRUE">
<ItemTemplate>
<%#DataBinder.Eval(Container.DataItem, "RESOLUTION")%>
</ItemTemplate>
<EditItemTemplate>
<asp:TextBox ID="TextBox1" Text='<%# Bind("RESOLUTION")%>' Columns="50" Rows="3" BackColor ="White" ForeColor="Black"
TextMode="MultiLine" runat="server"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ErrorMessage="<b>*REQUIRED<b>" ControlToValidate="TextBox1" ForeColor="Aqua">
</asp:RequiredFieldValidator>
</EditItemTemplate>
</telerik:GridTemplateColumn>
</Columns>
<CommandItemSettings ExportToPdfText="Export to Pdf" />
<RowIndicatorColumn FilterControlAltText="Filter RowIndicator column">
</RowIndicatorColumn>
<ExpandCollapseColumn ItemStyle-Width="5px" Visible="True">
</ExpandCollapseColumn>
<EditFormSettings>
<EditColumn FilterControlAltText="Filter EditCommandColumn column">
</EditColumn>
</EditFormSettings>
<PagerStyle AlwaysVisible="True" />
</MasterTableView>
<FilterMenu EnableEmbeddedSkins="False">
</FilterMenu>
<AlternatingItemStyle ForeColor="White" />
<ItemStyle ForeColor="White" />
<ClientSettings AllowColumnsReorder="True" AllowRowsDragDrop="True" EnablePostBackOnRowClick="true" EnableRowHoverStyle="True">
<Selecting AllowRowSelect="True" />
<%-- <Scrolling AllowScroll="True" UseStaticHeaders="True" />--%>
</ClientSettings>
</telerik:RadGrid>
</ContentTemplate>
</asp:UpdatePanel>
</td>
</tr>
</table>
<br />
</telerik:RadPageView>
<telerik:RadPageView ID="PV_HISTORY" runat="server" BackColor="Black" ForeColor="#FF3300" Width="100%" >
<asp:updatepanel ID="Updatepanel2" runat="server">
<ContentTemplate>
<telerik:RadGrid ID="rgHeaderLog" AutoGenerateColumns="false" AllowSorting="TRUE" ShowHeaderWhenEmpty="true" EnableEmbeddedskins="True" GridLines="None"
runat="server" Skin="Black" ShowFooter="True" AllowPaging="True" pagesize ="20" AllowFilteringByColumn="True" OnUpdateCommand="rgHeaderLog_UpdateCommand"
DataSourceID="" MasterTableView-ExpandCollapseColumn-HeaderStyle-Width="5px" >
<HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Black">
</HeaderContextMenu>
<ClientSettings AllowColumnsReorder="True" EnableRowHoverStyle="True" >
<Scrolling UseStaticHeaders="True" ScrollHeight="700px" AllowScroll="true"></Scrolling>
<Selecting AllowRowSelect="True" />
</ClientSettings>
<MasterTableView AutoGenerateColumns="False" DataSourceID="" DataKeyNames="SYS_ID, LOAD_ID, MIA_STATUS, MIA_RESOLUTION" TableLayout="Fixed" >
<EditFormSettings>
<EditColumn CancelImageUrl="Cancel.gif" EditImageUrl="Edit.gif" InsertImageUrl="Update.gif" UpdateImageUrl="Update.gif" UniqueName="EditCommandColumn1">
</EditColumn>
</EditFormSettings>
<DetailTables>
<telerik:GridTableView EnableHierarchyExpandAll="false" DataKeyNames="LOAD_ID" runat="server" Name="DetailTable1" DataSourceID="SqlDataSource4" >
<ParentTableRelation>
<telerik:GridRelationFields DetailKeyField="LOAD_ID" MasterKeyField="LOAD_ID"></telerik:GridRelationFields>
</ParentTableRelation>
<DetailTables>
<telerik:GridTableView EnableHierarchyExpandAll="false" DataKeyNames="LOAD_ID" runat="server" Name="DetailTable2" DataSourceID="SqlDataSource5">
<ParentTableRelation>
<telerik:GridRelationFields DetailKeyField="LOAD_ID" MasterKeyField="LOAD_ID"></telerik:GridRelationFields>
</ParentTableRelation>
<Columns>
<telerik:GridBoundColumn DataField="SYS_DT_TM" DefaultInsertValue="" HeaderText="TRANS DATE" ReadOnly="True" SortExpression="SYS_DT_TM" UniqueName="TRANS_SYS_DT_TM" Visible="True" AllowFiltering="false">
<HeaderStyle ForeColor="LIME" HorizontalAlign="LEFT" />
<ItemStyle ForeColor="White" HorizontalAlign="LEFT" Width="80px" />
<FooterStyle Font-Bold="False" ForeColor="WHITE" HorizontalAlign="LEFT" />
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="TRANS_ID" DefaultInsertValue="" HeaderText="TRANS ID" ReadOnly="True" SortExpression="TRANS_ID" UniqueName="TRANS_ID" Visible="True" AllowFiltering="false">
<HeaderStyle ForeColor="LIME" HorizontalAlign="LEFT" />
<ItemStyle ForeColor="White" HorizontalAlign="LEFT" Width="80px" />
<FooterStyle Font-Bold="False" ForeColor="WHITE" HorizontalAlign="LEFT" />
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="START_LOC" DefaultInsertValue="" HeaderText="START LOC" ReadOnly="True" SortExpression="START_LOC" UniqueName="START_LOC" Visible="True" AllowFiltering="false">
<HeaderStyle ForeColor="LIME" HorizontalAlign="LEFT" />
<ItemStyle ForeColor="White" HorizontalAlign="LEFT" Width="80px" />
<FooterStyle Font-Bold="False" ForeColor="WHITE" HorizontalAlign="LEFT" />
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="END_LOC" DefaultInsertValue="" HeaderText="END LOC" ReadOnly="True" SortExpression="END_LOC" UniqueName="END_LOC" Visible="True" AllowFiltering="false">
<HeaderStyle ForeColor="LIME" HorizontalAlign="LEFT" />
<ItemStyle ForeColor="White" HorizontalAlign="LEFT" Width="80px" />
<FooterStyle Font-Bold="False" ForeColor="WHITE" HorizontalAlign="LEFT" />
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="LOAD_ID" DefaultInsertValue="" HeaderText="LOAD ID" ReadOnly="True" SortExpression="LOAD_ID" UniqueName="LOAD_ID" Visible="True" AllowFiltering="false">
<HeaderStyle ForeColor="LIME" HorizontalAlign="LEFT" />
<ItemStyle ForeColor="White" HorizontalAlign="LEFT" Width="80px" />
<FooterStyle Font-Bold="False" ForeColor="WHITE" HorizontalAlign="LEFT" />
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="USER_ID" DefaultInsertValue="" HeaderText="USER ID" ReadOnly="True" SortExpression="USER_ID" UniqueName="USER_ID" Visible="True" AllowFiltering="false">
<HeaderStyle ForeColor="LIME" HorizontalAlign="LEFT" />
<ItemStyle ForeColor="White" HorizontalAlign="LEFT" Width="80px" />
<FooterStyle Font-Bold="False" ForeColor="WHITE" HorizontalAlign="LEFT" />
</telerik:GridBoundColumn>
</Columns>
</telerik:GridTableView>
</DetailTables>
<Columns>
<telerik:GridBoundColumn DataField="SYS_DT_TM" Aggregate="Count" DefaultInsertValue="" AllowFiltering="false"
HeaderText="UPDATED ON" ReadOnly="True" SortExpression="SYS_DT_TM" UniqueName="SYS_DT_TM" Visible="TRUE">
<HeaderStyle Font-Size="8pt" Width="20px" />
<ItemStyle Font-Size="10pt" ForeColor="WHITE" HorizontalAlign="LEFT" />
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="LOAD_ID" DefaultInsertValue="" HeaderText="LOAD_ID" ReadOnly="True" SortExpression="LOAD_ID"
UniqueName="LOAD_ID" Visible="TRUE" FilterControlWidth="150px" AllowFiltering="false" AutoPostBackOnFilter="true" CurrentFilterFunction="Contains" ShowFilterIcon="false" >
<HeaderStyle Font-Size="8pt" Width="40px" />
<ItemStyle Font-Size="10pt" ForeColor="WHITE" HorizontalAlign="LEFT" />
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="CHANGED_BY" DefaultInsertValue="" HeaderText="CHANGED BY" ReadOnly="True" SortExpression="CHANGED_BY"
UniqueName="CHANGED_BY" Visible="TRUE" FilterControlWidth="80px" AutoPostBackOnFilter="true" CurrentFilterFunction="Contains" ShowFilterIcon="false" AllowFiltering="false">
<HeaderStyle Font-Size="8pt" Width="20px" />
<ItemStyle Font-Size="10pt" ForeColor="WHITE" HorizontalAlign="LEFT" />
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="ACTION" DefaultInsertValue="" HeaderText="ACTION" ReadOnly="True" SortExpression="ACTION" UniqueName="ACTION" Visible="TRUE" AllowFiltering="false">
<HeaderStyle Font-Size="8pt" Width="20px" />
<ItemStyle Font-Size="10pt" ForeColor="WHITE" HorizontalAlign="LEFT" />
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="INBQ_REF" DefaultInsertValue="" HeaderText="INBQ REF" ReadOnly="True" SortExpression="INBQ_REF" UniqueName="INBQ_REF" Visible="TRUE" AllowFiltering="false">
<HeaderStyle Font-Size="8pt" Width="20px" />
<ItemStyle Font-Size="10pt" ForeColor="WHITE" HorizontalAlign="LEFT" />
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="OUTBQ_REF" DefaultInsertValue="" HeaderText="OUTBQ REF" ReadOnly="True" SortExpression="OUTBQ_REF" UniqueName="OUTBQ_REF" Visible="TRUE" AllowFiltering="false">
<HeaderStyle Font-Size="8pt" Width="20px" />
<ItemStyle Font-Size="10pt" ForeColor="WHITE" HorizontalAlign="LEFT" />
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="NISSAN_RAN" DefaultInsertValue="" HeaderText="NISSAN RAN" ReadOnly="True" SortExpression="NISSAN_RAN" UniqueName="NISSAN_RAN" Visible="TRUE" AllowFiltering="false">
<HeaderStyle Font-Size="8pt" Width="20px" />
<ItemStyle Font-Size="10pt" ForeColor="WHITE" HorizontalAlign="LEFT" />
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="MP_LOAD_ID" DefaultInsertValue="" HeaderText="MP LOAD ID" ReadOnly="True" SortExpression="MP_LOAD_ID" UniqueName="MP_LOAD_ID" Visible="TRUE" AllowFiltering="false">
<HeaderStyle Font-Size="8pt" Width="20px" />
<ItemStyle Font-Size="10pt" ForeColor="WHITE" HorizontalAlign="LEFT" />
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="LOC_ID" DefaultInsertValue="" HeaderText="LOC ID" ReadOnly="True" SortExpression="LOC_ID" UniqueName="LOC_ID" Visible="TRUE" AllowFiltering="false">
<HeaderStyle Font-Size="8pt" Width="20px" />
<ItemStyle Font-Size="10pt" ForeColor="WHITE" HorizontalAlign="LEFT" />
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="DUNS" DefaultInsertValue="" HeaderText="DUNS" ReadOnly="True" SortExpression="DUNS"
UniqueName="DUNS" Visible="TRUE" FilterControlWidth="80px" AutoPostBackOnFilter="true" CurrentFilterFunction="Contains" ShowFilterIcon="false" AllowFiltering="false">
<HeaderStyle Font-Size="8pt" Width="20px" />
<ItemStyle Font-Size="10pt" ForeColor="WHITE" HorizontalAlign="LEFT" />
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="DOCK" DefaultInsertValue="" HeaderText="DOCK" ReadOnly="True" SortExpression="DOCK" UniqueName="DOCK" Visible="TRUE" AllowFiltering="false">
<HeaderStyle Font-Size="8pt" Width="20px" />
<ItemStyle Font-Size="10pt" ForeColor="WHITE" HorizontalAlign="LEFT" />
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="PLANT" DefaultInsertValue="" HeaderText="PLANT" ReadOnly="True" SortExpression="PLANT" UniqueName="PLANT" Visible="TRUE" AllowFiltering="false">
<HeaderStyle Font-Size="8pt" Width="20px" />
<ItemStyle Font-Size="10pt" ForeColor="WHITE" HorizontalAlign="LEFT" />
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="SHIP_DAY" DefaultInsertValue="" HeaderText="SHIP DAY" ReadOnly="True" SortExpression="SHIP_DAY" UniqueName="SHIP_DAY" Visible="TRUE" AllowFiltering="false">
<HeaderStyle Font-Size="8pt" Width="20px" />
<ItemStyle Font-Size="10pt" ForeColor="WHITE" HorizontalAlign="LEFT" />
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="STATUS" DefaultInsertValue="" HeaderText="STATUS" ReadOnly="True" SortExpression="STATUS" UniqueName="STATUS" Visible="TRUE" AllowFiltering="false">
<HeaderStyle Font-Size="8pt" Width="20px" />
<ItemStyle Font-Size="10pt" ForeColor="WHITE" HorizontalAlign="LEFT" />
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="WINDOW_TIME" DefaultInsertValue="" HeaderText="WINDOW TIME" ReadOnly="True" SortExpression="WINDOW_TIME" UniqueName="WINDOW_TIME" Visible="TRUE" AllowFiltering="false">
<HeaderStyle Font-Size="8pt" Width="20px" />
<ItemStyle Font-Size="10pt" ForeColor="WHITE" HorizontalAlign="LEFT" />
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="LOAD_DT_TM" DefaultInsertValue="" HeaderText="LOAD DT TM" ReadOnly="True" SortExpression="LOAD_DT_TM" UniqueName="LOAD_DT_TM" Visible="TRUE" AllowFiltering="false">
<HeaderStyle Font-Size="8pt" Width="20px" />
<ItemStyle Font-Size="10pt" ForeColor="WHITE" HorizontalAlign="LEFT" />
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="USER_ID" DefaultInsertValue="" HeaderText="USER ID" ReadOnly="True" SortExpression="USER_ID" UniqueName="USER_ID" Visible="TRUE" AllowFiltering="false">
<HeaderStyle Font-Size="8pt" Width="25px" />
<ItemStyle Font-Size="10pt" ForeColor="WHITE" HorizontalAlign="LEFT" />
</telerik:GridBoundColumn>
</Columns>
</telerik:GridTableView>
</DetailTables>
<Columns>
<telerik:GridButtonColumn ButtonType="ImageButton" CommandName="EDIT2" HeaderText="EDIT" ImageUrl="images/EDIT2.gif" UniqueName="EDIT2">
<HeaderStyle ForeColor="WHITE" HorizontalAlign="left" Width="10px" />
<ItemStyle Width="20px" />
</telerik:GridButtonColumn>
<telerik:GridBoundColumn DataField="SYS_DT_TM" Aggregate="Count" DefaultInsertValue="" AllowFiltering="false"
HeaderText="UPDATED ON" ReadOnly="True" SortExpression="SYS_DT_TM" UniqueName="SYS_DT_TM" Visible="TRUE">
<HeaderStyle Font-Size="8pt" Width="20px" />
<ItemStyle Font-Size="10pt" ForeColor="WHITE" HorizontalAlign="LEFT" />
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="LOAD_ID" DefaultInsertValue="" HeaderText="LOAD_ID" ReadOnly="True" SortExpression="LOAD_ID"
UniqueName="LOAD_ID" Visible="TRUE" FilterControlWidth="150px" AllowFiltering="true" AutoPostBackOnFilter="true" CurrentFilterFunction="Contains" ShowFilterIcon="false">
<HeaderStyle Font-Size="8pt" Width="40px" />
<ItemStyle Font-Size="10pt" ForeColor="WHITE" HorizontalAlign="LEFT" />
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="CHANGED_BY" DefaultInsertValue="" HeaderText="CHANGED BY" ReadOnly="True" SortExpression="CHANGED_BY"
UniqueName="CHANGED_BY" Visible="TRUE" FilterControlWidth="80px" AutoPostBackOnFilter="true" CurrentFilterFunction="Contains" ShowFilterIcon="false">
<HeaderStyle Font-Size="8pt" Width="20px" />
<ItemStyle Font-Size="10pt" ForeColor="WHITE" HorizontalAlign="LEFT" />
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="ACTION" DefaultInsertValue="" HeaderText="ACTION" ReadOnly="True" SortExpression="ACTION" UniqueName="ACTION" Visible="TRUE" AllowFiltering="false">
<HeaderStyle Font-Size="8pt" Width="20px" />
<ItemStyle Font-Size="10pt" ForeColor="WHITE" HorizontalAlign="LEFT" />
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="INBQ_REF" DefaultInsertValue="" HeaderText="INBQ REF" ReadOnly="True" SortExpression="INBQ_REF" UniqueName="INBQ_REF" Visible="TRUE" AllowFiltering="false">
<HeaderStyle Font-Size="8pt" Width="20px" />
<ItemStyle Font-Size="10pt" ForeColor="WHITE" HorizontalAlign="LEFT" />
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="OUTBQ_REF" DefaultInsertValue="" HeaderText="OUTBQ REF" ReadOnly="True" SortExpression="OUTBQ_REF" UniqueName="OUTBQ_REF" Visible="TRUE" AllowFiltering="false">
<HeaderStyle Font-Size="8pt" Width="20px" />
<ItemStyle Font-Size="10pt" ForeColor="WHITE" HorizontalAlign="LEFT" />
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="NISSAN_RAN" DefaultInsertValue="" HeaderText="NISSAN RAN" ReadOnly="True" SortExpression="NISSAN_RAN" UniqueName="NISSAN_RAN" Visible="TRUE" AllowFiltering="false">
<HeaderStyle Font-Size="8pt" Width="20px" />
<ItemStyle Font-Size="10pt" ForeColor="WHITE" HorizontalAlign="LEFT" />
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="MP_LOAD_ID" DefaultInsertValue="" HeaderText="MP LOAD ID" ReadOnly="True" SortExpression="MP_LOAD_ID" UniqueName="MP_LOAD_ID" Visible="TRUE" AllowFiltering="false">
<HeaderStyle Font-Size="8pt" Width="20px" />
<ItemStyle Font-Size="10pt" ForeColor="WHITE" HorizontalAlign="LEFT" />
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="LOC_ID" DefaultInsertValue="" HeaderText="LOC ID" ReadOnly="True" SortExpression="LOC_ID" UniqueName="LOC_ID" Visible="TRUE" AllowFiltering="false">
<HeaderStyle Font-Size="8pt" Width="20px" />
<ItemStyle Font-Size="10pt" ForeColor="WHITE" HorizontalAlign="LEFT" />
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="DUNS" DefaultInsertValue="" HeaderText="DUNS" ReadOnly="True" SortExpression="DUNS"
UniqueName="DUNS" Visible="TRUE" FilterControlWidth="80px" AutoPostBackOnFilter="true" CurrentFilterFunction="Contains" ShowFilterIcon="false">
<HeaderStyle Font-Size="8pt" Width="20px" />
<ItemStyle Font-Size="10pt" ForeColor="WHITE" HorizontalAlign="LEFT" />
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="DOCK" DefaultInsertValue="" HeaderText="DOCK" ReadOnly="True" SortExpression="DOCK" UniqueName="DOCK" Visible="TRUE" AllowFiltering="false">
<HeaderStyle Font-Size="8pt" Width="20px" />
<ItemStyle Font-Size="10pt" ForeColor="WHITE" HorizontalAlign="LEFT" />
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="PLANT" DefaultInsertValue="" HeaderText="PLANT" ReadOnly="True" SortExpression="PLANT" UniqueName="PLANT" Visible="TRUE" AllowFiltering="false">
<HeaderStyle Font-Size="8pt" Width="20px" />
<ItemStyle Font-Size="10pt" ForeColor="WHITE" HorizontalAlign="LEFT" />
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="SHIP_DAY" DefaultInsertValue="" HeaderText="SHIP DAY" ReadOnly="True" SortExpression="SHIP_DAY" UniqueName="SHIP_DAY" Visible="TRUE" AllowFiltering="false">
<HeaderStyle Font-Size="8pt" Width="20px" />
<ItemStyle Font-Size="10pt" ForeColor="WHITE" HorizontalAlign="LEFT" />
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="STATUS" DefaultInsertValue="" HeaderText="STATUS" ReadOnly="True" SortExpression="STATUS" UniqueName="STATUS" Visible="TRUE" AllowFiltering="false">
<HeaderStyle Font-Size="8pt" Width="20px" />
<ItemStyle Font-Size="10pt" ForeColor="WHITE" HorizontalAlign="LEFT" />
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="WINDOW_TIME" DefaultInsertValue="" HeaderText="WINDOW TIME" ReadOnly="True" SortExpression="WINDOW_TIME" UniqueName="WINDOW_TIME" Visible="TRUE" AllowFiltering="false">
<HeaderStyle Font-Size="8pt" Width="20px" />
<ItemStyle Font-Size="10pt" ForeColor="WHITE" HorizontalAlign="LEFT" />
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="LOAD_DT_TM" DefaultInsertValue="" HeaderText="LOAD DT TM" ReadOnly="True" SortExpression="LOAD_DT_TM" UniqueName="LOAD_DT_TM" Visible="TRUE" AllowFiltering="false">
<HeaderStyle Font-Size="8pt" Width="20px" />
<ItemStyle Font-Size="10pt" ForeColor="WHITE" HorizontalAlign="LEFT" />
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="USER_ID" DefaultInsertValue="" HeaderText="USER ID" ReadOnly="True" SortExpression="USER_ID" UniqueName="USER_ID" Visible="TRUE" AllowFiltering="false">
<HeaderStyle Font-Size="8pt" Width="25px" />
<ItemStyle Font-Size="10pt" ForeColor="WHITE" HorizontalAlign="LEFT" />
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="MIA_COMMENTS" DefaultInsertValue="" HeaderText="COMMENTS" ReadOnly="True" SortExpression="MIA_COMMENTS" UniqueName="MIA_COMMENTS" Visible="TRUE" AllowFiltering="false">
<HeaderStyle Font-Size="8pt" Width="25px" />
<ItemStyle Font-Size="10pt" ForeColor="WHITE" HorizontalAlign="LEFT" />
</telerik:GridBoundColumn>
<telerik:GridTemplateColumn DataField="MIA_STATUS" HeaderText="STATUS" UniqueName ="MIA_STATUS" HeaderStyle-Width="25px" FilterControlWidth="50px" AutoPostBackOnFilter="true" CurrentFilterFunction="Contains" ShowFilterIcon="false" >
<ItemTemplate>
<%#DataBinder.Eval(Container.DataItem, "MIA_STATUS")%>
</ItemTemplate>
<EditItemTemplate>
<telerik:RadDropDownList RenderMode="Lightweight" runat="server" ID="RadDropDownList1" DataTextField="MIA_STATUS"
DataValueField="" DataSourceID="" SelectedValue='<%#Bind("MIA_STATUS")%>' AppendDataBoundItems="True" >
<Items>
<telerik:DropDownListItem Text="OPN" Value="OPN" />
<telerik:DropDownListItem Text="CLS" Value="CLS" />
</Items>
</telerik:RadDropDownList>
</EditItemTemplate>
</telerik:GridTemplateColumn>
<telerik:GridTemplateColumn UniqueName="MIA_RESOLUTION" DataField="MIA_RESOLUTION" HeaderText="RESOLUTION" Visible="TRUE" HeaderStyle-Width="25px" AllowFiltering="false">
<ItemTemplate>
<%#DataBinder.Eval(Container.DataItem, "MIA_RESOLUTION")%>
</ItemTemplate>
<EditItemTemplate>
<asp:TextBox ID="TextBox1" Text='<%# Bind("MIA_RESOLUTION")%>' Columns="50" Rows="3" BackColor ="White" ForeColor="Black"
TextMode="MultiLine" runat="server"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ErrorMessage="<b>*REQUIRED<b>" ControlToValidate="TextBox1" ForeColor="Aqua">
</asp:RequiredFieldValidator>
</EditItemTemplate>
</telerik:GridTemplateColumn>
</Columns>
<EditFormSettings>
<EditColumn FilterControlAltText="Filter EditCommandColumn column">
</EditColumn>
</EditFormSettings>
</MasterTableView>
</telerik:RadGrid>
</ContentTemplate>
</asp:updatepanel>
</telerik:RadPageView>
</telerik:RadMultiPage>
<asp:Label ID="Label1" runat="server" Text="Label" Visible="False"></asp:Label>
<asp:SqlDataSource ID="SqlDataSource2" runat="server"
ConnectionString="<%$ ConnectionStrings:FCSConnectionString %>"
SelectCommand="SELECT SYS_DT_TM, TRANS_ID, START_LOC, END_LOC, LOAD_ID, USER_ID FROM TRANS WHERE LOAD_ID = @LOAD_ID order by SYS_DT_TM DESC">
<SelectParameters>
<asp:ControlParameter Name ="LOAD_ID" ControlID="Label1" PropertyName ="Text"/>
</SelectParameters>
</asp:SqlDataSource>
<asp:HiddenField ID="RadWindowVisibleState" runat="server" />
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="<%$ ConnectionStrings:FCSConnectionString %>"
SelectCommand=" SELECT TRANS_QREF, STATUS FROM [dbo].[V_MIA_INQUIRY] WHERE LOAD_ID = @LOAD_ID">
<SelectParameters>
<asp:ControlParameter Name ="LOAD_ID" ControlID="Label1" PropertyName ="Text"/>
</SelectParameters>
</asp:SqlDataSource>
<asp:SqlDataSource ID="SqlDataSource3" runat="server"
ConnectionString="<%$ ConnectionStrings:FCSConnectionString %>" SelectCommand="SELECT * FROM MIA_LOG_HISTORY WHERE ACTION = 'dwAfter Change' ORDER BY SYS_DT_TM DESC">
</asp:SqlDataSource>
<asp:SqlDataSource ID="SqlDataSource4" runat="server" ProviderName="System.Data.SqlClient"
ConnectionString="<%$ ConnectionStrings:FCSConnectionString %>"
SelectCommand="SELECT * FROM MIA_LOG_HISTORY WHERE ACTION = 'Before Change' AND LOAD_ID = @LOAD_ID ORDER BY SYS_DT_TM DESC">
<SelectParameters>
<asp:Parameter Name ="LOAD_ID" Type="string" />
</SelectParameters>
</asp:SqlDataSource>
<asp:SqlDataSource ID="SqlDataSource5" runat="server" ProviderName="System.Data.SqlClient"
ConnectionString="<%$ ConnectionStrings:FCSConnectionString %>"
SelectCommand="SELECT SYS_DT_TM, TRANS_ID, START_LOC, END_LOC, LOAD_ID, USER_ID FROM TRANS WHERE LOAD_ID = @LOAD_ID order by SYS_DT_TM DESC">
<SelectParameters>
<asp:Parameter Name ="LOAD_ID" Type="string" />
</SelectParameters>
</asp:SqlDataSource>
</form>
</body>
</html>
ASPX.VB:
Imports System.Data.SqlClient
Imports System.Data
Imports Telerik.Web.UI
Imports System.Web.UI.HtmlControls.HtmlGenericControl
Imports Telerik.Web.UI.GridColumn
Imports System.Web.UI.WebControls
Imports System.Drawing
Partial Class MIA_INQUIRY
Inherits MyExecutables
Dim MyCommand As SqlDataAdapter
Dim ds As DataSet
Dim da As SqlDataAdapter
Dim dt As New DataTable
Dim dv As DataView
Dim gStrWhereClause As String
Dim oConn As New SqlConnection(dbConn_DOCK_FCS) 'DOCK_FCS is the right connection.
Dim strSYSID As String
Dim strDock As String
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim strDateFrom As String
Dim strDateTo As String
Dim strStatus As String
'Dim strSQl As String
CheckSession()
lblSysname.Text = Session("SYSNAME")
Error_Hide()
strStatus = ddlStatus.SelectedValue
If Page.IsPostBack = True Then
Else
If Len(Session("DATEFROM")) > 1 And Len(Session("DATETO")) > 1 And Len(strStatus) > 1 Then
rdDateFrom.SelectedDate = Session("DATEFROM")
strDateFrom = rdDateFrom.SelectedDate
rdDateTo.SelectedDate = Session("DateTo")
strDateTo = rdDateTo.SelectedDate
strStatus = ddlStatus.SelectedValue
ddlStatus.SelectedItem.Value = Session("strStatus")
Else
End If
Call GetRecords()
'Call LogGetRecords()
End If
End Sub
Private Sub Load_Info()
Try
Dim ds As DataSet
Dim MyCommand As SqlDataAdapter
Dim strSQl As String
Dim dt As New DataTable
Dim strFault As String = String.Empty
Dim strDateFrom As String
Dim strDateTo As String
Dim strStatus As String
strDateFrom = rdDateFrom.SelectedDate
strDateTo = rdDateTo.SelectedDate
strStatus = ddlStatus.Text
'strDock = Session("ODC")
strSQl = "Execute SP_MIA_INQUIRY '" & strDateFrom & "','" & strDateTo & "', '" & strStatus & "' "
MyCommand = New SqlDataAdapter(strSQl, oConn)
ds = New DataSet
MyCommand.Fill(ds, "INFO")
'Assign Values For text fields
dt = ds.Tables(0)
Dim Source As DataView = ds.Tables("INFO").DefaultView
RadGrid1.DataSource = Source
RadGrid1.DataBind()
RadGrid1.Visible = True
oConn.Close()
Catch ex As Exception
Dim errMessage As String = ex.Message
Error_Show(True, "HomePage_Setup", errMessage)
End Try
End Sub
Protected Sub btnSubmit_Click(ByVal sender As Object, ByVal e As System.Web.UI.ImageClickEventArgs) Handles btnSubmit.Click
Try
Call GetRecords()
Catch ex As Exception
Dim errMessage As String = ex.Message
Error_Show(True, "btnSubmit_Click", errMessage)
End Try
End Sub
Private Sub GetRecords()
Dim ds As DataSet
Dim MyCommand As SqlDataAdapter
Dim strSQl As String
Dim nRecCount As Integer
Dim dt As DataTable
Dim strReason As String = String.Empty
Dim strDateFrom As String
Dim strDateTo As String
Dim strStatus As String
Try
If Len(rdDateFrom.SelectedDate) > 1 Then
strDateFrom = rdDateFrom.SelectedDate
Else
strDateFrom = ""
End If
If Len(rdDateTo.SelectedDate) > 1 Then
strDateTo = rdDateTo.SelectedDate
Else
strDateTo = ""
End If
strStatus = ddlStatus.SelectedItem.Text
If Len(strDateFrom) < 1 And Len(strDateTo) < 1 Then
strSQl = "SELECT * FROM V_MIA_INQUIRY WHERE STATUS = '" & strStatus & "' ORDER BY TIME_OVERRIDE DESC"
Else
strSQl = "Execute SP_MIA_INQUIRY '" & strDateFrom & "','" & strDateTo & "', '" & strStatus & "'"
End If
MyCommand = New SqlDataAdapter(strSQl, oConn)
ds = New DataSet
MyCommand.Fill(ds, "LOADS")
'Assign Values For text fields
dt = ds.Tables(0)
Dim Source As DataView = ds.Tables("LOADS").DefaultView
If dt.Rows.Count > 0 Then ' Verify If a Contact Exists
nRecCount = dt.Rows.Count
RadGrid1.DataSource = Source
RadGrid1.DataBind()
RadGrid1.Visible = True
oConn.Close()
Else
RadGrid1.DataSource = Source
RadGrid1.DataBind()
oConn.Close()
End If
Catch ex As Exception
Dim errMessage As String = ex.Message
Error_Show(True, "Get_Records", errMessage)
End Try
End Sub
Private Sub LogGetRecords()
Dim ds As DataSet
Dim MyCommand As SqlDataAdapter
Dim strSQl As String
Dim nRecCount As Integer
Dim dt As DataTable
Dim strReason As String = String.Empty
Try
strSQl = "SELECT * FROM MIA_LOG_HISTORY WHERE ACTION = 'After Change' ORDER BY SYS_DT_TM DESC"
MyCommand = New SqlDataAdapter(strSQl, oConn)
ds = New DataSet
MyCommand.Fill(ds, "LOADS")
'Assign Values For text fields
dt = ds.Tables(0)
Dim Source As DataView = ds.Tables("LOADS").DefaultView
If dt.Rows.Count > 0 Then ' Verify If a Contact Exists
nRecCount = dt.Rows.Count
rgHeaderLog.DataSource = Source
rgHeaderLog.DataBind()
rgHeaderLog.Visible = True
oConn.Close()
'Else
' rgHeaderLog.DataSource = Source
' rgHeaderLog.DataBind()
' oConn.Close()
End If
Catch ex As Exception
Dim errMessage As String = ex.Message
Error_Show(True, "Get_Records", errMessage)
End Try
End Sub
Protected Sub rgMain_ItemCommand(ByVal sender As Object, e As GridCommandEventArgs) Handles RadGrid1.ItemCommand
If e.CommandName = "EDIT" Then
e.Item.Selected = True
Dim strSYSID As String = RadGrid1.MasterTableView.DataKeyValues(e.Item.ItemIndex)("SYS_ID")
Dim strStatus As String = RadGrid1.MasterTableView.DataKeyValues(e.Item.ItemIndex)("STATUS")
Dim strResolution As String = RadGrid1.MasterTableView.DataKeyValues(e.Item.ItemIndex)("RESOLUTION")
Call GetRecords()
End If
If e.CommandName = "Cancel" Then
Call GetRecords()
End If
If e.CommandName = "Update" Then
End If
If e.CommandName = "ExpandCollapse" Then
Try
Dim strLOADID As String = RadGrid1.MasterTableView.DataKeyValues(e.Item.ItemIndex)("LOAD_ID")
Label1.Text = strLOADID
Catch
End Try
End If
End Sub
Protected Sub rgHeaderLog_ItemCommand(ByVal sender As Object, e As GridCommandEventArgs) Handles rgHeaderLog.ItemCommand
If e.CommandName = "EDIT2" Then
e.Item.Selected = True
Dim strSYSID As String = rgHeaderLog.MasterTableView.DataKeyValues(e.Item.ItemIndex)("SYS_ID")
Dim strLoadID As String = rgHeaderLog.MasterTableView.DataKeyValues(e.Item.ItemIndex)("LOAD_ID")
Dim strStatus As String = rgHeaderLog.MasterTableView.DataKeyValues(e.Item.ItemIndex)("MIA_STATUS")
Dim strResolution As String = rgHeaderLog.MasterTableView.DataKeyValues(e.Item.ItemIndex)("MIA_RESOLUTION")
Call LogGetRecords()
End If
End Sub
Protected Sub rgMain_Update(ByVal source As Object, ByVal e As Telerik.Web.UI.GridCommandEventArgs)
Dim editedItem As GridEditableItem = TryCast(e.Item, GridEditableItem)
Dim strLoadId As String = editedItem.OwnerTableView.DataKeyValues(editedItem.ItemIndex)("LOAD_ID").ToString()
Dim strTransQref As String = editedItem.OwnerTableView.DataKeyValues(editedItem.ItemIndex)("TRANS_QREF").ToString()
Dim strResol As TextBox = DirectCast(editedItem.FindControl("TextBox1"), TextBox)
Dim strResolution As String = Replace(strResol.Text, "'", "''")
Dim ddl As RadDropDownList = DirectCast(editedItem.FindControl("RadDropDownList1"), RadDropDownList)
Dim strStatus As String = ddl.SelectedItem.Text
If strStatus = "CLS" Then
If strResolution <> "" Then
Dim strSQL As String = "UPDATE MIA_IB_CLS SET STATUS = '" & strStatus & "', RESOLUTION = '" & strResolution & "' WHERE LOAD_ID = '" & strLoadId & "' AND TRANS_QREF = '" & strTransQref & "' "
Dim myCommand As New SqlCommand(strSQL, oConn)
myCommand.Connection.Open()
myCommand.ExecuteNonQuery()
oConn.Close()
Else
End If
End If
Call GetRecords()
End Sub
Protected Sub rdDateFrom_SelectedDateChanged(sender As Object, e As Telerik.Web.UI.Calendar.SelectedDateChangedEventArgs) Handles rdDateFrom.SelectedDateChanged
Dim strDateFrom As Date
If Len(rdDateFrom.SelectedDate) > 1 Then
strDateFrom = rdDateFrom.SelectedDate
Session("DATEFROM") = strDateFrom
Else
Session("DATEFROM") = ""
End If
End Sub
Protected Sub rdDateTo_SelectedDateChanged(sender As Object, e As Telerik.Web.UI.Calendar.SelectedDateChangedEventArgs) Handles rdDateTo.SelectedDateChanged
Dim strDateto As Date
If Len(rdDateTo.SelectedDate) > 1 Then
strDateto = rdDateTo.SelectedDate
Session("DATETO") = strDateto
Else
Session("DATETO") = ""
End If
End Sub
Protected Sub Error_Show(ByVal IsError As Boolean, ByVal strModule As String, ByVal errMessage As String)
Dim strLevel As String = errMessage.Substring(0, 3)
If strLevel = "000" Then
strModule = "ALERT"
IsError = False
errMessage = errMessage.Substring(4, Len(errMessage) - 4)
End If
Dim strMsg As String = strModule & ": " & errMessage
lblError.ForeColor = Color.Red
tblErrors.Style.Add("border-color", "red")
If IsError = False Then
lblError.ForeColor = Color.Green
tblErrors.Style.Add("border-color", "green")
End If
pnlErrors.Visible = True
lblError.Text = strMsg
End Sub
Protected Sub Error_Hide()
pnlErrors.Visible = False
lblError.Text = ""
End Sub
Protected Sub rgMain_PageIndexChanged(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridPageChangedEventArgs) Handles RadGrid1.PageIndexChanged
Call GetRecords()
End Sub
Protected Sub rgMain_PageSizeChanged(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridPageSizeChangedEventArgs) Handles RadGrid1.PageSizeChanged
Call GetRecords()
End Sub
Protected Sub RadGrid1_NeedDataSource(sender As Object, e As GridNeedDataSourceEventArgs)
Dim ds As DataSet
Dim MyCommand As SqlDataAdapter
Dim strSQl As String
Dim nRecCount As Integer
Dim dt As DataTable
Dim strReason As String = String.Empty
Dim strDateFrom As String
Dim strDateTo As String
Dim strStatus As String
Try
If Len(rdDateFrom.SelectedDate) > 1 Then
strDateFrom = rdDateFrom.SelectedDate
Else
strDateFrom = ""
End If
If Len(rdDateTo.SelectedDate) > 1 Then
strDateTo = rdDateTo.SelectedDate
Else
strDateTo = ""
End If
strStatus = ddlStatus.SelectedItem.Text
If Len(strDateFrom) < 1 And Len(strDateTo) < 1 Then
strSQl = "SELECT * FROM V_MIA_INQUIRY WHERE STATUS = '" & strStatus & "'"
Else
strSQl = "Execute SP_MIA_INQUIRY '" & strDateFrom & "','" & strDateTo & "', '" & strStatus & "'"
End If
MyCommand = New SqlDataAdapter(strSQl, oConn)
ds = New DataSet
MyCommand.Fill(ds, "LOADS")
'Assign Values For text fields
dt = ds.Tables(0)
Dim Source As DataView = ds.Tables("LOADS").DefaultView
If dt.Rows.Count > 0 Then ' Verify If a Contact Exists
nRecCount = dt.Rows.Count
RadGrid1.DataSource = Source
'RadGrid1.DataBind()
RadGrid1.Visible = True
oConn.Close()
Else
RadGrid1.DataSource = Source
'RadGrid1.DataBind()
oConn.Close()
End If
Catch ex As Exception
Dim errMessage As String = ex.Message
Error_Show(True, "Get_Records", errMessage)
End Try
End Sub
Protected Sub rgHeaderLog_ColumnCreated(ByVal sender As Object, ByVal e As GridColumnCreatedEventArgs) Handles rgHeaderLog.ColumnCreated
If TypeOf e.Column Is GridExpandColumn AndAlso e.OwnerTableView.Name = "DetailTable1" Then
e.Column.HeaderStyle.Width = 5
End If
End Sub
Protected Sub rgHeaderLog_UpdateCommand(sender As Object, e As GridCommandEventArgs) Handles rgHeaderLog.UpdateCommand
Dim editedItem As GridEditableItem = TryCast(e.Item, GridEditableItem)
Dim strLoadId As String = editedItem.OwnerTableView.DataKeyValues(editedItem.ItemIndex)("LOAD_ID").ToString()
Dim strResol As TextBox = DirectCast(editedItem.FindControl("TextBox1"), TextBox)
Dim strResolution As String = Replace(strResol.Text, "'", "''")
Dim ddl As RadDropDownList = DirectCast(editedItem.FindControl("RadDropDownList1"), RadDropDownList)
Dim strStatus As String = ddl.SelectedItem.Text
If strStatus = "CLS" Then
If strResolution <> "" Then
Dim strSQL As String = "UPDATE MIA_LOG_HISTORY SET MIA_STATUS = '" & strStatus & "', MIA_RESOLUTION = '" & strResolution & "' WHERE LOAD_ID = '" & strLoadId & "' AND ACTION = 'After Change' "
Dim myCommand As New SqlCommand(strSQL, oConn)
myCommand.Connection.Open()
myCommand.ExecuteNonQuery()
oConn.Close()
End If
End If
' Call LogGetRecords()
End Sub
Protected Sub rgHeaderLog_NeedDataSource(sender As Object, e As GridNeedDataSourceEventArgs) Handles rgHeaderLog.NeedDataSource
Dim ds As DataSet
Dim MyCommand As SqlDataAdapter
Dim strSQl As String
Dim nRecCount As Integer
Dim dt As DataTable
Dim strReason As String = String.Empty
Try
strSQl = "SELECT * FROM MIA_LOG_HISTORY WHERE ACTION = 'After Change' ORDER BY SYS_DT_TM DESC"
MyCommand = New SqlDataAdapter(strSQl, oConn)
ds = New DataSet
MyCommand.Fill(ds, "LOADS")
'Assign Values For text fields
dt = ds.Tables(0)
Dim Source As DataView = ds.Tables("LOADS").DefaultView
If dt.Rows.Count > 0 Then ' Verify If a Contact Exists
nRecCount = dt.Rows.Count
rgHeaderLog.DataSource = Source
RadGrid1.DataBind()
rgHeaderLog.Visible = True
oConn.Close()
Else
rgHeaderLog.DataSource = Source
'RadGrid1.DataBind()
oConn.Close()
End If
Catch ex As Exception
Dim errMessage As String = ex.Message
Error_Show(True, "Log_Get_Records", errMessage)
End Try
End Sub
Protected Sub Page_PreRender(sender As Object, e As EventArgs) Handles Me.PreRender
If Page.IsPostBack = True Then
Else
Call LogGetRecords()
End If
End Sub
End Class
Please temporarily remove any AJAX from the page and verify that it works properly without it:
https://www.telerik.com/support/kb/aspnet-ajax/ajaxmanager/details/get-more-descriptive-errors-by-disabling-ajax
I hope this will help you troubleshoot the issue.
Regards,
Eyup
Progress Telerik