Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
474 views
I am trying to run this tooltip on hover of a grid cell.  The data for the tooltip is in a user control (ascx).  I am banging my head because I keep getting a client side error Sys.WebForms.PageRequestManagerParserErrorException
<%@ Page Title="" Language="C#"  MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="KioskList.aspx.cs" Inherits="PAMRewrite.KioskList" %>
<%@ Register Src="PAMStats.ascx" TagName="PAMStats" TagPrefix="uc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <div id="pagecontent" class="well">   
        <uc1:PAMStats ID="PAMStats1" runat="server" Visible="false" />   
        <h3 runat="server" id="h1">Kiosk List</h3>      
        <asp:UpdatePanel runat="server" ID="updaPnlKioskList" UpdateMode="Conditional" Visible="true">
            <ContentTemplate>   
                <telerik:RadCodeBlock runat="server" ID="rdbScripts">
                    <script type="text/javascript">
                        function openRadWin(URL) {
                            var width = 1000;
                            var height = 800;
                            var left = 600;
                            var top = 100;
                            var wnd = radopen(URL, null, width, height, left, top);
                            wnd.add_close(OnClientClose);
                        }
 
                        function OnClientClose(sender, args) {
                            window.location.reload(true);
                        }          
                    </script>
                </telerik:RadCodeBlock>
                <telerik:RadAjaxPanel runat="server">                   
                    <telerik:RadWindowManager ID="RadWindowManager1" runat="server" EnableShadow="true"
                        Top="100" Left="600" Height="800" Width="1000" >                       
                          <Windows>                              
                               <telerik:RadWindow ID="RadWindow1" runat="server" ShowContentDuringLoad="false" Style="z-index: 8000" Title="CAO" Behaviors="Default" >
                               </telerik:RadWindow>
                          </Windows>
                     </telerik:RadWindowManager>
                </telerik:RadAjaxPanel>
                <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
                      <AjaxSettings>
                           <telerik:AjaxSetting AjaxControlID="RadWindowManager1">
                           </telerik:AjaxSetting>
                           <telerik:AjaxSetting AjaxControlID="gvKiosk">
                                <UpdatedControls>                                   
                                    <telerik:AjaxUpdatedControl ControlID="gvKiosk" LoadingPanelID="RadAjaxLoadingPanel1">
                                    </telerik:AjaxUpdatedControl>
                                    <telerik:AjaxUpdatedControl ControlID="RadToolTipManager1"></telerik:AjaxUpdatedControl>
                                </UpdatedControls>
                           </telerik:AjaxSetting>
                      </AjaxSettings>
                </telerik:RadAjaxManager
                <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server">
                </telerik:RadAjaxLoadingPanel>
                <telerik:RadToolTipManager ID="RadToolTipManager1" OffsetY="-1" HideEvent="Default" AutoCloseDelay="7000"
                      Width="325" Height="275" runat="server" OnAjaxUpdate="OnAjaxUpdate" RelativeTo="Element"
                      Position="MiddleRight">
                </telerik:RadToolTipManager>                            
                <p>This list contains Pre-Accounts that were created using the CAO Kiosk.  The Signup Step shows the current status of the Pre-Account</p>                          
                <asp:UpdatePanel runat="server" ID="upReadyToAssignSearch" UpdateMode="Conditional">
                    <ContentTemplate>
                        <telerik:RadGrid ID="gvKiosk" runat="server"
                            AutoGenerateColumns="False"
                            AllowPaging="True"
                            AllowSorting="True"
                            GridLines="None"
                            CellSpacing="0"
                            OnItemDataBound="gvKiosk_ItemDataBound"                   
                            OnItemCommand="gvKiosk_ItemCommand">                                                           
                            <SortingSettings EnableSkinSortStyles="false"></SortingSettings>
                            <GroupingSettings CaseSensitive="false" />
                            <MasterTableView DataKeyNames="Profile_ID" NoMasterRecordsText="There are no Kiosk records.">                    
                            <PagerStyle Mode="NextPrevAndNumeric" AlwaysVisible="True"></PagerStyle>                                                           
                                <Columns>
                                    <telerik:GridBoundColumn DataField="PROFILE_ID" Display="false"
                                        FilterControlAltText="Filter profileid column" HeaderText="Profile ID"
                                        UniqueName="customername">
                                    </telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn DataField="CUSTOMERNAME"
                                        FilterControlAltText="Filter customername column" HeaderText="Customer Name"
                                        UniqueName="customername">
                                    </telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn DataField="EMAIL_ADDRESS"
                                        FilterControlAltText="Filter customername column" HeaderText="Email Address"
                                        UniqueName="emailaddress">
                                    </telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn DataField="DRIVERS_LICENSE_NO"
                                        FilterControlAltText="Filter customername column" HeaderText="DL#"
                                        UniqueName="driverslicenseno">
                                    </telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn DataField="BILLING_ZIP"
                                        FilterControlAltText="Filter zipcode column" HeaderText="Zip Code"
                                        UniqueName="zipcode">
                                    </telerik:GridBoundColumn
                                    <telerik:GridTemplateColumn HeaderText="Details" SortExpression="Details">
                                         <ItemTemplate>
                                              <asp:HyperLink ID="targetControl" runat="server" NavigateUrl="#" Text="Details"></asp:HyperLink>
                                         </ItemTemplate>
                                    </telerik:GridTemplateColumn>                                                              
                                    <telerik:GridTemplateColumn AllowFiltering="false"
                                        HeaderText="Details" UniqueName="DetailsColumn">
                                        <ItemTemplate>
                                            <asp:LinkButton runat="server" ID="lnkGotoAccount" Text="Go To Account"
                                                CommandName="GoToAccount"></asp:LinkButton>
                                              |  
                                            <asp:LinkButton runat="server" ID="lnkCheckIn" Text="Check In"
                                                 CommandName="CheckIn" Visible="false"></asp:LinkButton>
                                            <asp:Label ID="lblProfileID" runat="server" Visible="false" Text='<%#Eval("PROFILE_ID") %>' />
                                            <asp:Label ID="lblBillingZip" runat="server" Visible="false" Text='<%#Eval("BILLING_ZIP") %>' />
                                            <asp:Label ID="lblSignupStep" runat="server" Visible="false" Text='<%#Eval("ACCOUNT_STATUS_DESC") %>' />
                                            <asp:Label ID="lblPreAccountNo" runat="server" Visible="false" Text='<%#Eval("PRE_ACCOUNT_NO") %>' />
                                        </ItemTemplate>
                                    </telerik:GridTemplateColumn>                           
                                    <telerik:GridBoundColumn DataField="UserName"
                                        FilterControlAltText="Filter customername column" HeaderText="Checked Out By"
                                        UniqueName="UserName">
                                    </telerik:GridBoundColumn>        
                                </Columns>
                            </MasterTableView>
                            <EditItemStyle BorderWidth="5px" />
                        </telerik:RadGrid>                                     
                    </ContentTemplate>
                </asp:UpdatePanel>
            </ContentTemplate>
        </asp:UpdatePanel>
    </div>
