Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
121 views
I'm trying to replace the MOSS's RichHtmlField control with the RadHtmlField control, but I don't seem to find the trial download of the correct assembly anywhere.

When I go to http://www.telerik.com/products/sharepoint/overview.aspx and try to get a free trial, I end up to this page: http://www.telerik.com/products/aspnet/download.aspx where I can download RadControls for asp.net. I've downloaded that, but I can't find the RadHtmlField inside it. What am I missing here?

--Mika
George
Telerik team
 answered on 22 Feb 2008
1 answer
154 views
I'm calling a tooltipManager from inside a radDock.

While the radDock is docked in a dockzone, there's no problem, but when the radDock is floating it overlaps the tooltip.

I've found similar posts related to radCalendar or radCombobox mentioning zIndex but I can't find zIndex neither on tooltipManager or radDock.

How can I show the tooltip always on top?
Svetlina Anati
Telerik team
 answered on 22 Feb 2008
1 answer
90 views

Hi,

I have a form with a radsplitter control. The left hand pane has a treeview for navigation. When a node is clicked a

specific page is loaded into the right hand pane using the serverside ContentURL property.

One of the loaded pages contains a RadEditor control. This has its OnClientLoad event wired to a handler that

toggles the screen mode in order to show the RadEditor full screen (within the pane).

Also, on the RadEditor control I have created a custom button ('Save') that initiates an ajax request. The ajax

request handler saves the content of the Radeditor to the database.

This works great.

However I want to ensure that when the user clicks another node in the tree (and another page gets loaded) that the

existing content in the RadEditor is saved to the database. (Just in case the user had forgotten to press the custom

'Save' button).

So, I wired up some javascript in the parent form to respond to the treeview OnClientNodeClicking event. In this

javascript function I get a reference to the editor within the pane and fire the custom 'Save' command.

Sure enough, the editor's content is saved to the database but also I get a javascript error:

Error: '_f.get_contantArea()' is null or not an object

I can't work out why this error is occurring. Any clues?

I've created a website to demonstrate but not sure how to attach a file to the post.

Tervel
Telerik team
 answered on 22 Feb 2008
2 answers
134 views
When using Prometheus Pie Chart with borders on with the ChartSeriesItem object the chart renders with a 1px line drawn out past the center of the pie chart on the smallest slices.

To reproduce just create a pie chart with the following values:

3991
1187
886
506
51
42

You will see that the border drawn around the slices will extend pass the center of the pie chart for the two smallest slices. I can provide code to duplicate if needed or a screenshot to illustrate.
Sebastian
Telerik team
 answered on 22 Feb 2008
4 answers
142 views
I have a very strange problem with my grid which I just cannot see the answer to.  When my grid first loads, I click the 'Next' page button and the grid correctly raises the OnPageIndexChanged event and moves to the next page.  I then click it again and the event does not fire and the grid returns to page index 0.  On the first click the following events are raised:

NeedDataSource
OnPageIndexChanged
NeedDataSource

On the second click, I only get:

NeedDataSource

I am aiming to replicate the solution provided in this forum thread.

My grid definition is as follows.  Can anybody see why this would happen?

        <telerik:RadGrid runat="server" ID="EntitiesGrid" 
            OnNeedDataSource="EntitiesGrid_NeedDataSource" OnPageIndexChanged="EntitiesGrid_PageIndexChanged" 
            Width="100%" Height="300" GridLines="None" AllowPaging="true" 
            OnItemDataBound="EntitiesGrid_ItemDataBound" ShowHeader="false"   
            AllowMultiRowSelection="true" BorderWidth="0" Skin="Vista" EnableViewState="false">  
            <PagerStyle Mode="NextPrevAndNumeric" /> 
            <MasterTableView TableLayout="Fixed" AutoGenerateColumns="false" BorderWidth="0" onmousedown="ShowContextMenu()">  
                <Columns> 
                    <telerik:GridTemplateColumn UniqueName="ImageColumn" ItemStyle-Width="35"></telerik:GridTemplateColumn> 
                    <telerik:GridTemplateColumn UniqueName="NameColumn"></telerik:GridTemplateColumn> 
                    <telerik:GridTemplateColumn UniqueName="DrillDownColumn" ItemStyle-Width="25"></telerik:GridTemplateColumn> 
                </Columns> 
            </MasterTableView> 
            <ClientSettings  ApplyStylesOnClient="true">  
                <Scrolling AllowScroll="true" UseStaticHeaders="true" /> 
                <Selecting AllowRowSelect="true" EnableDragToSelectRows="false" /> 
                <ClientEvents OnRowSelected="GridRowSelected" OnRowDeselected="GridRowDeselected" OnTableCreated="Resize" OnMasterTableViewCreated="Resize" /> 
                <Resizing EnableRealTimeResize="true" /> 
            </ClientSettings> 
        </telerik:RadGrid> 
 

I should also add that with NextPrevAndNumeric paging mode, selecting the page numbers works as expected every time.

Thanks in advance.
Jonathan
Top achievements
Rank 1
 answered on 22 Feb 2008
2 answers
195 views
Hi,

During testing of our app we have noticed that after a while of clicking through the tree the app would become unresponsive. After further investigation using fiddler I have noticed that when clicking on a node in the tree an IIS 500 error is occuring when it trys to access a WebResource.axd file:

GET /IIArc_Web/WebResource.axd?d=NPCZaYD0ZnW9P1MaGCEsB4UaRMRZ6827zTR3Kjmm9KhaWc4Zx7PlGOv5499kWRCAz_05CCTd6mEHIdBrMF6FQs8UYvQRaJowxP2YZ6Nd7HY1&t=633359239360000000 HTTP/1.1

