<CommandItemTemplate> <table cellspacing="5px" cellpadding="0" style="width: 100%;height: 25px;margin: 0px;padding: 0px;border-bottom: 1px solid #cccccc;background-color: #ffffff;"> <tr><td style="width:250px;text-align: left; padding-left: 1px;" nowrap="nowrap"> <table cellspacing="0" cellpadding="0" border="0" style="width: 250px;height: 25px;margin: 0px;padding: 0px;border-bottom: 1px solid #cccccc;background-color: #ffffff;"> <tr> <td style="width:100px;text-align: right; padding-left: 1px;" nowrap> <telerik:RadDatePicker ID="RadDatePicker1" Runat="server" Skin="Outlook" AutoPostBack="False" Width="100"> <Calendar UseRowHeadersAsSelectors="False" UseColumnHeadersAsSelectors="False" ViewSelectorText="x" Skin="Outlook"></Calendar> <DateInput DisplayDateFormat="M/d/yyyy" DateFormat="M/d/yyyy" AutoPostBack="False"></DateInput> <DatePopupButton ImageUrl="" HoverImageUrl=""></DatePopupButton> </telerik:RadDatePicker> </td><td style="width:20px;text-align:left;vertical-align:middle;padding-left:1px;" nowrap="nowrap"> <asp:Image ID="Image1" runat="server" Height="1" Width="1" ImageUrl="images/shim.gif" /> <asp:Label ID="Label1" runat="server" Text="to" CssClass="LabelStyle"></asp:Label> <asp:Image ID="Image4" runat="server" Height="1" Width="5" ImageUrl="images/shim.gif" /> </td><td style="width:100px;text-align:left;vertical-align:middle;padding-left:1px;" nowrap="nowrap"> <telerik:RadDatePicker ID="RadDatePicker2" Runat="server" Skin="Outlook" AutoPostBack="False" Width="100"> <Calendar ID="Calendar1" UseRowHeadersAsSelectors="False" UseColumnHeadersAsSelectors="False" ViewSelectorText="x" Skin="Outlook" runat="Server"></Calendar> <DateInput ID="DateInput1" DisplayDateFormat="M/d/yyyy" DateFormat="M/d/yyyy" AutoPostBack="False" runat="Server"></DateInput> <DatePopupButton ImageUrl="" HoverImageUrl=""></DatePopupButton> </telerik:RadDatePicker> </td><td style="width:30px;text-align:left;vertical-align:middle;padding-left:1px;" nowrap="nowrap"> <asp:Button ID="cmdSearch" runat="server" Text="Go" CssClass="ButtonStyle" CommandName="Refresh" /> </td> </tr> </table> </td><td style="width:50%;text-align: center"> <asp:Label ID="LabelDate" runat="server" Text="" CssClass="LabelStyle"></asp:Label> </td><td style="width:20%;text-align: right"> <asp:Image ID="Image2" runat="server" Height="1" Width="20" ImageUrl="images/shim.gif" /> </td></tr> </table></CommandItemTemplate>
function requestStart(sender, args) { if (args.get_eventTarget().indexOf("lnkExportExcel") >= 0) args.set_enableAjax(false);}protected
void GridChevronPortEQ_ItemCommand(object sender, GridCommandEventArgs e)
{
if (e.CommandName == RadGrid.FilterCommandName)
{
Pair filterPair = (Pair)e.CommandArgument;
if (filterPair.First.ToString() == "greater")
{
string colName = filterPair.Second.ToString();
TextBox tbPattern = (e.Item as GridFilteringItem)[colName].Controls[0] as TextBox;
string[] values = tbPattern.Text.Split(' ');
if (values.Length == 2)
{
e.Canceled =
true;
string newFilter = "(([" + filterPair.Second + "] >='" + values[0] + "') AND ([" + filterPair.Second + "] <='" + values[1] + "'))";
if (GridChevronPortEQ.MasterTableView.FilterExpression == "")
{
GridChevronPortEQ.MasterTableView.FilterExpression = newFilter;
}
else
{
GridChevronPortEQ.MasterTableView.FilterExpression =
"((" + GridChevronPortEQ.MasterTableView.FilterExpression + ") AND (" + newFilter + "))";
}
GridChevronPortEQ.Rebind();
}
}
}
}