</asp:Content>

using System;
using System.Data;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using PAMRewrite.PAMBiz;
using Telerik.Web.UI;
 
namespace PAMRewrite
{
    public partial class KioskList : BasePage
    {
        protected void OnAjaxUpdate(object sender, ToolTipUpdateEventArgs args)
        {
            this.UpdateToolTip(args.Value, args.UpdatePanel);
        }
        private void UpdateToolTip(string elementID, UpdatePanel panel)
        {
            Control ctrl = Page.LoadControl("HoverDetail.ascx");
            ctrl.ID = "ucCustomerDetails1";
            panel.ContentTemplateContainer.Controls.Add(ctrl);
            HoverDetail details = (HoverDetail)ctrl;
            details.profileID = Convert.ToInt32(elementID);
        }
 
        protected void Page_Load(object sender, EventArgs e)
        {           
            string CheckAuth = (string)Session["Authenticated"];
 
            if ((CheckAuth == null) || (CheckAuth == "FALSE"))
            {
                Response.Redirect("Default.aspx", true);
                HttpContext.Current.ApplicationInstance.CompleteRequest();
            }
            else
            {
                //  Make sure that UserType is authenticated
                if ((Convert.ToInt32(Session["UserType"]) == Convert.ToInt32(cEnums.eUserType.EXTADMIN)) ||
                        (Convert.ToInt32(Session["UserType"]) == Convert.ToInt32(cEnums.eUserType.EXTUSER)))
                {
                    Response.Redirect("MainMenu.aspx", false);
                    HttpContext.Current.ApplicationInstance.CompleteRequest();
                }
 
                Session["Error"] = "FALSE";
 
                if (!IsPostBack)
                {
                    FillKioskListGrid();
                    Response.Cache.SetCacheability(HttpCacheability.NoCache);
                    Response.Cache.SetAllowResponseInBrowserHistory(false);
                }
                else
                {
                    //GridView does not keep its items' IDs after postback, so rebind it or else tooltip manager will not show tooltips
                    FillKioskListGrid();
                }
 
                // For Stats
                if (Session["UserType"] != null)
                {
                    if ((Int32)Session["UserType"] == Convert.ToInt32(cEnums.eUserType.SUPERADMIN) || (Int32)Session["UserType"] == Convert.ToInt32(cEnums.eUserType.INTADMIN))
                    {
                        PAMStats1.Visible = true;
                        RadPanelBar pnlBarStats = (RadPanelBar)PAMStats1.FindControl("pnlBarStats");
                        RadTabStrip tsStats = (RadTabStrip)pnlBarStats.FindItemByValue("Statistics").FindControl("RadTabstrip1");
                        RadTab tab1 = tsStats.Tabs.FindTabByText("CAO Statistics");
                        tab1.Selected = true;
                    }
                }
            }
        }
 
