This is a migrated thread and some comments may be shown as answers.

Edit window taking long time to load on the click of EditCommand in radgrid

1 Answer 50 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Bhuvaneshwari
Top achievements
Rank 1
Bhuvaneshwari asked on 21 Apr 2015, 10:27 AM

Hi,

 On the click of EditCommand in radgrid, a pop-up window should be opened with some details to be edited. But it is taking time to open that pop-up window.And also on the click of "Cancel" button in the pop-up window is taking time. We are using ascx page for the controls of pop-up window. Kindly help us. PFB for the code  of aspx page where the grid is present

<%@ Page Title="" EnableEventValidation="false" Language="C#" MasterPageFile="~/MasterPage.Master" AutoEventWireup="true" CodeBehind="FRAMissedOppTrains.aspx.cs" Inherits="PtcReports.Web.Gui.FRAMissedOppTrains" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentMain" runat="server">
<div class="outer_content">
<telerik:RadSplitter ID="splitMain" runat="server" Width="100%" Height="400" Skin="Metro" CssClass="AutoHeight">
<telerik:RadPane ID="paneFilter" runat="server" Width="34" Scrolling="None" CssClass="AutoHeight">
<telerik:RadSlidingZone ID="slidingZone" runat="server" Width="34" CssClass="AutoHeight" ClickToOpen="true">
<telerik:RadSlidingPane ViewStateMode="Enabled" ID="paneFilterDetails" runat="server" Title="Filter Options" Width="300" MinWidth="200" CssClass="AutoHeight" EnableDock="false">
<div style="padding: 10px 10px 10px 10px; background: silver;">
<span>&nbsp;</span>
<telerik:RadComboBox ID="ddlRegion" Visible="false" runat="server" AutoPostBack="true" OnSelectedIndexChanged="ddlRegion_SelectedIndexChanged" Font-Names="Corbel" Width="200" Skin="Metro"></telerik:RadComboBox>
<p>&nbsp;</p>
<div>
<span>&nbsp;</span>
<telerik:RadComboBox ID="ddlDivision" Visible="false" runat="server" AutoPostBack="true" OnSelectedIndexChanged="ddlDivision_SelectedIndexChanged" Font-Names="Corbel" Width="200" Skin="Metro"></telerik:RadComboBox>
<p>&nbsp;</p>
</div>
<span>Subdivision:&nbsp;</span>
<telerik:RadComboBox ID="ddlTerritory" runat="server" Font-Names="Corbel" Width="200" Skin="Metro">
</telerik:RadComboBox>
<p>&nbsp;</p>
<div>
<asp:RadioButton GroupName="range" ID="optRange" runat="server" Checked="true" Text="Departure Date Range:" />
<div style="padding: 15px 15px 15px 15px;">
<span>Start Date:&nbsp;</span>
<telerik:RadDatePicker ID="dtStart" runat="server" Skin="Metro" DateInput-ClientEvents-OnKeyPress="OnKeyPress">
<%--added by Hema for validating Start and end dates--%>
<Calendar UseRowHeadersAsSelectors="False" UseColumnHeadersAsSelectors="False" ViewSelectorText="x" Skin="Metro"></Calendar>
<DateInput DisplayDateFormat="M/d/yyyy" DateFormat="M/d/yyyy" LabelWidth="40%"></DateInput>
<DatePopupButton ImageUrl="" HoverImageUrl=""></DatePopupButton>
</telerik:RadDatePicker>
<br />
<span>End Date:&nbsp;</span>
<telerik:RadDatePicker ID="dtEnd" runat="server" Skin="Metro" DateInput-ClientEvents-OnKeyPress="OnKeyPress">
<%--added by Hema for validating Start and end dates--%>
<Calendar UseRowHeadersAsSelectors="False" UseColumnHeadersAsSelectors="False" ViewSelectorText="x" Skin="Metro"></Calendar>
<DateInput DisplayDateFormat="M/d/yyyy" DateFormat="M/d/yyyy" LabelWidth="40%"></DateInput>
<DatePopupButton ImageUrl="" HoverImageUrl=""></DatePopupButton>
</telerik:RadDatePicker>
</div>
</div>
<p>&nbsp;</p>
<div>
<asp:RadioButton GroupName="range" ID="optArrival" runat="server" Text="Arrival Date Range:" />
<div style="padding: 15px 15px 15px 15px;">
<span>Start Date:&nbsp;</span>
<telerik:RadDatePicker ID="dtArrivalStart" runat="server" Skin="Metro" DateInput-ClientEvents-OnKeyPress="OnKeyPress">
<%--added by Hema for validating Start and end dates--%>
<Calendar UseRowHeadersAsSelectors="False" UseColumnHeadersAsSelectors="False" ViewSelectorText="x" Skin="Metro"></Calendar>
<DateInput DisplayDateFormat="M/d/yyyy" DateFormat="M/d/yyyy" LabelWidth="40%"></DateInput>
<DatePopupButton ImageUrl="" HoverImageUrl=""></DatePopupButton>
</telerik:RadDatePicker>
<br />
<span>End Date:&nbsp;</span>
<telerik:RadDatePicker ID="dtArrivalEnd" runat="server" Skin="Metro" DateInput-ClientEvents-OnKeyPress="OnKeyPress">
<%--added by Hema for validating Start and end dates--%>
<Calendar UseRowHeadersAsSelectors="False" UseColumnHeadersAsSelectors="False" ViewSelectorText="x" Skin="Metro"></Calendar>
<DateInput DisplayDateFormat="M/d/yyyy" DateFormat="M/d/yyyy" LabelWidth="40%"></DateInput>
<DatePopupButton ImageUrl="" HoverImageUrl=""></DatePopupButton>
</telerik:RadDatePicker>
</div>
</div>
<p>&nbsp;</p>
<div>
<asp:RadioButton GroupName="range" ID="chkNoRange" runat="server" Text="All Dates" />
</div>
<br />
<hr />
<p>&nbsp;</p>
<div style="text-align: right; width: 100%">
<telerik:RadButton ID="btnSubmit" runat="server" Text="Submit" Skin="MetroTouch" Font-Names="Corbel" OnClick="btnSubmit_Click"></telerik:RadButton>
</div>
</div>
</telerik:RadSlidingPane>
</telerik:RadSlidingZone>
</telerik:RadPane>
<%--<telerik:RadSplitBar ID="splitBar" runat="server"></telerik:RadSplitBar>--%>
<telerik:RadPane ID="paneMain" runat="server" CssClass="AutoHeight">
<div class="inner_content" style="width: 100%;">
<div style="float: left; padding-left: 8px; font-weight: bold;">
<asp:Label ID="lblRecordCount" runat="server" Visible="false"></asp:Label>
</div>
<div style="float: right; padding-right: 8px; font-weight: bold;">
<asp:Label ID="lblDateRange" runat="server" Visible="false"></asp:Label>
</div>
<telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
<script type="text/javascript">
var popUp;
function PopUpShowing(sender, eventArgs) {
popUp = eventArgs.get_popUp();
var docWidth = document.documentElement.clientWidth;
var docHeight = document.documentElement.clientHeight;
var vertScrollOffset = document.documentElement.scrollTop;
var popUpWidth = popUp.style.width.substr(0, popUp.style.width.indexOf("px"));
var popUpHeight = popUp.style.height.substr(0, popUp.style.height.indexOf("px"));
//var popUpHeight = 465;
popUp.style.left = (docWidth - popUpWidth) / 2 + "px";
popUp.style.top = (((docHeight - popUpHeight) / 2) + vertScrollOffset) + "px";
}
function ValidateCheckBox() {
//validateTextBox();
//get target base & child control.
var TargetBaseControl = document.getElementById('<%= gridMissedOppTrains.ClientID%>');
var TargetChildControl = "chkComment";
//alert('here');
//get all the control of the type INPUT in the base control.
var Inputs = TargetBaseControl.getElementsByTagName("input");
var IsChecked = false;
var NoCheck = false;
for (var n = 0; n < Inputs.length; ++n) {
if (Inputs[n].type == 'checkbox' && Inputs[n].id.indexOf(TargetChildControl, 0) >= 0) {
NoCheck = true;
if (Inputs[n].checked) {
IsChecked = true;
}
}
}
if (!NoCheck) {
alert('No Rows to Select!');
return false;
}
//sender.set_autoPostBack(postback);
if (!IsChecked) {
alert('Select at least one row!');
return false;
}
}
function ShowSuccessMessage(num) {
alert(num + ' row(s) updated');
}
//added for crew details
function ShowCrewInfoForm(Url) {
var popUp = $find('<%= CrewInfoDialog.ClientID %>');
popUp.show();
popUp.setSize(900, 450);
popUp.setUrl(Url);
popUp.set_title("Crew Info");
popUp.center();
}
 