The problem being 2 fold, but I am not sure if one is causing the other. IIArc_Web is the Virtual Directory where the app is run on the dev machines, but when it is in the test environment it is under a different Virtual Directory as shown by this GET:

GET /app/WebResource.axd?d=E7IXwd0CmHOjAFORKtlsnrBlDyS0U-Wd-5rQt_TV-Z7AkkyqrUNKr3DIYgqAQSgISmaZyKdk6VAfCpud9vF5aVLFuZ_M96jNVCDE3NG1VyZnyszxqcCZpReQp8apo1E70&t=633130997540000000 HTTP/1.1

And the actual error that is getting returned is:

[CryptographicException: Padding is invalid and cannot be removed.]
   System.Security.Cryptography.RijndaelManagedTransform.DecryptData(Byte[] inputBuffer, Int32 inputOffset, Int32 inputCount, Byte[]&amp; outputBuffer, Int32 outputOffset, PaddingMode paddingMode, Boolean fLast) +1545747
   System.Security.Cryptography.RijndaelManagedTransform.TransformFinalBlock(Byte[] inputBuffer, Int32 inputOffset, Int32 inputCount) +257
   System.Security.Cryptography.CryptoStream.FlushFinalBlock() +30
   System.Web.Configuration.MachineKeySection.EncryptOrDecryptData(Boolean fEncrypt, Byte[] buf, Byte[] modifier, Int32 start, Int32 length, Boolean useValidationSymAlgo) +164
   System.Web.UI.Page.DecryptString(String s) +83
   System.Web.Handlers.AssemblyResourceLoader.System.Web.IHttpHandler.ProcessRequest(HttpContext context) +148
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +358
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean&amp; completedSynchronously) +64

I am hoping if I can figure out why when clicking on the node in the tree it is looking for the WebResource.axd file in the wrong location will fix the exception that is being thrown.

Thanks,
Andy
Veselin Vasilev
Telerik team
 answered on 22 Feb 2008
4 answers
139 views
Is it possible to get the splitter to display at 100% height in IE6?

It works great for me in IE7, Firefox, Safari and Opera but IE6 refuses to see the 100% value.

I have set the HTML, body and all other tags in the hierarchy above the splitter to 100% in my CSS. I have used the Height property in the splitter to 100%.

Any ideas?

Thanks,

Michael
Michael Dunbar
Top achievements
Rank 2
 answered on 22 Feb 2008
1 answer
128 views
hi - just a little thing. when the radwindow is maximized with the Default2006 skin, the icon to restore it to normal size looks just the same as the maximize icon. can you supply a new one?
cheers,
rob
Georgi Tunev
Telerik team
 answered on 22 Feb 2008
1 answer
106 views
Hello,

I wanted to know if it is possible to extend the Prometheus RadScheduler Control.  I wanted to add a couple of textboxes that will show up on the loading of the Event Insertion screen.  These textboxes will submit data when the Insert Event is fired. 

Is this possible?

Thanks,
-David
Atanas Korchev
Telerik team
 answered on 22 Feb 2008