        //<!-- Begin Table Location Info -->
        private void FillKioskListGrid()
        {
            KioskInformation kioskInfo = new KioskInformation();
            Int32 locationCodeID = Convert.ToInt32(Session["LocationCodeID"]);
            using (DataSet dsKiosks = kioskInfo.GetExistingKioskList(locationCodeID))
            {
                dsKiosks.Tables[0].DefaultView.Sort = "CUSTOMERNAME ASC";
                gvKiosk.DataSource = dsKiosks.Tables[0].DefaultView;
                gvKiosk.DataBind();
            }
        }
 
        protected void gvKiosk_ItemDataBound(object sender, GridItemEventArgs e)
        {
            if (e.Item is GridDataItem) //to access a row
            {
                string loginUser = Session["User"].ToString();
                LinkButton lnkCheckIn = (LinkButton)e.Item.FindControl("lnkCheckIn");
                DataRowView row = (DataRowView)e.Item.DataItem;                               
                string profileID = row["PROFILE_ID"].ToString();
                if (!string.IsNullOrEmpty(row["USERNAME"].ToString()))
                {
                    LinkButton lnkGotoAccount = (LinkButton)e.Item.FindControl("lnkGotoAccount");
 
                    if (loginUser.ToUpper() == (row["USERNAME"].ToString().ToUpper()))
                    {
                        lnkCheckIn.Visible = true;
                    }
                    else
                    {
                        lnkGotoAccount.Visible = false;
                    }
 
                    //If Current User Type is Super Admin then Check in Button is Visiable.
                    if (Convert.ToInt32(Session["UserType"]) == Convert.ToInt32(cEnums.eUserType.SUPERADMIN) || Convert.ToInt32(Session["UserType"]) == Convert.ToInt32(cEnums.eUserType.INTADMIN))
                    {
                        lnkCheckIn.Visible = true;
                    }
                }
 
                if (e.Item.ItemType == GridItemType.Item || e.Item.ItemType == GridItemType.AlternatingItem)
                {
                    Control target = e.Item.FindControl("targetControl");
                    if (!Object.Equals(target, null))
                    {
                        if (!Object.Equals(this.RadToolTipManager1, null))
                        {
                            //Add the button (target) id to the tooltip manager
                            this.RadToolTipManager1.TargetControls.Add(target.ClientID, (e.Item as GridDataItem).GetDataKeyValue("Profile_ID").ToString(), true);
 
                        }
                    }
                }
            }
        }
 