//added by Hema for validating Start and end dates
function OnKeyPress(sender, args) {
var re = /^[0-9\-\:\/]$/;
args.set_cancel(!re.test(args.get_keyCharacter()));
}
function onRequestStart(sender, args) {
if (args.get_eventTarget().indexOf("ExportToExcelButton") >= 0)
args.set_enableAjax(false);
}
function GridCreated(sender, args) {
var scrollArea = sender.GridDataDiv;
var dataHeight = sender.get_masterTableView().get_element().clientHeight; if (dataHeight < 350) {
scrollArea.style.height = dataHeight + 17 + "px";
}
}

</script>
<telerik:RadWindowManager ID="RadWindowManager1" runat="server">
<Windows>
<telerik:RadWindow ID="CrewInfoDialog" runat="server" Title="Crew Info" VisibleStatusbar="false"
Modal="true" Skin="Simple" ShowContentDuringLoad="false" CenterIfModal="true">
</telerik:RadWindow>
</Windows>
</telerik:RadWindowManager>
</telerik:RadCodeBlock>
<p>&nbsp;</p>
<telerik:RadAjaxPanel runat="server" ID="RadAjaxPanel1"
ClientEvents-OnRequestStart ="onRequestStart">
<telerik:RadGrid ID="gridMissedOppTrains" runat="server" Skin="Simple"
AllowFilteringByColumn="True" AllowSorting="True" CellSpacing="0" GridLines="None"
OnColumnCreated="gridMissedOppTrains_ColumnCreated" ShowStatusBar="True"
OnNeedDataSource="gridMissedOppTrains_NeedDataSource"
OnItemDataBound="gridMissedOppTrains_ItemDataBound"
OnItemCommand="gridMissedOppTrains_ItemCommand" OnItemCreated="gridMissedOppTrains_ItemCreated"
AutoGenerateColumns="False" PageSize="200" ShowGroupPanel="true"
OnUpdateCommand="gridMissedOppTrains_UpdateCommand" AllowPaging="True" AllowCustomPaging="true" AllowAutomaticUpdates="false" CssClass="CustomGridCommandStyle_Only_ExpXLS">
<ExportSettings IgnorePaging="true" OpenInNewWindow="true" ExportOnlyData="true" HideStructureColumns="true">
<Excel Format="Html" />
</ExportSettings>
<ClientSettings AllowColumnsReorder="false" AllowDragToGroup="true">
<Resizing AllowColumnResize="true" ResizeGridOnColumnResize="true" AllowResizeToFit="true" />
<Scrolling AllowScroll="true" UseStaticHeaders="true" SaveScrollPosition="true" ScrollHeight="350px" />
<ClientEvents OnPopUpShowing="PopUpShowing" OnGridCreated="GridCreated" />
<Selecting AllowRowSelect="true" />
</ClientSettings>
<MasterTableView EditMode="PopUp" DataKeyNames="TrainSubdivId" CommandItemDisplay="Top" Width="100%">
<CommandItemSettings ShowExportToExcelButton="true" ExportToExcelText="Export To Excel"
ShowAddNewRecordButton="false" ShowRefreshButton="false"></CommandItemSettings>
<RowIndicatorColumn Visible="True" FilterControlAltText="Filter RowIndicator column">
<HeaderStyle Width="20px"></HeaderStyle>
</RowIndicatorColumn>
<ExpandCollapseColumn Visible="True" FilterControlAltText="Filter ExpandColumn column">
<HeaderStyle Width="20px"></HeaderStyle>
</ExpandCollapseColumn>
<Columns>
<telerik:GridBoundColumn DataField="TrainSubdivId"
FilterControlAltText="Filter TrainSubdivId column" HeaderText="Id" UniqueName="TrainSubdivId" Display="false">
</telerik:GridBoundColumn>
<telerik:GridTemplateColumn HeaderText="Select" HeaderStyle-Width="30px" UniqueName="checkCol" AllowFiltering="false">
<HeaderTemplate>
<asp:CheckBox ID="chkAll" AutoPostBack="true" runat="server" OnCheckedChanged="chkAll_CheckedChanged" />
</HeaderTemplate>
<ItemTemplate>
<asp:CheckBox ID="chkComment" runat="server" AutoPostBack="true" OnCheckedChanged="chkComment_CheckedChanged" />
</ItemTemplate>
</telerik:GridTemplateColumn>
<telerik:GridEditCommandColumn EditText="Update" UniqueName="Update"
FilterControlAltText="Filter EditCommandColumn column">
<HeaderStyle Width="120px" />
</telerik:GridEditCommandColumn>
<telerik:GridBoundColumn DataField="TrainId"
FilterControlAltText="Filter TrainId column" HeaderText="Train Symbol"
UniqueName="TrainId" FilterControlWidth="80px">
<HeaderStyle Width="150px" />
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="LocoId"
FilterControlAltText="Filter LocoId column" HeaderText="Loco Id"
UniqueName="LocoId" FilterControlWidth="30px">
<HeaderStyle Width="80px" />
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="Subdivision"
FilterControlAltText="Filter Subdivision column" HeaderText="Subdivision"
UniqueName="Subdivision" FilterControlWidth="80px">
<HeaderStyle Width="150px" />
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="DepartureStation" Display="False"
FilterControlAltText="Filter DepartureStation column"
HeaderText="Departure Station" UniqueName="DepartureStation" FilterControlWidth="80px">
<HeaderStyle Width="150px" />
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="DepartureDate"
FilterControlAltText="Filter DepartureDate column"
HeaderText="Departure Date/Time" UniqueName="DepartureDate" DataFormatString="{0:MM/dd/yyyy H:mm UTC}" DataType="System.DateTime" FilterControlWidth="80px" AllowFiltering="false">
<HeaderStyle Width="150px" />
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="OnDutyDate" Display="False"
FilterControlAltText="Filter OnDutyDate column" HeaderText="On Duty Date/Time"
UniqueName="OnDutyDate" DataFormatString="{0:MM/dd/yyyy H:mm UTC}" DataType="System.DateTime">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="ArrivalDate" Display="False"
FilterControlAltText="Filter ArrivalDate column" HeaderText="Arrival Date/Time"
UniqueName="ArrivalDate" DataFormatString="{0:MM/dd/yyyy H:mm UTC}" DataType="System.DateTime">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="CrewQualificationDetails" Display="False"
FilterControlAltText="Filter CrewQualification column" HeaderText="Crew Qualification"
UniqueName="CrewQualificationDetails">
</telerik:GridBoundColumn>
<telerik:GridTemplateColumn DataField="CrewQualification"
FilterControlAltText="Filter CrewQualification column" HeaderText="Crew Details"
UniqueName="CrewQualification" FilterControlWidth="40px" AllowFiltering="false">
<ItemTemplate>
<asp:HyperLink ID="CrewInfoLink" Font-Underline="true" runat="server" Text="Edit" CssClass="mousechange"></asp:HyperLink>
<asp:Label ID="CrewLabel" runat="server" Text="Edit"></asp:Label>
</ItemTemplate>
<HeaderStyle Width="80px" />
</telerik:GridTemplateColumn>