2 answers
110 views
I have one page in my application where the DatePicker will not fire and simply places a pound (#) symbol in the URL.  The javascript appears to be working in the text box part of the control as it changes to red and icon upon a bad format.  The page has a AjaxManager on it which controls other areas of the page.  The interesting thing is that when I uncheck one of those controls and recheck it (an AutoPostBack is happening with it) then the PopUp comes back.  I simply cannot find why that would happen.  Here are the code blocks if anyone can help.  Thanks in advance.
Doug

ASPX page -- dateStart and dateEnd are my DatePickers.  chkCheckAll is the checkbox that seems to release the PopUps upon postback through the AJAX.

 

<%@ Page language="c#" Codebehind="DamageSearch.aspx.cs" AutoEventWireup="True" Inherits="ELM.TicketManagementSystem.DamageSearchForm" %> 
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> 
<%@ Register TagPrefix="layout" TagName="DefaultHeader" Src="components/controls/DefaultHeader.ascx" %> 
<%@ Register TagPrefix="layout" TagName="DefaultFooter" Src="components/controls/DefaultFooter.ascx" %> 
<%@ Register TagPrefix="nav" TagName="MainNav" Src="components/controls/MainNav.ascx" %> 
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" > 
<HTML> 
    <HEAD> 
        <title>LaunchPoint Ticket Management Portal - Damage Search</title> 
        <META http-equiv="Content-Type" content="text/html; charset=windows-1252">  
        <meta content="Microsoft Visual Studio .NET 7.1" name="GENERATOR">  
        <meta content="C#" name="CODE_LANGUAGE">  
        <meta content="JavaScript" name="vs_defaultClientScript">  
        <meta content="http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema">  
        <LINK href="lib/StyleSheet1.css" type="text/css" rel="stylesheet">  
    </HEAD> 
    <body bgColor="white" leftMargin="0" topMargin="0">  
        <form id="pageForm" name="pageForm" runat="server">  
            <telerik:RadScriptManager ID="RadScriptManager1" runat="server">  
            </telerik:RadScriptManager> 
            <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" DefaultLoadingPanelID="RadAjaxLoadingPanel1">  
                <AjaxSettings> 
                    <telerik:AjaxSetting AjaxControlID="rbLocation">  
                        <UpdatedControls> 
                            <telerik:AjaxUpdatedControl ControlID="chkSearchAll" /> 
                            <telerik:AjaxUpdatedControl ControlID="ddStateList" /> 
                            <telerik:AjaxUpdatedControl ControlID="drpProfitCenters" /> 
                            <telerik:AjaxUpdatedControl ControlID="txtDamage" /> 
                        </UpdatedControls> 
                    </telerik:AjaxSetting> 
                    <telerik:AjaxSetting AjaxControlID="chkSearchAll">  
                        <UpdatedControls> 
                            <telerik:AjaxUpdatedControl ControlID="ddStateList" /> 
                            <telerik:AjaxUpdatedControl ControlID="drpProfitCenters" /> 
                        </UpdatedControls> 
                    </telerik:AjaxSetting> 
                    <telerik:AjaxSetting AjaxControlID="ddStateList">  
                        <UpdatedControls> 
                            <telerik:AjaxUpdatedControl ControlID="drpProfitCenters" /> 
                        </UpdatedControls> 
                    </telerik:AjaxSetting> 
                    <telerik:AjaxSetting AjaxControlID="rbDamage">  
                        <UpdatedControls> 
                            <telerik:AjaxUpdatedControl ControlID="chkSearchAll" /> 
                            <telerik:AjaxUpdatedControl ControlID="ddStateList" /> 
                            <telerik:AjaxUpdatedControl ControlID="drpProfitCenters" /> 
                            <telerik:AjaxUpdatedControl ControlID="txtDamage" /> 
                        </UpdatedControls> 
                    </telerik:AjaxSetting> 
                    <telerik:AjaxSetting AjaxControlID="btnSearch">  
                        <UpdatedControls> 
                            <telerik:AjaxUpdatedControl ControlID="LblSearchResults" /> 
                            <telerik:AjaxUpdatedControl ControlID="gridDamage" /> 
                        </UpdatedControls> 
                    </telerik:AjaxSetting> 
</AjaxSettings> 
            </telerik:RadAjaxManager> 
            <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Height="75px" 
                Width="75px">  
                <img alt="Loading..." src='<%= RadAjaxLoadingPanel.GetWebResourceUrl(Page, "Telerik.Web.UI.Skins.Default.Ajax.loading.gif") %>' 
                    style="border: 0px;" /> 
            </telerik:RadAjaxLoadingPanel> 
            <layout:defaultheader id="HeaderControl" runat="server"></layout:defaultheader> 
            <table cellSpacing="0" cellPadding="0" width="996" border="0">  
                <tr> 
                    <td width="10" bgColor="#993333"><IMG height="1" src="images/spacer.gif" width="10" border="0">  
                    </td> 
                    <td vAlign="top" align="left" width="196" bgColor="#993333">  
                        <!-- Page Navigation --><NAV:MAINNAV id="MainNav" RUNAT="SERVER"></NAV:MAINNAV><br>  
                        <img height=10 src='~/images/spacer.gif' width=2 border=0 /><asp:Button ID="btnNewDamage" runat="server" Text="Enter New Damage" OnClick="btnNewDamage_Click" /><br /> 
                        <br /> 
                        <asp:Panel ID="pSearchDamageNav" runat="server" Height="50px" Width="125px">  
                        <table style="FONT-SIZE: 10pt; WIDTH: 180px; FONT-FAMILY: Arial; BORDER-COLLAPSE: collapse; BACKGROUND-COLOR: #eeeeee" 
    cellSpacing="0" rules="all" width="180" bgColor="#eeeeee" border="0">  
    <tr bgColor="#ff9933">  
        <td style="width: 5px"><img height=10 src='~/images/spacer.gif' width=5 border=0 /> 
        </td> 
        <td class="whitetextbold" align="left" style="width: 180px"><asp:radiobutton id="rbLocation" GroupName="search" Text="Search By Fields" CssClass="whitetextbold" 
                runat="server" AutoPostBack="True" Checked="True" OnCheckedChanged="rbLocation_CheckedChanged"></asp:radiobutton></td>  
    </tr> 
    <tr> 
        <td colSpan="2"><img height=5 src='~/images/spacer.gif' border=0 /></td>  
    </tr> 
    <tr> 
        <td style="width: 5px">  
        </td> 
        <td class="text" vAlign="middle" align="left" style="width: 180px"><asp:checkbox id="chkSearchAll" Text=" Search All My Areas" runat="server" 
                Width="152px" Checked="True" AutoPostBack="True" OnCheckedChanged="chkSearchAll_CheckedChanged"></asp:checkbox></td>  
    </tr> 
    <tr> 
        <td style="width: 5px">  
        </td> 
        <td class="text" vAlign="middle" align="left" style="width: 180px"><asp:dropdownlist id="ddStateList" runat="server" Width="160px" OnChange="javacript:SetPageFocus();" AutoPostBack="True" Enabled="False" OnSelectedIndexChanged="ddStateList_SelectedIndexChanged"></asp:dropdownlist></td>  
    </tr> 
    <tr> 
        <td colSpan="2"></td> 
    </tr> 
        <TR> 
            <TD width="5">  
            </TD> 
            <TD class="text" vAlign="middle" align="left">  
                <asp:dropdownlist id="drpProfitCenters" runat="server" Width="160px" Enabled="False"></asp:dropdownlist></TD>  
        </TR> 
    <tr> 
        <td colSpan="2"></td> 
    </tr> 
    <tr bgColor="#ff9933">  
        <td style="width: 5px"><img height=10   
      src='~/images/spacer.gif' width=5 border=0   
      > 
        </td> 
        <td class="whitetextbold" align="left" style="width: 180px"><asp:radiobutton id="rbDamage" GroupName="search" Text="Search By Damage #" CssClass="whitetextbold" 
                runat="server" AutoPostBack="True" OnCheckedChanged="rbDamage_CheckedChanged"></asp:radiobutton></td>  
    </tr> 
    <tr> 
        <td colSpan="2"><img height=5   
      src='~/images/spacer.gif' border=0   
      ></td>  
    </tr> 
    <tr> 
        <td style="width: 5px"><img height=10   
      src='~/images/spacer.gif' width=5 border=0   
      > 
        </td> 
        <td class="text" vAlign="middle" align="left" style="width: 180px"><asp:textbox id="txtDamage" runat="server" Visible="False"></asp:textbox></td>  
    </tr> 
    <tr> 
        <td colSpan="2"></td> 
    </tr> 
    <tr> 
        <td colSpan="2" style="height: 7px"><img height=5   
      src='~/images/spacer.gif' border=0   
      ></td>  
    </tr> 
    <tr> 
        <td class="text" vAlign="middle" align="center" colSpan="2"><asp:button id="btnSearch" OnClick="btnSearch_Click" Text="Search" runat="server"></asp:button></td>  
    </tr> 
    <tr> 
        <td colSpan="2"><img height=5   
      src='~/images/spacer.gif' border=0   
      ></td>  
    </tr> 
</table> 
                        </asp:Panel> 
                        <br /> 
                        <!-- End Navigation --></td>  
                    <td width="2" bgColor="#000000"><IMG height="500" src="images/spacer.gif" width="2">  
                    </td> 
                    <td width="10">&nbsp;</td> 
                    <td vAlign="top" align="center" style="width: 800px">  
                        <!-- Main Page Content --> 
                        <div style="TEXT-ALIGN: center"><asp:label id="lblTitle" Runat="server" CssClass="blueheader">Damage Search</asp:label></div>  
                        <div style="TEXT-ALIGN: left"><asp:label id="MyError" CssClass="redtextbold" Runat="server"></asp:label></div>  
                        <table cellSpacing="0" cellPadding="1" border="0" > 
                            <tr> 
                                <td align="left" colspan="6" rowspan="1" valign="top">  
                                    <table style="width: 700px">  
                                        <tr> 
                                            <td rowspan="4">  
                                    <table cellpadding="4" cellspacing="4">  
                                        <tr bgColor="#000066">  
                                            <td colspan="2" class="whiteTextBold">  
                                                Damage Date</td> 
                                        </tr> 
                                        <tr> 
                                            <td> 
                                                <asp:Label ID="lblStartDate" runat="server" CssClass="bluetextbold" Text="Start"></asp:Label></td>  
                                            <td> 
                                                <telerik:RadDatePicker ID="dateStart" runat="server">  
                                                    <DatePopupButton CssClass="radPopupImage_Default" /> 
                                                    <Calendar CellAlign="Center" CellVAlign="Middle" DayNameFormat="FirstLetter" FirstDayOfWeek="Default" 
                                                        MonthLayout="Layout_7columns_x_6rows" Orientation="RenderInRows" TitleAlign="Center" 
                                                        UseColumnHeadersAsSelectors="False" UseRowHeadersAsSelectors="False">  
                                                    </Calendar> 
                                                    <DateInput Width="100%">  
                                                    </DateInput> 
                                                </telerik:RadDatePicker> 
                                            </td> 
                                        </tr> 
                                        <tr> 
                                            <td> 
                                                <asp:Label ID="lblEndDate" runat="server" CssClass="bluetextbold" Text="End"></asp:Label></td>  
                                            <td> 
                                                <telerik:RadDatePicker ID="dateEnd" runat="server">  
                                                    <DatePopupButton CssClass="radPopupImage_Default" /> 
                                                    <Calendar CellAlign="Center" CellVAlign="Middle" DayNameFormat="FirstLetter" FirstDayOfWeek="Default" 
                                                        MonthLayout="Layout_7columns_x_6rows" Orientation="RenderInRows" TitleAlign="Center" 
                                                        UseColumnHeadersAsSelectors="False" UseRowHeadersAsSelectors="False">  
                                                    </Calendar> 
                                                    <DateInput Width="100%">  
                                                    </DateInput> 
                                                </telerik:RadDatePicker> 
                                            </td> 
                                        </tr> 
                                    </table> 
                                            </td> 
                                            <td> 
                                    <asp:Label ID="Label2" runat="server" CssClass="bluetextbold" Text="Utility:"></asp:Label> 
                                    <asp:DropDownList ID="ddlUtility" runat="server" Width="391px">  
                                    </asp:DropDownList></td>  
                                        </tr> 
                                        <tr> 
                                            <td> 
                                    <asp:Label ID="lblLocator" runat="server" CssClass="bluetextbold" Text="Locator:"></asp:Label> 
                                                <asp:DropDownList  
                                        ID="ddlLocator" runat="server" Width="377px">  
                                    </asp:DropDownList></td>  
                                        </tr> 
                                        <tr> 
                                            <td> 
                                    <asp:Label ID="lblDamageAddress" runat="server" CssClass="bluetextbold" Text="Damage Address:"></asp:Label> 
                                    <asp:TextBox ID="txtDamageAddress" runat="server" Width="324px"></asp:TextBox></td>  
                                        </tr> 
                                        <tr> 
                                            <td> 
                                                <asp:Label ID="Label3" runat="server" CssClass="bluetextbold" Text="City:"></asp:Label> 
                                    <asp:TextBox ID="txtCity" runat="server"></asp:TextBox> 
                                    <asp:Label ID="lblState" runat="server" CssClass="bluetextbold" Text="State:"></asp:Label> 
                                    <asp:DropDownList ID="ddlState" runat="server" Width="90px">  
                                    </asp:DropDownList></td>  
                                        </tr> 
                                    </table> 
                                </td> 
                            </tr> 
                            <tr> 
                                <td align="center" colspan="5" rowspan="1" valign="top">  
                                    <table> 
                                        <tr bgColor="#000066">  
                                            <td class="whitetextbold">  
                                                &nbsp;Status  
                                            </td> 
                                            <td class="whitetextbold">  
                                                &nbsp;Liable</td> 
                                            <td class="whitetextbold">  
                                                &nbsp;A/R Status</td> 
                                        </tr> 
                                        <tr> 
                                            <td> 
                                                <asp:CheckBoxList ID="cblStatus" runat="server" CssClass="bluetextbold" RepeatColumns="2" Width="200px">  
                                                    <asp:ListItem Value="1">Pending</asp:ListItem> 
                                                    <asp:ListItem Value="2">Inactive</asp:ListItem> 
                                                    <asp:ListItem Value="3">Active</asp:ListItem> 
                                                    <asp:ListItem Value="4">Accepted</asp:ListItem> 
                                                    <asp:ListItem Value="5">Paid</asp:ListItem> 
                                                    <asp:ListItem Value="6">Drop/Rebill</asp:ListItem> 
                                                    <asp:ListItem Value="7">Escalated</asp:ListItem> 
                                                </asp:CheckBoxList></td>  
                                            <td valign="top">  
                                                <asp:CheckBoxList ID="cblLiable" runat="server" CssClass="bluetextbold" Width="110px">  
                                                    <asp:ListItem>Yes</asp:ListItem> 
                                                    <asp:ListItem>No</asp:ListItem> 
                                                    <asp:ListItem>Possibly</asp:ListItem> 
                                                </asp:CheckBoxList></td>  
                                            <td valign="top">  
                                                <asp:CheckBoxList ID="cblARStatus" runat="server" CssClass="bluetextbold" RepeatColumns="1" Width="118px">  
                                                    <asp:ListItem Value="2">Missing</asp:ListItem> 
                                                    <asp:ListItem Value="3">Pending</asp:ListItem> 
                                                    <asp:ListItem Value="6">Complete</asp:ListItem> 
                                                </asp:CheckBoxList></td>  
                                        </tr> 
                                    </table> 
                                </td> 
                                <td colspan="1" align="left">  
                                    <table style="width: 400px">  
                                        <tr> 
                                            <td> 
                                    <asp:Label ID="Label1" runat="server" CssClass="bluetextbold" Text="Original Ticket #:" 
                                        Width="100px"></asp:Label> 
                                    <asp:TextBox ID="txtOriginalTicket" runat="server"></asp:TextBox></td>  
                                        </tr> 
                                        <tr> 
                                            <td> 
                                    <asp:Label ID="Label4" runat="server" CssClass="bluetextbold" Text="Customer Invoice #:" 
                                        Width="117px"></asp:Label> 
                                    <asp:TextBox ID="txtCustInvoice" runat="server"></asp:TextBox></td>  
                                        </tr> 
                                        <tr> 
                                            <td> 
                                    <asp:Label ID="lblELMCheck" runat="server" CssClass="bluetextbold" Text="Check #"></asp:Label> 
                                    <asp:TextBox ID="txtCheckNum" runat="server"></asp:TextBox></td>  
                                        </tr> 
                                    </table> 
                                </td> 
                            </tr> 
                            <tr> 
                                <td align="center" colSpan="2"><ASP:LABEL id="LblSearchResults" RUNAT="server" CSSCLASS="bluetext"></ASP:LABEL></td>  
                            </tr> 
                        </table> 
                        <telerik:RadGrid ID="gridDamage" runat="server" AutoGenerateColumns="False" GridLines="None" 
                            Skin="Web20" AllowPaging="True" AllowSorting="True" OnItemCommand="gridDamage_ItemCommand" OnNeedDataSource="gridDamage_NeedDataSource">  
                            <ExportSettings> 
                                <Pdf FontType="Subset" PaperSize="Letter" /> 
                                <Excel Format="Html" /> 
                            </ExportSettings> 
                            <MasterTableView CommandItemDisplay="None" CurrentResetPageIndexAction="SetPageIndexToFirst" 
                                Dir="LTR" Frame="Border" TableLayout="Auto" PageSize="30">  
                                <EditFormSettings> 
                                    <EditColumn CurrentFilterFunction="NoFilter" FilterListOptions="VaryByDataType">  
                                    </EditColumn> 
                                </EditFormSettings> 
                                <Columns> 
                                    <telerik:GridBoundColumn CurrentFilterFunction="NoFilter" FilterListOptions="VaryByDataType" 
                                        ForceExtractValue="None" HeaderText="Damage Date" UniqueName="DamageDate" DataType="System.DateTime" DataField="DamageDate" DataFormatString="{0:MM/dd/yyyy}">  
                                    </telerik:GridBoundColumn> 
                                    <telerik:GridButtonColumn CurrentFilterFunction="NoFilter" FilterListOptions="VaryByDataType" 
                                        HeaderText="Damage" UniqueName="DamageNumber" DataTextField="OCLVerifyID" DataType="System.Int32" AutoPostBackOnFilter="True" CommandName="GetDetail" CommandArgument="OCLVerifyID">  
                                    </telerik:GridButtonColumn> 
                                    <telerik:GridBoundColumn CurrentFilterFunction="NoFilter" FilterListOptions="VaryByDataType" 
                                        ForceExtractValue="None" HeaderText="Ticket" UniqueName="TicketNumber" DataField="TicketNumber">  
                                    </telerik:GridBoundColumn> 
                                    <telerik:GridBoundColumn CurrentFilterFunction="NoFilter" FilterListOptions="VaryByDataType" 
                                        ForceExtractValue="None" HeaderText="Damage Address" UniqueName="DamageAddress" DataField="DamageAddress">  
                                    </telerik:GridBoundColumn> 
                                    <telerik:GridBoundColumn CurrentFilterFunction="NoFilter" FilterListOptions="VaryByDataType" 
                                        ForceExtractValue="None" HeaderText="City" UniqueName="City" DataField="DamageCity">  
                                    </telerik:GridBoundColumn> 
                                    <telerik:GridBoundColumn CurrentFilterFunction="NoFilter" FilterListOptions="VaryByDataType" 
                                        ForceExtractValue="None" HeaderText="State" UniqueName="State" DataField="DamageState">  
                                    </telerik:GridBoundColumn> 
                                    <telerik:GridBoundColumn CurrentFilterFunction="NoFilter" FilterListOptions="VaryByDataType" 
                                        ForceExtractValue="None" HeaderText="Utility" UniqueName="Utility" DataField="UtilityCompany">  
                                    </telerik:GridBoundColumn> 
                                    <telerik:GridBoundColumn CurrentFilterFunction="NoFilter" FilterListOptions="VaryByDataType" 
                                        ForceExtractValue="None" HeaderText="Line Size" UniqueName="LineSize" DataField="LineSize">  
                                    </telerik:GridBoundColumn> 
                                    <telerik:GridBoundColumn CurrentFilterFunction="NoFilter" FilterListOptions="VaryByDataType" 
                                        ForceExtractValue="None" HeaderText="Status" UniqueName="Status" DataField="Status">  
                                    </telerik:GridBoundColumn> 
                                    <telerik:GridBoundColumn CurrentFilterFunction="NoFilter" FilterListOptions="VaryByDataType" 
                                        ForceExtractValue="None" HeaderText="Liable" UniqueName="Liable" DataField="Liable">  
                                    </telerik:GridBoundColumn> 
                                    <telerik:GridBoundColumn CurrentFilterFunction="NoFilter" FilterListOptions="VaryByDataType" 
                                        ForceExtractValue="None" HeaderText="Locator" UniqueName="Locator" DataField="Locator">  
                                    </telerik:GridBoundColumn> 
                                    <telerik:GridBoundColumn CurrentFilterFunction="NoFilter" DataField="OCLVerifyID" 
                                        FilterListOptions="VaryByDataType" ForceExtractValue="None" HeaderText="OCLVerifyID" 
                                        UniqueName="OCLVerifyID" Visible="False">  
                                    </telerik:GridBoundColumn> 
                                </Columns> 
                                <ExpandCollapseColumn CurrentFilterFunction="NoFilter" FilterListOptions="VaryByDataType" 
                                    Resizable="False" Visible="False">  
                                    <HeaderStyle Width="20px" /> 
                                </ExpandCollapseColumn> 
                                <RowIndicatorColumn CurrentFilterFunction="NoFilter" FilterListOptions="VaryByDataType" 
                                    Visible="False">  
                                    <HeaderStyle Width="20px" /> 
                                </RowIndicatorColumn> 
                            </MasterTableView> 
                            <GroupPanel ID="GroupPanel" Style="width: 100%;">  
                            </GroupPanel> 
                            <ClientSettings EnablePostBackOnRowClick="True">  
                                <Selecting AllowRowSelect="True" /> 
                            </ClientSettings> 
                        </telerik:RadGrid><BR class="smalltext">  
                        <!-- End Main Page Content --></td>  
                </tr> 
            </table> 
        </form> 
        <layout:defaultfooter id="FooterControl" runat="server"></layout:defaultfooter> 
    </body> 
</HTML> 
 

Here is the code behind

using System;  
using System.Collections;  
using System.ComponentModel;  
using System.Data;  
using System.Drawing;  
using System.Web;  
using System.Web.SessionState;  
using System.Web.UI;  
using System.Web.UI.WebControls;  
using System.Web.UI.HtmlControls;  
using System.Configuration;  
using System.Xml;  
using ELM.TicketManagementSystem.bll;  
using Microsoft.Practices.EnterpriseLibrary.ExceptionHandling;  
using Telerik.Web.UI;  
 
namespace ELM.TicketManagementSystem  
{
    #region class DamageSearch  
    /// <summary>  
    /// Summary description for DamageSearch.  
    /// </summary>  
    public partial class DamageSearchForm : SecurePage  
    {
        #region declarations  
 
        // Privates  
 
        #endregion declarations
        #region Page_Load  
        protected void Page_Load(object sender, System.EventArgs e)  
        {  
          
            if(!(IsPostBack))  
            {  
                LoadDropDowns();  
                //this.gridDamage.Visible = false;  
 
                this.dateStart.SelectedDate = System.DateTime.Now.AddDays(-7);  
                this.dateEnd.SelectedDate = System.DateTime.Now;  
            }             
        }
        #endregion Page_Load  
 
        #region Web Form Designer generated code  
        override protected void OnInit(EventArgs e)  
        {  
            //  
            // CODEGEN: This call is required by the ASP.NET Web Form Designer.  
            //  
            InitializeComponent();  
            base.OnInit(e);  
        }  
          
        /// <summary>  
        /// Required method for Designer support - do not modify  
        /// the contents of this method with the code editor.  
        /// </summary>  
        private void InitializeComponent()  
        {      
 
        }
        #endregion  
 
        protected void btnSearch_Click(object sender, EventArgs e)  
        {  
 
            if (rbLocation.Checked == true)  
            {  
                //custom fields  
                DataSet dsSearch = new DataSet();  
 
                DateTime dStart = ELM.Common.Utility.SafeDate("1/01/1900");  
                DateTime dEnd = ELM.Common.Utility.SafeDate("1/01/1900");  
                string sLiable = "";  
                string sARStatus = "";  
                string sDamageStatus = "";  
                string sState = "";  
                string sLocator = "";  
 
                if (dateStart.SelectedDate != null)  
                {  
                    dStart = ELM.Common.Utility.SafeDate(dateStart.SelectedDate);  
                }  
                if (dateEnd.SelectedDate != null)  
                {  
                    dEnd = ELM.Common.Utility.SafeDate(dateEnd.SelectedDate);  
                }  
                if (ddlLocator.SelectedIndex >= 1)  
                {  
                    sLocator = ddlLocator.SelectedValue.ToString();  
                }  
                if (ddlState.SelectedIndex >= 1)  
                {  
                    sState = ddlState.SelectedValue.ToString();  
                }  
 
 
                foreach (ListItem item in cblARStatus.Items)  
                {  
                    if(item.Selected == true)  
                    {  
                        if (sARStatus != "")  
                        {  
                            sARStatus += ",";  
                        }  
                        sARStatus += item.Value.ToString();  
                    }  
                }  
                foreach (ListItem item in cblLiable.Items)  
                {  
                    if(item.Selected == true)  
                    {  
                        if (sLiable != "")  
                        {  
                            sLiable += ",";  
                        }  
                        sLiable += item.Value.ToString();  
                    }  
                }  
                foreach (ListItem item in cblStatus.Items)  
                {  
                    if(item.Selected == true)  
                    {  
                        if (sDamageStatus != "")  
                        {  
                            sDamageStatus += ",";  
                        }  
                        sDamageStatus += item.Value.ToString();  
                    }  
                }  
 
                dsSearch = DamageDetail.GetDamageSearchCustom(dStart, dEnd, txtDamageAddress.Text, txtCity.Text, sState, txtOriginalTicket.Text, sLocator, sLiable, txtCustInvoice.Text, sARStatus, sDamageStatus, txtCheckNum.Text, drpProfitCenters.SelectedValue, User.Identity.Name.ToString(),chkSearchAll.Checked);   
                if (dsSearch.Tables[0].Rows.Count == 0)  
                {  
                    this.LblSearchResults.Text = "No Results Found";  
                    this.LblSearchResults.Visible = true;  
                }  
                else 
                {  
                    this.LblSearchResults.Text = ELM.Common.Utility.SafeString(dsSearch.Tables[0].Rows.Count) + " Results Found";  
                    this.LblSearchResults.Visible = true;  
                    gridDamage.DataSource = dsSearch.Tables[0];  
                    gridDamage.DataBind();  
                }  
            }  
            if (rbDamage.Checked == true)  
            {  
                //damage number  
                DataSet dsSearch = new DataSet();  
                dsSearch = DamageDetail.GetDamageSearchByDamageNumber(ELM.Common.Utility.SafeInt(txtDamage.Text));  
                if (dsSearch.Tables[0].Rows.Count == 0)  
                {  
                    this.LblSearchResults.Text = "No Results Found";  
                    this.LblSearchResults.Visible = true;  
                }  
                else 
                {  
                    this.LblSearchResults.Text = ELM.Common.Utility.SafeString(dsSearch.Tables[0].Rows.Count) + " Results Found";  
                    this.LblSearchResults.Visible = true;  
                    gridDamage.DataSource = dsSearch.Tables[0];  
                    gridDamage.DataBind();  
                }  
            }  
 
        }  
 
        protected void btnNewDamage_Click(object sender, EventArgs e)  
        {  
            Session["oclVerifyID"] = "0";  
            Response.Redirect("DamageDetailEdit.aspx");  
        }  
 
        public void initDropDownLists()  
        {  
            // Instantiate Proxy  
            //userWS ws = new userWS();  
            //DataSet stateListDS = new DataSet();  
 
 
 
            //switch (SessionState.EmployeeIsWebAdmin)  
            //{  
            //    case 0:   // Get all states                                     
            //        stateListDS = ws.getState();  
            //        break;  
            //    default:  
            //        stateListDS = ws.getStateByEmployee(SessionState.CurrentEmployee.EmployeeID);  
            //        break;  
            //}  
            //ddStateList.DataSource = stateListDS.Tables["State"];  
            //ddStateList.DataValueField = stateListDS.Tables["State"].Columns["StateID"].ToString();  
            //ddStateList.DataTextField = stateListDS.Tables["State"].Columns["StateName"].ToString();  
            //ddStateList.DataBind();  
            //ddStateList.SelectedIndex = 0;  
 
            //ListItem defaultItem = new ListItem("  -- Select Profit Center --", "0");  
            //drpProfitCenters.Items.Add(defaultItem);  
            //drpProfitCenters.SelectedIndex = 0;  
        }  
 
        protected void gridDamage_ItemCommand(object source, Telerik.Web.UI.GridCommandEventArgs e)  
        {  
            if (e.CommandName == "GetDetail")  
            {  
                Session["oclVerifyID"] = (e.Item as GridDataItem)["OCLVerifyID"].Text;  
                Response.Redirect("DamageDetailEdit.aspx");  
            }  
        }  
 
        protected void gridDamage_NeedDataSource(object source, Telerik.Web.UI.GridNeedDataSourceEventArgs e)  
        {  
 
        }  
 
        private void LoadDropDowns()  
        {  
            // UtilityCompany  
            //UtilityCollection utilC = new UtilityCollection();  
            //utilC = Utility.GetUtilitiesActive(true);  
 
            CustomerCollection custC = new CustomerCollection();  
            custC = Customer.GetCustomers(true);  
 
              
            this.ddlUtility.DataSource = custC;  
            this.ddlUtility.AppendDataBoundItems = true;  
            ListItem li = new ListItem(" ", "-1");  
            this.ddlUtility.Items.Add(li);  
            this.ddlUtility.DataTextField = "CustomerName";  
            this.ddlUtility.DataValueField = "CustomerID";  
            this.ddlUtility.DataBind();  
            this.ddlUtility.SelectedValue = "-1";  
 
            // State  
            StateCollection stateC = new StateCollection();  
            stateC = State.GetStates();  
 
            this.ddlState.DataSource = stateC;  
            this.ddlState.AppendDataBoundItems = true;  
            this.ddlState.Items.Add(li);  
            this.ddlState.DataTextField = "StateCode";  
            this.ddlState.DataValueField = "StateCode";  
            this.ddlState.DataBind();  
            this.ddlState.SelectedValue = "-1";  
 
            // NavState  
            StateCollection navstateC = new StateCollection();  
            navstateC = State.GetStates();  
 
            this.ddStateList.DataSource = navstateC;  
            this.ddStateList.AppendDataBoundItems = true;  
            this.ddStateList.Items.Add(li);  
            this.ddStateList.DataTextField = "StateCode";  
            this.ddStateList.DataValueField = "StateCode";  
            this.ddStateList.DataBind();  
            this.ddStateList.SelectedValue = "-1";  
 
 
            // Locator  
            DataSet dsE = new DataSet();  
            dsE = Employee.GetEmployeesActive();  
 
            this.ddlLocator.DataSource = dsE.Tables[0];  
            this.ddlLocator.AppendDataBoundItems = true;  
            this.ddlLocator.Items.Add(li);  
            this.ddlLocator.DataTextField = "EmployeeName";  
            this.ddlLocator.DataValueField = "EmployeeID";  
            this.ddlLocator.DataBind();  
            this.ddlLocator.SelectedValue = "-1";  
 
        }  
 
        protected void ddStateList_SelectedIndexChanged(object sender, EventArgs e)  
        {  
            // NavProfitCenter  
            ProfitCenterCollection pcC = new ProfitCenterCollection();  
            pcC = ProfitCenter.GetProfitCentersByState(ELM.Common.Utility.SafeInt(ddStateList.SelectedValue));  
            this.drpProfitCenters.DataSource = pcC;  
            this.drpProfitCenters.DataTextField = "ProfitCenterShortDesc";  
            this.drpProfitCenters.DataValueField = "ProfitCenterID";  
            this.drpProfitCenters.DataBind();  
            this.drpProfitCenters.Visible = true;  
        }  
 
        protected void rbLocation_CheckedChanged(object sender, EventArgs e)  
        {  
            if (this.rbLocation.Checked == true)  
            {  
                chkSearchAll.Enabled = true;  
                chkSearchAll.Checked = true;  
                ddStateList.Enabled = false;  
                drpProfitCenters.Visible = false;  
                ddStateList.SelectedIndex = -1;  
                drpProfitCenters.SelectedIndex = -1;  
                txtDamage.Text = "";  
                txtDamage.Visible = false;  
            }  
            else 
            {  
                chkSearchAll.Enabled = false;  
                ddStateList.Enabled = false;  
                drpProfitCenters.Enabled = false;  
            }  
        }  
 
        protected void rbDamage_CheckedChanged(object sender, EventArgs e)  
        {  
            if (this.rbDamage.Checked == true)  
            {  
                chkSearchAll.Enabled = false;  
                ddStateList.Enabled = false;  
                ddStateList.SelectedIndex = -1;  
                drpProfitCenters.Enabled = false;  
                drpProfitCenters.SelectedIndex = -1;  
                drpProfitCenters.Visible = false;  
                //txtDamage.Enabled = true;  
                txtDamage.Visible = true;  
                txtDamage.Text = "";  
            }  
            else 
            {  
                //txtDamage.Enabled = false;  
                txtDamage.Text = "";  
                txtDamage.Visible = false;  
            }  
        }  
 
        protected void chkSearchAll_CheckedChanged(object sender, EventArgs e)  
        {  
            if (this.chkSearchAll.Checked == true)  
            {  
                ddStateList.Enabled = false;  
                drpProfitCenters.Visible = false;  
                ddStateList.SelectedIndex = -1;  
                drpProfitCenters.SelectedIndex = -1;  
            }  
            else 
            {  
                ddStateList.Enabled = true;  
            }  
        } 

 

Doug Odegaard
Top achievements
Rank 2
 answered on 22 Feb 2008
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?