        //<!-- End Table Location Info -->  
 
        protected void gvKiosk_ItemCommand(object sender, GridCommandEventArgs e)
        {
            if (e.CommandName == "GoToAccount")
            {
                GridDataItem item = e.Item as GridDataItem;
 
                string domainURL = Common.GetConfigurationSetting("PAMDomainUrl");
                string caoUrl = domainURL.ToString() + Common.GetConfigurationSetting("CAOLoginURL");
                string emailAddress = item["emailaddress"].Text;               
                string dlNumber = item["driverslicenseno"].Text;               
                Label lblBillingZip = (Label)item.FindControl("lblBillingZip");
                string billingZip = lblBillingZip.Text.ToString();
                string url = caoUrl + "?email=" + emailAddress + "&dl=" + dlNumber + "&ac=" + billingZip;
 
                string scriptstring = "openRadWin('" + url + "');";
 
                // In order for this functionality to work you have to follow these steps.  Click on the "Go To Account" link.
                // You will see a window open and it should populate the username and other information automatically and log you
                // into CAO.  When you are finished working in CAO you MUST log out of CAO.
 
                ScriptManager.RegisterStartupScript(Page, Page.GetType(), "radScript", scriptstring, true);
 
 
                Label lblProfileID = (Label)item.FindControl("lblProfileID");
                Int32 profileID = Convert.ToInt32(lblProfileID.Text.ToString());
                Int32 userID = Convert.ToInt32(Session["UserID"].ToString());
 
                try
                {
                    KioskInformation kioskInfo = new KioskInformation();
                    kioskInfo.UpdateCheckOutStatus(profileID, userID);
 
                    Label lblSignup = (Label)item.FindControl("lblSignupStep");
                    string status = lblSignup.Text;
 
                    if (status == "PAYMENT APPLIED TO ACCOUNT")
                    {
                        Label lblPreAcctNo = (Label)item.FindControl("lblPreAccountNo");
                        Session["From"] = "Kiosk";          //HARD_CODED - we are coming from Kiosk
                        Session["PreAccountNo"] = lblPreAcctNo.Text;
                        Session["ProfileID"] = profileID;
                        Response.Redirect("CAOAssignTags.aspx", false);
                        HttpContext.Current.ApplicationInstance.CompleteRequest();
                    }
                    FillKioskListGrid();
                   HttpResponse.RemoveOutputCacheItem("/KioskList.aspx");
                }
                catch (Exception ex)
                {
                    //If ReturnCode Return -990 means Needs to Refresh screen some one check out
                    if (!(ex.Message.Contains("-990") || ex.Message.Contains("-991")))
                    {
                        ScriptManager.RegisterStartupScript(Page, Page.GetType(), "ss", "<script>alert('The tag request is currently checked out to another user.');</script>", false);
                    }
                    else
                    {
                        ErrorLogging logging = new ErrorLogging();
                        logging.callingPage = Request.Url.ToString();
                        logging.callingMethod = System.Reflection.MethodBase.GetCurrentMethod().Name;
                        ErrorLogging.LogError(ex, logging);
                    }
                }
            }
            else if (e.CommandName == "CheckIn")
            {
                GridDataItem item = e.Item as GridDataItem;
 
                Label lblProfileID = (Label)item.FindControl("lblProfileID");
                Int32 profileID = Convert.ToInt32(lblProfileID.Text.ToString());
                CAOInformation.UpdateCheckInStatus(profileID);
                FillKioskListGrid();
            }
            else if (e.CommandName == "Sort" || e.CommandName == "Page")
            {
                RadToolTipManager1.TargetControls.Clear();
            }
        }
    }
}
Please help me!