<telerik:GridBoundColumn DataField="CutIn"
FilterControlAltText="Filter CutIn column" HeaderText="CutIn/Total Miles"
UniqueName="CutIn" FilterControlWidth="50px" AllowFiltering="false">
<HeaderStyle Width="100px" />
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="RemedyId"
FilterControlAltText="Filter RemedyId column" HeaderText="Remedy ID"
UniqueName="RemedyId" FilterControlWidth="40px" AllowFiltering="false">
<HeaderStyle Width="80px" />
<%-- <ItemStyle Wrap="True" />--%>
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="CauseCode"
FilterControlAltText="Filter CauseCode column" HeaderText="Cause Code" UniqueName="CauseCode" Display="false" FilterControlWidth="40px">
<HeaderStyle Width="80px" />

</telerik:GridBoundColumn>

<telerik:GridTemplateColumn DataField="CauseCodeDetails" FilterControlAltText="Filter CauseCodeDetails column" HeaderText="Cause Code"
UniqueName="CauseCodeDetails" FilterControlWidth="40px" AllowFiltering="false">
<ItemTemplate>
<asp:HyperLink id="CauseCodeLink" Font-Underline="false" runat="server" CssClass="mosusechange"></asp:HyperLink>
</ItemTemplate>
<HeaderStyle Width="80px" />
</telerik:GridTemplateColumn>

