I would like to know how to set the defaults of the From and To dates in a GridDateTimeColumn with EnableRangeFiltering="true".
My questions are in particular:
1) how do I set the From and To dates, and which date format should I use when setting them (dd/mm/yyyy, mm/dd/yyyy or yyyy/mm/dd) and which separator (/, - or .)?
2) how do I set the filter to be *between* the From/To dates and don't let the user to change it (not the dates, the type of filter)?
If there is a documentation page where these questions are answered then could you please share the link to it?
Hi,
I have a RadGrid with a GridTemplateColumn that has a label inside it. This label is populated after the initial datatable is bound to the grid.
Is there any way that I can filter on the contents of this label without having it in my initial datatable?
Here is my template column
<telerik:GridTemplateColumn AllowFiltering="true" HeaderText="Type(s)" UniqueName="column10" AutoPostBackOnFilter="true" ShowFilterIcon="false"> <ItemTemplate> <asp:Label ID="LocationTypeLabel" runat="server"></asp:Label> </ItemTemplate></telerik:GridTemplateColumn>This is how I populate the label. The datatable _dtTypes is actually the second table returned in the dataset whereas the first table is the datasource of the grid.
For Each dr As DataRow In _dtTypes.Select("CustomerID = " & e.Item.DataItem("CustomerID")) lbl.Text = lbl.Text & dr("LocationType") & ", "NextHi,
My grid has 2 collumns showing dates from the datasource which is hooked up to the database.
I serached for a fix for this and found alot of diffrent solutions yet none of them seem to work for me.
Column in grid:
<telerik:GridBoundColumn DataField="created_date" DataType="System.DateTime" FilterControlAltText="Filter created_date column" HeaderText="created date" SortExpression="created_date" UniqueName="created_date" FilterControlWidth="75px" DataFormatString="{0:yyyy/MM/dd}" meta:resourcekey="GridBoundColumnResource24"></telerik:GridBoundColumn>
DataBase:
Output:
Any suggestions is much appriciated.
Hello,
My Radgrod is paged (no custom paging).
On Itemdatabound i am trying to set an url to GridHyperLinkColumn
But ItemDataBound isnt called if I switch to another page.
Is there any way to call ItemDataBound when switching to another page with RadGrid?
Thanks in advance.
I am trying to recreate the example in the following demo:
http://demos.telerik.com/aspnet-ajax/grid/examples/functionality/exporting/export-word-csv/defaultcs.aspx
In my case filtering by column is allowed and the data source is set in the code behind through the RadGrid1NeedDataSource method.
The data is loaded correctly and shown in the table, sorting by clicking on the column names work, the page navigation at the bottom-left corner works fine.
I am facing two problems:
1) The buttons located at the bottom-center for going to a specific page and changing the page size don't work.
2) None of the filters work, entering any text doesn't have any effect and pressing any filter icon, while using the IE F12 DevTools debugger, shows the following error:
SCRIPT5007: Unable to get property '_showFilterMenu' of undefined or null reference<br>File: script block (377), Line: 3, Column: 1Do you have any idea how I could fix it?
My source code follows:
<form id="form1" runat="server"><telerik:RadScriptManager runat="server" ID="RadScriptManager1" EnableScriptCombine="False" /><telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" /><telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" LoadingPanelID="RadAjaxLoadingPanel1"> <asp:button id="Button1" text="Export to CSV" onclick="ExportToCvs" runat="server" /> <telerik:RadGrid ID="RadGrid1" Skin="Silk" AutoGenerateColumns="false" AllowPaging="True" AllowSorting="True" AllowFilteringByColumn="True" PageSize="10" OnNeedDataSource="RadGrid1NeedDataSource" EnableLinqExpressions="false" runat="server"> <ExportSettings HideStructureColumns="true" /> <MasterTableView Width="100%" AllowFilteringByColumn="True"> <PagerStyle Mode="NextPrevNumericAndAdvanced"></PagerStyle> <Columns> <telerik:GridBoundColumn DataField="Column1" HeaderText="Column1" /> <telerik:GridDateTimeColumn DataField="Column2" UniqueName="Column2" HeaderText="Column2" PickerType="DatePicker" EnableRangeFiltering="true" FilterControlWidth="110px" EditDataFormatString="dd.mm.yyyy" DataFormatString="{0:dd/mm/yyyy}" DataType="System.DateTime" ShowFilterIcon="false" CurrentFilterFunction="Between" /> <telerik:GridBoundColumn DataField="Column3" HeaderText="Column3" /> </Columns> <ItemStyle BackColor="#DFDFDF" /> <HeaderStyle BackColor="#FFFFFF" ForeColor="#767676" /> <AlternatingItemStyle BackColor="#FFFFFF" /> </MasterTableView> </telerik:RadGrid></telerik:RadAjaxPanel></form>In the code behind:
protected void RadGrid1NeedDataSource(object source, GridNeedDataSourceEventArgs e) { using (SqlConnection conn = new SqlConnection(Settings.Default.ConnectionString)) { DataContext db = new DataContext(conn); Table<Item> items = db.GetTable<Item>(); IEnumerable<Item> query = from x in items select x; RadGrid1.DataSource = query.ToList(); }}Hi,
I am using a Radgrid which have footer and groupfooter. But the excel export of the Radgrid is not working properly when it is grouped.
The code which I used to export to Excel is below.
private void lnkExport_Click(object sender, System.EventArgs e)
{
uwgAllocationCount.ExportSettings.FileName = "CountSummary " ;
uwgAllocationCount.ExportSettings.IgnorePaging = true;
uwgAllocationCount.ExportSettings.OpenInNewWindow = true;
uwgAllocationCount.MasterTableView.UseAllDataFields = true;
uwgAllocationCount.ExportSettings.ExportOnlyData = true;
uwgAllocationCount.ExportSettings.Excel.Format = GridExcelExportFormat.Biff;
uwgAllocationCount.ExportSettings.HideStructureColumns = false;
uwgAllocationCount.MasterTableView.HierarchyDefaultExpanded = true;
uwgAllocationCount.ExportSettings.SuppressColumnDataFormatStrings = false;
uwgAllocationCount.MasterTableView.ExportToExcel();
}
I have even tried GridExcelExportFormat.HTML, insted of GridExcelExportFormat.Biff, but it is showing only the grouped headers. It is not exporting the grouped data.
Please help.
Thanks
Prasanth
Hi
How to Design one aspx page in following field Name,Empno,amount,Bs in row wise using Bootstrap Css then how to open this aspx page using radwindow?
I have to need design aspx page using Bootstrap and when i click hyperlink open the aspx page using radwindow.
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> </span>
<telerik:RadComboBox ID="ddlRegion" Visible="false" runat="server" AutoPostBack="true" OnSelectedIndexChanged="ddlRegion_SelectedIndexChanged" Font-Names="Corbel" Width="200" Skin="Metro"></telerik:RadComboBox>
<p> </p>
<div>
<span> </span>
<telerik:RadComboBox ID="ddlDivision" Visible="false" runat="server" AutoPostBack="true" OnSelectedIndexChanged="ddlDivision_SelectedIndexChanged" Font-Names="Corbel" Width="200" Skin="Metro"></telerik:RadComboBox>
<p> </p>
</div>
<span>Subdivision: </span>
<telerik:RadComboBox ID="ddlTerritory" runat="server" Font-Names="Corbel" Width="200" Skin="Metro">
</telerik:RadComboBox>
<p> </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: </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: </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> </p>
<div>
<asp:RadioButton GroupName="range" ID="optArrival" runat="server" Text="Arrival Date Range:" />
<div style="padding: 15px 15px 15px 15px;">
<span>Start Date: </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: </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> </p>
<div>
<asp:RadioButton GroupName="range" ID="chkNoRange" runat="server" Text="All Dates" />
</div>
<br />
<hr />
<p> </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> </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> </td></tr>
<tr>
<td style="text-align: center;">
<telerik:RadButton ID="btnUpdate" runat="server" Text="Update" CommandName="Update"></telerik:RadButton>
<telerik:RadButton ID="btnCancel" runat="server" Text="Cancel" CommandName="Cancel"></telerik:RadButton>
</td>
</tr>
<tr><td> </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.
Hello,
I have a RadGrid (Grid A) and inside it's NestedViewTemplate I have another RadGrid (Grid B). Within "Grid B" I have a GridTemplateColumn that contains a RadButton. I'm trying to figure out how to get the position of this button in JavaScript/jQuery when the user clicks on it (OnClientClicked event) so that I can display and position a hovering <div> or <asp:panel>.
I've tried using syntax such as the one below to find the button and then use jQuery's "position()", then set the CSS properties for the div, but "button" is not visible to JavaScript code because it's inside the nested Grid.:
var element = $find('<%= button.ClientID %>');Can anyone help me figure out how to do this?
Thanks in advance.