Thanks,
Steve
Marin Bratanov
Telerik team
 answered on 19 Dec 2014
4 answers
273 views

Having setup my Autocompletebox properly and returning values, I now need to take the DataValueField and update the database when they click the update button.  However in my code-behind I am unable to reference the selectedvalue. 

<telerik:RadAutoCompleteBox ID="radEmailUser" runat="server"
    DataSourceID="SqlDataSource1"  DataTextField="Contact_Email"
    DataValueField="EmailListID" Filter="StartsWith" InputType="Text"
    Width="300px" DropDownWidth="300px" TextSettings-SelectionMode="Single">
    <DropDownItemTemplate>
    <table><tr><td>
        <%# DataBinder.Eval(Container.DataItem, "contact_Email")%> (
        <%# DataBinder.Eval(Container.DataItem, "first_name")%>  
        <%# DataBinder.Eval(Container.DataItem, "last_name")%>)
        </td></tr></table>
    </DropDownItemTemplate>
</telerik:RadAutoCompleteBox>

I would like to get the value (EmailListID) that is selected and pass that onto a stored procedure for updating.  Unable to properly reference the value.  How can I get the value?

Kurt Kluth
Top achievements
Rank 1
 answered on 19 Dec 2014
5 answers
152 views
Hello. I'm having an issue with the tooltip staying with its target control. There is some JS code that displays some hidden table cells that are above the target control for the tooltip & when this happens, the tooltip doesn't move with the target control. Below is the markup for the tooltip. Any help would be greatly appreciated.

<asp:TableRow>
    <asp:TableCell HorizontalAlign="right" Text="Product"></asp:TableCell>
    <asp:TableCell>
        <table>
            <tr>
                <td>
                    <asp:Label ID="Product" runat="server" CssClass="FieldValue"></asp:Label
                </td>
                <td>
                    <span id="ProductMaintenanceSpan" runat="server" style="display:none; vertical-align:middle ">
                        <telerik:RadToolTip OnClientBeforeHide="OnClientBeforeHide"  ID="ProductToolTip" HideEvent="FromCode" Position="MiddleRight" style="z-index: -1;" TargetControlID ="ProductImage" runat="server" Text="Cancelled maintenance. Requires a PO for hourly work." RelativeTo="Element"></telerik:RadToolTip>
                        <asp:Image ID="ProductImage" ImageUrl="~/images/Info.gif" runat="server" style="cursor:pointer; vertical-align:middle" ImageAlign="TextTop"/>
                    </span>
                </td>
            </tr>
        </table>                                    
    </asp:TableCell>
</asp:TableRow>
Marin Bratanov
Telerik team
 answered on 19 Dec 2014
1 answer
110 views
I have a client that uses the radeditor with the hyperlink manager. Is there a way to have the url field not have http:// as the default text?   The thing is that the users do not highlight the the prefix to override it when pasting a url. Instead they add to it and it becomes http://http://<someurl>.
Ianko
Telerik team
 answered on 19 Dec 2014
4 answers
125 views
Hi,

I am using RadClientDatasource for Radgrid. i am created WCF page for retrieving data. but while adding WCF page name into Base URL getting request failed message. please check the attachment. please let me know do we need to configure anything. please help me ASAP
Dhamodharan
Top achievements
Rank 1
 answered on 19 Dec 2014
3 answers
95 views
Currently I am allowing the users to save a template which stores the data/state of the search parameters. I have a few queries that have around 50 parameters. I have made custom code to save the text out of a textbox, check state in checkboxes, selected radiobuttons, check boxes in a telerik dropdown, date in telerik datebox, checkboxes in telerik treeviews and save the text in a database per user per query page. I have almost ever telerik control and generic .net controls.