<telerik:GridBoundColumn
DataField="MissOppSegmentDesc" HeaderText="Segment Description"
UniqueName="MissOppSegmentDesc"
Visible="true" Display="false">
<HeaderStyle Width="80px" />
</telerik:GridBoundColumn>

<telerik:GridBoundColumn
DataField="MissOppSubgroupDesc" HeaderText="Subgroup Description"
UniqueName="MissOppSubgroupDesc"
Visible="true" Display="false" >
<HeaderStyle Width="80px" />
</telerik:GridBoundColumn>
<telerik:GridBoundColumn
DataField="MissOppCauseDesc" HeaderText="Cause Description"
UniqueName="MissOppCauseDesc"
Visible="true" Display="false">
<HeaderStyle Width="80px" />
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="Action"
FilterControlAltText="Filter Action column" HeaderText="Action"
UniqueName="Action" FilterControlWidth="100px" AllowFiltering="false">
<HeaderStyle Width="100px" />
<%-- <ItemStyle Wrap="False" />--%>
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="ActionStatus"
FilterControlAltText="Filter Action Status Column" HeaderText="Action Status"
UniqueName="ActionStatus" FilterControlWidth="10px">
<HeaderStyle Width="50px" />
<ItemStyle Wrap="False" />
</telerik:GridBoundColumn>
<telerik:GridBoundColumn
DataField="SubgroupDesc"
UniqueName="subgroup"
Visible="false">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn
DataField="SegmentDesc"
UniqueName="segment"
Visible="false">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn
DataField="CauseDesc"
UniqueName="cause"
Visible="false">
</telerik:GridBoundColumn>
 
 
 
<telerik:GridBoundColumn DataField="OfficeComments"
FilterControlAltText="Filter OfficeComments column" HeaderText="Office Comments"
UniqueName="OfficeComments" Visible="True" FilterControlWidth="80px">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="MentorComments"
FilterControlAltText="Filter MentorComments column" HeaderText="Mentor Comments"
UniqueName="MentorComments" Visible="True" FilterControlWidth="80px">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="RecordId"
FilterControlAltText="Filter record_id column" UniqueName="RecordId" Display="False" FilterControlWidth="50px">
</telerik:GridBoundColumn>
</Columns>
<EditFormSettings EditFormType="WebUserControl" UserControlName="MissedOppEdit.ascx" PopUpSettings-Modal="true"
PopUpSettings-Width="430" PopUpSettings-Height="455" EditColumn-Visible="false"
CaptionFormatString="View Details for: {0}" CaptionDataField="TrainId">
<EditColumn FilterControlAltText="Filter EditCommandColumn column"></EditColumn>
<PopUpSettings Modal="True" Width="540px" Height="480px"></PopUpSettings>
</EditFormSettings>
</MasterTableView>
<PagerStyle Mode="NextPrevNumericAndAdvanced" AlwaysVisible="true" Position="Bottom" />
<FilterMenu EnableImageSprites="False"></FilterMenu>
<HeaderStyle Wrap="True" />
<ItemStyle Wrap="True" />
<FilterMenu EnableImageSprites="False"></FilterMenu>
</telerik:RadGrid>
</telerik:RadAjaxPanel>
</div>
</telerik:RadPane>
</telerik:RadSplitter>
</div>
</asp:Content>