When the user names the template and save button it also saves the state of the radgrid. he users can then select a template and click the load button and the code prepopulates all the search parameter fields and sets the grid up as is was saved.

I have played with the persistence framework and have not figured out if it is possible to save generic .net controls. I cannot find any sample code if it is possible. I have seen other component libraries do this.

Am I just missing something...
Kevin
Viktor Tachev
Telerik team
 answered on 19 Dec 2014
3 answers
290 views
I am using the Telerik RadEditor and am seeing some strange behavior with the Image Manager window, shown in the attached image.  The tabs such as SiteCopy, Body Setup, Header Setup, etc. are all from the page that should be behind the window, yet they are somehow showing through. Clicking and dragging the window to another location on the screen fixes that issue, however, the window cannot be closed using either the X or Cancel. This only seems to happen in Chrome when I am zoomed in a bit on the page. Is this a bug with the Image Manager or is there something that can be done to prevent this behavior?
Thanks
Ianko
Telerik team
 answered on 19 Dec 2014
1 answer
50 views
Hello,

My item template text is disabled and I can't see any template inside it?


What should I do?

Thanks,
Saeed
Nencho
Telerik team
 answered on 19 Dec 2014
4 answers
403 views

I have Rad Tabstrip and Rad Multipage controls in my aspx page.
I am trying to load another aspx page to one pageview within Rad multipage.The problem is that I am getting scrollbars, both horizontal and vertical when I try to load the page within partiuclar pageview.I set the property ScrollBars="None" in Radmultipage. But that doesnt really help. Can someone suggest a work around to achive this.I don't need the scrollbars and page has to extend automaticcaly when the page in content url expands.

<telerik:RadTabStrip ID="RadTabStrip1" runat="server" Skin="" 
MultiPageID="RadMultiPage1"<BR>                
SelectedIndex="0" 
CssClass="tabStrip"><BR>                
<Tabs><BR>                    
<telerik:RadTab Text="Case" 
PageViewID="RadPageView1"><BR>                    
</telerik:RadTab><BR>                    
<telerik:RadTab Text="Parties" 
PageViewID="RadPageView2"><BR>                        
<Tabs><BR>                            
<telerik:RadTab Text="Parties1" Selected="true" 
PageViewID="RadPageView2"></telerik:RadTab><BR>                            
<telerik:RadTab Text="Add\Modify Party" 
PageViewID="RadPageView4"></telerik:RadTab><BR>                        
</Tabs><BR>                    
</telerik:RadTab><BR>                
</Tabs><BR>        
</telerik:RadTabStrip><BR>        
<telerik:RadMultiPage ID="RadMultiPage1" runat="server" SelectedIndex="0" 
CssClass="multiPage" 
ScrollBars="None"><BR>     
<telerik:RadPageView ID="RadPageView1" runat="server">
some content here....
</telerik:RadPageView>
<telerik:RadPageView ID="RadPageView2" runat="server" 
ContentUrl="PartyDetails.aspx"></telerik:RadPageView><BR>            
<telerik:RadPageView ID="RadPageView4" runat="server" Height="300px"  
ContentUrl="AddModifyParty.aspx"></telerik:RadPageView><BR>        
</telerik:RadMultiPage>
Nencho
Telerik team
 answered on 19 Dec 2014
3 answers
109 views
Hi,

We are using Telerik RadControls for ASP.NET Ajax version 2013.3.1114.45.
I have a label in the raddock and the size of the label can be varied.
It may have just one line of text and 20 lines of text (not known until it is displayed).

I have been using the below client side code to display the raddock currently.
But the raddock goes beyond the bottom of IE now as the label has more lines of text.

var dock = $find('<%= RejectRadDock.ClientID%>');
dock.set_left((document.body.clientWidth - parseInt(dock.get_width())) / 2);
dock.set_top(document.body.clientHeight - 220);

How to display the raddock where the bottom of the raddock is fixed and 
the top can be grown as the label text grows ?


Thanks
Bhanu.

Danail Vasilev
Telerik team
 answered on 19 Dec 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?