ascx page:

<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="MissedOppEdit.ascx.cs" Inherits="PtcReports.Web.Gui.reports.MissedOppEdit" %>
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<table border="0" style="width: 778px; font-family: Cambria; font-size: medium; clear: both; border-collapse: collapse; width: 100%;">
<tr>
<td style="width: 50%;vertical-align:top;">
<table border="0" style="clear: both; border-collapse: collapse; width: 100%;">
<tr>
<td style="font-weight: bold; text-align: right; background-color: lightgray;">
<asp:Label ID="lblTrainSubId" Width="120px" runat="server" Text="Train Sub Id:" Visible='<%#(DataBinder.Eval(Container,"DataItem.TrainSubdivId") == System.DBNull.Value ? false:true) %>'></asp:Label></td>
<td>
<asp:Label ID="lblSubId" runat="server" Text='<%# Bind( "TrainSubdivId" ) %>' Visible='<%#(DataBinder.Eval(Container,"DataItem.TrainSubdivId") == System.DBNull.Value ? false:true) %>'></asp:Label></td>
</tr>
<tr>
<td style="font-weight: bold; text-align: right; background-color: lightgray;">
<asp:Label ID="lblTrain" Width="120px" runat="server" Text="Train Id:" Visible='<%#(DataBinder.Eval(Container,"DataItem.TrainId") == System.DBNull.Value ? false:true) %>'></asp:Label></td>
<td>
<asp:Label ID="lblTrainId" runat="server" Text='<%# Bind( "TrainId" ) %>' Visible='<%#(DataBinder.Eval(Container,"DataItem.TrainId") == System.DBNull.Value ? false:true) %>'></asp:Label></td>
</tr>
<tr>
<td style="font-weight: bold; text-align: right; background-color: lightgray;">
<asp:Label ID="lblsub" Width="120px" runat="server" Text="Subdivision:" Visible='<%#(DataBinder.Eval(Container,"DataItem.Subdivision") == System.DBNull.Value ? false:true) %>'></asp:Label></td>
<td>
<asp:Label ID="Label1" runat="server" Text='<%# Bind( "Subdivision" ) %>' Visible='<%#(DataBinder.Eval(Container,"DataItem.Subdivision") == System.DBNull.Value ? false:true) %>'></asp:Label></td>
</tr>
<tr>
<td style="font-weight: bold; text-align: right; background-color: lightgray;">
<asp:Label ID="lblLoco" Width="120px" runat="server" Text="Loco Id:" Visible='<%#(DataBinder.Eval(Container,"DataItem.LocoId") == System.DBNull.Value ? false:true) %>'></asp:Label></td>
<td>
<asp:Label ID="Label6" runat="server" Text='<%# Bind( "LocoId" ) %>' Visible='<%#(DataBinder.Eval(Container,"DataItem.LocoId") == System.DBNull.Value ? false:true) %>'></asp:Label></td>
</tr>
<tr>
<td style="font-weight: bold; text-align: right; background-color: lightgray;">
<asp:Label ID="lblCutIn" Width="120px" runat="server" Text="CutIn/Total Mile:" Visible='<%#(DataBinder.Eval(Container,"DataItem.CutIn") == System.DBNull.Value ? false:true) %>'></asp:Label></td>
<td>
<asp:Label ID="lbl" runat="server" Text='<%# Bind( "CutIn" ) %>' Visible='<%#(DataBinder.Eval(Container,"DataItem.CutIn") == System.DBNull.Value ? false:true) %>'></asp:Label></td>
</tr>
<tr>
<td style="font-weight: bold; text-align: right; background-color: lightgray;">Remedy ID:</td>
<td>
<asp:TextBox ID="txtRemedyId" runat="server" Width="50px" MaxLength="8" Text='<%# Bind( "RemedyId" ) %>'></asp:TextBox></td>
</tr>
<tr>
<td style="font-weight: bold; text-align: right; background-color: lightgray;">Segment Description:</td>
<td>
<asp:DropDownList ID="ddlSegDesc"
runat="server"
OnSelectedIndexChanged="ddlSegDesc_SelectedIndexChanged"
AutoPostBack="true">
</asp:DropDownList></td>
</tr>
<tr>
<td style="font-weight: bold; text-align: right; background-color: lightgray;">Subgroup Description:</td>
<td>
<asp:DropDownList
ID="ddlSubDesc"
runat="server"
OnSelectedIndexChanged="ddlSubDesc_SelectedIndexChanged"
AutoPostBack="true">
</asp:DropDownList></td>
</tr>
<tr>
<td style="font-weight: bold; text-align: right; background-color: lightgray;">Cause Description:</td>
<td>
<asp:DropDownList ID="ddlCauseDesc" runat="server"
OnSelectedIndexChanged="ddlCauseDesc_SelectedIndexChanged"
AutoPostBack="true">
</asp:DropDownList></td>
<tr>
<td style="font-weight: bold; text-align: right; background-color: lightgray;">Action:</td>
<td>
<asp:DropDownList
ID="ddlAction"
runat="server" OnSelectedIndexChanged="ddlAction_SelectedIndexChanged">
</asp:DropDownList></td>
</tr>
<tr>
<td style="font-weight: bold; text-align: right; background-color: lightgray;">Action Status:</td>
<td>
<asp:DropDownList
ID="ddlActionStatus"
runat="server"
DataTextField="mo_action"
DataValueField="mo_action"
SelectedValue='<%# Bind("ActionStatus") %>'
AppendDataBoundItems="true">
<asp:ListItem Text="Select one..." Value="" />
<asp:ListItem Text="I" Value="I" />
<asp:ListItem Text="C" Value="C" />
<asp:ListItem Text="U" Value="U" />
<asp:ListItem Text="NA" Value="NA" />
</asp:DropDownList>
</td>
</tr>
</table>
</td>
<td style="width: 50%; vertical-align:top;">
<table border="0" style="clear: both; border-collapse: collapse; width: 100%;">
<tr>
<td style="font-weight: bold; text-align: right; background-color: lightgray;" nowrap>
<asp:Label ID="lblDep" Width="150px" runat="server" Text="Departure Station:" Visible='<%#(DataBinder.Eval(Container,"DataItem.DepartureStation") == System.DBNull.Value ? false:true) %>'></asp:Label></td>
<td>
<asp:Label ID="Label2" runat="server" Text='<%# Bind( "DepartureStation" ) %>' Visible='<%#(DataBinder.Eval(Container,"DataItem.DepartureStation") == System.DBNull.Value ? false:true) %>'></asp:Label></td>
</tr>
<tr>
<td style="font-weight: bold; text-align: right; background-color: lightgray;" nowrap>
<asp:Label ID="lblDepDate" Width="150px" runat="server" Text="Departure Date/Time:" Visible='<%#(DataBinder.Eval(Container,"DataItem.DepartureDate") == System.DBNull.Value ? false:true) %>'></asp:Label></td>
<td>
<asp:Label ID="Label3" runat="server" Text='<%# Bind( "DepartureDate" ) %>' Visible='<%#(DataBinder.Eval(Container,"DataItem.DepartureDate") == System.DBNull.Value ? false:true) %>'></asp:Label></td>
</tr>
<tr>
<td style="font-weight: bold; text-align: right; background-color: lightgray;" nowrap>
<asp:Label ID="lblOnDuty" Width="150px" runat="server" Text="On Duty Date/Time:" Visible='<%#(DataBinder.Eval(Container,"DataItem.OnDutyDate") == System.DBNull.Value ? false:true) %>'></asp:Label></td>
<td>
<asp:Label ID="Label4" runat="server" Text='<%# Bind( "OnDutyDate" ) %>' Visible='<%#(DataBinder.Eval(Container,"DataItem.OnDutyDate") == System.DBNull.Value ? false:true)%>'></asp:Label></td>
</tr>
<tr>
<td style="font-weight: bold; text-align: right; background-color: lightgray;" nowrap>
<asp:Label ID="lblArrDate" Width="150px" runat="server" Text="Arrival Date/Time:" Visible='<%#(DataBinder.Eval(Container,"DataItem.ArrivalDate") == System.DBNull.Value ? false:true) %>'></asp:Label></td>
<td>
<asp:Label ID="Label5" runat="server" Text='<%# Bind( "ArrivalDate" ) %>' Visible='<%#(DataBinder.Eval(Container,"DataItem.ArrivalDate") == System.DBNull.Value ? false:true) %>'></asp:Label></td>
</tr>
<tr>
<td style="font-weight: bold; text-align: right; background-color: lightgray;">Office Comments:</td>
<td>
<asp:TextBox ID="txtOfficeComments" runat="server" Text='<%# Bind( "OfficeComments" ) %>'
TextMode="MultiLine" Rows="5" Width="340px"></asp:TextBox></td>
</tr>
<tr>
<td style="font-weight: bold; text-align: right; background-color: lightgray;">Mentor Comments:</td>
<td>
<asp:TextBox ID="txtMentorComments" runat="server" Text='<%# Bind( "MentorComments" ) %>'
TextMode="MultiLine" Rows="4" Width="340px"></asp:TextBox></td>
</tr>
</table>
</td>
</tr>
</table>
<table border="0" style="width: 778px; font-family: Cambria; font-size: medium; clear: both; border-collapse: collapse; width: 100%;">
<tr><td>&nbsp;</td></tr>
<tr>
<td style="text-align: center;">
<telerik:RadButton ID="btnUpdate" runat="server" Text="Update" CommandName="Update"></telerik:RadButton>&nbsp;
<telerik:RadButton ID="btnCancel" runat="server" Text="Cancel" CommandName="Cancel"></telerik:RadButton>
</td>
</tr>
<tr><td>&nbsp;</td></tr>
</table>

 

PFA the screenshots of the main grid and update window

We had even tried with setting EnableViewState to false and set the datasource to null before calling Rebind() and in NeedDataSource() method but it is taking so long to open that window. 

 

1 Answer, 1 is accepted

Sort by
0
Jaya
Top achievements
Rank 1
answered on 22 Apr 2015, 06:10 AM

Hi

 Share your code zip format . Then Where is connectivity and Table structure can you share here 

Tags
Grid
Asked by
Bhuvaneshwari
Top achievements
Rank 1
Answers by
Jaya
Top achievements
Rank 1
Share this question
or