Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
162 views
I've encountered another development issue, which I believe is AJAX-related.  I've several controls (views) that are loaded into a multipage upon page Load.  These controls are navigated via tabs in a tabstrip.  Each view is divided into two parts via ASP update panels:

1. A toolbar (Toolbar_AjaxPanel)
2. Content affected by the toolbar, which contain a series of web user controls  (Content_AjaxPanel)

One of these web user controls is a catalog that lists programs.  A program in the list can be selected, and this raises the OnCatalogItemSelected event, a custom event which is triggered by the OnSelectedIndexChanged event of the RadGrid within the catalog web user control.  The OnCatalogItemSelected event runs a few checks and sets some visibility settings before updating the content panel via Content_AjaxPanel.Update().

Everything appears to work as expected until I click a tab and switch to a different "view."  When I do, I receive this client-side error:

Error: Unable to get value of the property 'paste': object is null or undefined

The application does not appear to be adversely affected, otherwise, but this error might confuse users.  From what I can tell, it's the Update() call in the OnCatalogItemSelected event that causes this to happen.  When I remove or comment it out, I no longer receive the message, but I need that Update() call to refresh the content and display the appropriate controls.

Here is the code that handles the OnCatalogItemSelected in the ProgramView.ascx view:
protected void Program_Catalog_OnCatalogItemSelected(object sender, ProgramManagement.Controls.ProgramCatalog.CatalogItemSelectedEventArgs e)
        {
            HtmlControl catalogContainer = CatalogContainer_Panel;
            HtmlControl catalogItemContainer = CatalogItemContainer_Panel;
             
            int selectedId = Program_Catalog.SelectedProgramID;
 
            if (!e.IsFullPlan)
            {
                Program_ProgramManager.ViewMode = ProgramManagement.Controls.ProgramManager.View.Quick;
                Program_OutcomeManager.Visible = true;
                Program_OrganizerManager.Visible = true;
                Program_AudienceManager.Visible = false;
                Program_BudgetManager.Visible = false;
            }
            else
 
            {
                Program_ProgramManager.ViewMode = ProgramManagement.Controls.ProgramManager.View.Full;
                Program_OutcomeManager.Visible = true;
                Program_OrganizerManager.Visible = true;
                Program_AudienceManager.Visible = true;
                Program_BudgetManager.Visible = true;
            }
             
            Program_ProgramManager.Select(selectedId);
            Program_AudienceManager.Select(selectedId);
            Program_OutcomeManager.Select(selectedId);
            Program_OrganizerManager.Select(selectedId);
            Program_BudgetManager.Select(selectedId);
             
            //Indicate that an item has been selected.
            ItemSelected = true;
 
            catalogContainer.Style["display"] = "none";
            catalogItemContainer.Style["display"] = "block";
 
            //Update the program content ajax panel
            Content_AjaxPanel.Update();
        }

And if you need it, here is the interface markup:
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="ProgramView.ascx.cs" Inherits="AZ.SA.RL.App.ProgramManagement.ProgramView" %>
<%@ Register Src="~/Controls/ProgramCatalog.ascx" TagName="ProgramCatalog" TagPrefix="pm"  %>
<%@ Register Src="~/Controls/ProgramManager.ascx" TagName="ProgramManager" TagPrefix="pm" %>
<%@ Register Src="~/Controls/OrganizerManager.ascx" TagName="OrganizerManager" TagPrefix="pm" %>
<%@ Register Src="~/Controls/AudienceManager.ascx" TagName="AudienceManager" TagPrefix="pm" %>
<%@ Register Src="~/Controls/OutcomeManager.ascx" TagName="OutcomeManager" TagPrefix="pm"  %>
<%@ Register Src="~/Controls/BudgetManager.ascx" TagName="BudgetManager" TagPrefix="pm"  %>
 
<telerik:RadScriptBlock ID="ProgramControlScripts" runat="server">
<script language="javascript" type="text/javascript">
 
    var programToolbar;
    var programCatalogButton;
    var programNewButton;
    var programQuickButton;
    var programFullButton;
    var programSeperator1;
    var programQuickButton;
    var programFullButton;
    var programEvalButton;
    var programSeperator2;
    var programEditButton;
    var programCancelButton;
    var programSaveButton;
 
    function Program_OnClientLoad(sender, args) {
        programToolbar = sender;
        programCatalogButton = programToolbar.findButtonByCommandName("CATALOG");
        programNewButton = programToolbar.findItemByText("New Program");
        programQuickButton = programToolbar.findItemByValue("Quick");
        programFullButton = programToolbar.findItemByValue("Full");
        programSeperator1 = programToolbar.findItemByValue("Sep1");
        programQuickButton = programToolbar.findButtonByCommandName("QUICK");
        programFullButton = programToolbar.findButtonByCommandName("FULL");
        programEvalButton = programToolbar.findButtonByCommandName("EVAL");
        programSeperator2 = programToolbar.findItemByValue("Sep2");
        programEditButton = programToolbar.findButtonByCommandName("EDIT");
        programCancelButton = programToolbar.findButtonByCommandName("CANCEL");
        programSaveButton = programToolbar.findButtonByCommandName("SAVE");
    }
 
    function Program_OnClientButtonClicking(sender, args) {
        var programButton = args.get_item();
        var programCommand = programButton.get_commandName();
 
        if (programCommand == "CANCEL") {
            args.set_cancel(!confirm('Are you sure you want to discard any changes?'));
        }
    }
 
    function Program_OnClientButtonClicked(sender, args) {       
        var programButton = args.get_item();
        var programCommand = programButton.get_commandName();
 
        var programCatalogContainer = $('div[name="catalogContainer"]')
        var programCatalogItemContainer = $('div[name="catalogItemContainer"]')
 
        switch (programCommand) {
            case "CATALOG":
 
                if (programCatalogButton != null) {
                    programCatalogButton.set_visible(false);
                }
                if (programNewButton != null) {
                    programNewButton.set_visible(true);
                }
                if (programSeperator1 != null) {
                    programSeperator1.set_visible(false);
                }
                if (programQuickButton != null) {
                    programQuickButton.set_visible(false);
                }
                if (programFullButton != null) {
                    programFullButton.set_visible(false);
                }
                if (programEvalButton != null) {
                    programEvalButton.set_visible(false);
                }
                if (programSeperator2 != null) {
                    programSeperator2.set_visible(false);
                }
                if (programEditButton != null) {
                    programEditButton.set_visible(false);
                }
                if (programCancelButton != null) {
                    programCancelButton.set_visible(false);
                }
                if (programSaveButton != null) {
                    programSaveButton.set_visible(false);
                }
 
                programCatalogContainer.fadeIn(500);
                programCatalogContainer.css("display", "block");
                programCatalogItemContainer.css("display", "none");
                break;
        }       
    }
 
    function Program_OnCatalogItemClicked(sender, args) {
        var programCatalogContainer = $('div[name="catalogContainer"]');
        var programCatalogItemContainer = $('div[name="catalogItemContainer"]');
         
        if (programCatalogButton != null) {
            programCatalogButton.set_visible(true);
        }
        if (programNewButton != null) {
            programNewButton.set_visible(false);
        }
        if (programSeperator1 != null) {
            programSeperator1.set_visible(true);
        }
        if (programQuickButton != null) {
            programQuickButton.set_visible(true);
        }
        if (programFullButton != null) {
            programFullButton.set_visible(true);
        }
        if (programEvalButton != null) {
            programEvalButton.set_visible(true);
        }
        if (programSeperator2 != null) {
            programSeperator2.set_visible(true);
        }
        if (programEditButton != null) {
            programEditButton.set_visible(true);
        }
        if (programCancelButton != null) {
            programCancelButton.set_visible(false);
        }
        if (programSaveButton != null) {
            programSaveButton.set_visible(false);
        }
 
        programCatalogContainer.slideUp(500);
        programCatalogItemContainer.fadeIn(600).delay(800);
        programCatalogItemContainer.css("display", "block");
    }
</script>
</telerik:RadScriptBlock>
 
<telerik:RadAjaxManagerProxy ID="Program_AjaxManager" runat="server" />
 
<asp:UpdatePanel ID="Toolbar_AjaxPanel" runat="server" UpdateMode="Conditional">
<ContentTemplate>
    <telerik:RadToolBar ID="Program_Toolbar"
        runat="server"
        Skin="Black"
        OnClientButtonClicking="Program_OnClientButtonClicking"
        OnClientButtonClicked="Program_OnClientButtonClicked"
        OnButtonClick="Program_ToolBar_ButtonClick"   
        OnClientLoad="Program_OnClientLoad"
        BorderStyle="None"
        BorderWidth="0"
        Width="100%">
        <Items>
            <telerik:RadToolBarButton Text="View Catalog" Value="Catalog" CommandName="CATALOG" PostBack="false" />
            <telerik:RadToolBarDropDown Text="New Program" DropDownWidth="150px">
                <Buttons>
                    <telerik:RadToolBarButton Text="Quick Plan" CommandName="NEW" Value="Quick" />
                    <telerik:RadToolBarButton Text="Full Plan" CommandName="NEW" Value="Full" />
                </Buttons>
            </telerik:RadToolBarDropDown>
            <telerik:RadToolBarButton IsSeparator="true" Value="Sep1" />
            <telerik:RadToolBarButton Text="Quick Plan" CommandName="QUICK" Checked="true" CheckOnClick="true" Group="PlanType" />
            <telerik:RadToolBarButton Text="Full Plan" CommandName="FULL" Checked="false" CheckOnClick="true" Group="PlanType" />
            <telerik:RadToolBarButton Text="Evaluation" CommandName="EVAL" Checked="false" CheckOnClick="true" Group="PlanType" Enabled="false" Visible="false" />
            <telerik:RadToolBarButton IsSeparator="true" Value="Sep2" />
            <telerik:RadToolBarButton Text="Edit" CommandName="EDIT" />
            <telerik:RadToolBarButton Text="Cancel" CommandName="CANCEL" />
            <telerik:RadToolBarButton Text="Save" CommandName="SAVE" CausesValidation="true" ValidationGroup="ProgramValidation" PostBack="true" />       
        </Items>   
    </telerik:RadToolBar>
</ContentTemplate>
</asp:UpdatePanel>
 
<asp:UpdatePanel ID="Content_AjaxPanel" runat="server" UpdateMode="Conditional">
<ContentTemplate>
    <div class="ContentContainer">
         
        <div id="CatalogContainer_Panel" runat="server" name="catalogContainer">
            <pm:ProgramCatalog ID="Program_Catalog"
                runat="server"
                Title="Program Catalog"               
                OnCatalogItemSelected="Program_Catalog_OnCatalogItemSelected"
                OnClientCatalogItemClicked="Program_OnCatalogItemClicked" />
        </div>
         
        <div id="CatalogItemContainer_Panel" runat="server" name="catalogItemContainer" style="display:none">
            <div class="LeftColumnContainer">
                <pm:ProgramManager runat="server"
                    ID="Program_ProgramManager"
                    OnProgramLoaded="Program_Manager_OnProgramLoaded"                    
                    Title="Program Characteristics" />
            </div>
 
            <div class="RightColumnContainer">
                <pm:OutcomeManager ID="Program_OutcomeManager"
                    runat="server"
                    Title="Goals"
                    ItemName="Goal" />
                <pm:OrganizerManager ID="Program_OrganizerManager"
                    runat="server"
                    Title="Organizers"
                    ItemName="Organizer"
                    OrganizerType="Program" />
                <pm:AudienceManager ID="Program_AudienceManager"
                    runat="server"
                    Title="Audiences"
                    ItemName="Audience" />               
                <pm:BudgetManager ID="Program_BudgetManager"
                    runat="server" 
                    Title="Budget Items"
                    ItemName="Budget Item" />
            </div>
        </div>
    </div>
</ContentTemplate>
</asp:UpdatePanel>
 
<div class="clear">
</div>

If you need anything more, please let me know.  Thanks.
Mark Gallucci
Top achievements
Rank 1
 answered on 07 Aug 2011
0 answers
99 views
Hi,
I have treelist.it has nodes.when i click to expand the treelist it behaves i selected it.but i dont click select button i only click the + icon on treelist.this is the code which i tried.

    protected void RadTreeList1_ItemCommand(object sender, TreeListCommandEventArgs e)
    {
        if (e.CommandName == RadTreeList.SelectCommandName)
        {
            TreeListDataItem item = e.Item as TreeListDataItem;
            Guid depid = new Guid(item.GetDataKeyValue("DEPID").ToString());
            RadWindow1.VisibleOnPageLoad = true;
            RadWindow1.NavigateUrl = "department-update.aspx?depid=" + depid;
        }
    }

and this is my button

<telerik:TreeListButtonColumn ButtonType="ImageButton" CommandName="Select" ImageUrl="Contents/Icons/select.png"
                    UniqueName="Select">
Teoman
Top achievements
Rank 1
 asked on 07 Aug 2011
1 answer
76 views
Anyone have any ideas about this one?

if (dataBoundItem.ItemIndex > 1) 
                {
                    e.Item.ForeColor = Color.Red;
                    if (Decimal.Parse(dataBoundItem["pcntchg"].Text) < 0) <<How to get the value here without using column name, I can't see how.
                    {
                        dataBoundItem["pcntchg"].ForeColor = Color.Red;
                    }
                }

Thanks!
Jayesh Goyani
Top achievements
Rank 2
 answered on 07 Aug 2011
2 answers
104 views
How to select new window option for ddl when i click on hyperlink image for creating hyper link the new window popup is open there is a ddl for target inside this ddl how i select new window option by default.
zaib
Top achievements
Rank 1
 answered on 07 Aug 2011
1 answer
168 views
Hi,

I have some submenus off a main structure.  The code is below.  When I mouseover back and forth from the main menu to the submenu the overall menu height keeps changing. It shrinks when I move towards the submenu and gets back to original size when I come back to the main menu.  This is a sample HTML I put together, the issue happens when I move between "View" and "Recent" back to Searches in the main menu.  The CSS I am using is at the bottom of the HTML.

Sri


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head><title>

</title><link id="Link1" href="css/Main.css" rel="Stylesheet" type="text/css" /><link href="/MenuControlWebApp/WebResource.axd?d=evYtvo20YR9hnsrP1j0caH19zB40cSCQTuHdEl37YrCSlO4BQ0zWC6oHgLMkSbPU0&amp;t=633710915156718750" type="text/css" rel="stylesheet" class="Telerik_stylesheet" /><link href="/MenuControlWebApp/WebResource.axd?d=evYtvo20YR9hnsrP1j0caH19zB40cSCQTuHdEl37YrCttVAaPUcdwLXgeKMP55OaCtfAPBLhQnecrSaCzbORfA2&amp;t=633710915156718750" type="text/css" rel="stylesheet" class="Telerik_stylesheet" /></head>
<body>
    <form name="form1" method="post" action="default.aspx" id="form1">
<div>
<input type="hidden" name="__EVENTTARGET" id="__EVENTTARGET" value="" />
<input type="hidden" name="__EVENTARGUMENT" id="__EVENTARGUMENT" value="" />
<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwULLTEwNDcxOTg2NTIPZBYCAgMPZBYCAgEPFCsAAhQrAAIPFgIeF0VuYWJsZUFqYXhTa2luUmVuZGVyaW5naGQQFgNmAgECAhYDFCsAAmRkFCsAAmRkFCsAAmQQFgRmAgECAgIDFgQUKwACZGQUKwACZBAWAmYCARYCFCsAAmRkFCsAAmRkDxYCZmYWAQV0VGVsZXJpay5XZWIuVUkuUmFkTWVudUl0ZW0sIFRlbGVyaWsuV2ViLlVJLCBWZXJzaW9uPTIwMDguMy4xMDE2LjM1LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPTEyMWZhZTc4MTY1YmEzZDQUKwACZGQUKwACZGQPFgRmZmZmFgEFdFRlbGVyaWsuV2ViLlVJLlJhZE1lbnVJdGVtLCBUZWxlcmlrLldlYi5VSSwgVmVyc2lvbj0yMDA4LjMuMTAxNi4zNSwgQ3VsdHVyZT1uZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj0xMjFmYWU3ODE2NWJhM2Q0DxYDZmZmFgEFdFRlbGVyaWsuV2ViLlVJLlJhZE1lbnVJdGVtLCBUZWxlcmlrLldlYi5VSSwgVmVyc2lvbj0yMDA4LjMuMTAxNi4zNSwgQ3VsdHVyZT1uZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj0xMjFmYWU3ODE2NWJhM2Q0ZGQYAQUeX19Db250cm9sc1JlcXVpcmVQb3N0QmFja0tleV9fFgEFDm5hdmlnYXRpb25NZW51qYqgI5M9vu4gKKZ0YwXpMFTG7gc=" />
</div>

<script type="text/javascript">
//<![CDATA[
var theForm = document.forms['form1'];
if (!theForm) {
    theForm = document.form1;
}
function __doPostBack(eventTarget, eventArgument) {
    if (!theForm.onsubmit || (theForm.onsubmit() != false)) {
        theForm.__EVENTTARGET.value = eventTarget;
        theForm.__EVENTARGUMENT.value = eventArgument;
        theForm.submit();
    }
}
//]]>
</script>
<script src="/MenuControlWebApp/WebResource.axd?d=dUQ6eyHfUxXT-Pc-K1pXog2&amp;t=633392531767031250" type="text/javascript"></script>


<script src="/MenuControlWebApp/ScriptResource.axd?d=nsh6bKeP1Nsf0bOYM8puBePWWY7emLcCII6PXF8Pc0s59zPX_PQ6B6prCzOMdel-kOqj9VMd-Zrnr7VgLiNjuDFI8-q7u5bYErh2TtlIeBc1&amp;t=633392535216406250" type="text/javascript"></script>
<script type="text/javascript">
//<![CDATA[
if (typeof(Sys) === 'undefined') throw new Error('ASP.NET Ajax client-side framework failed to load.');
//]]>
</script>

<script src="/MenuControlWebApp/ScriptResource.axd?d=nsh6bKeP1Nsf0bOYM8puBePWWY7emLcCII6PXF8Pc0s59zPX_PQ6B6prCzOMdel-gpFzsP0Ff_G5U27Cn8DclDF_8HiJpVUZBdb25OAbdRBUGyRRkY8aZtpWi2UwGB_h0&amp;t=633392535216406250" type="text/javascript"></script>
<script src="/MenuControlWebApp/ScriptResource.axd?d=eMCWEkDgllH0YualrAqfR3UQfd6g_kMAAHzKTQ4AjJal-P7V_P1VMsvIpGQt90H40&amp;t=633710915156718750" type="text/javascript"></script>
<script src="/MenuControlWebApp/ScriptResource.axd?d=eMCWEkDgllH0YualrAqfR3UQfd6g_kMAAHzKTQ4AjJbfdqqxD7Ntnz74I8D9i4q38VlzfrOI0uHWrKe1t2F2k0tm5I3oUWwisQXjoxf_vdY1&amp;t=633710915156718750" type="text/javascript"></script>
<script src="/MenuControlWebApp/ScriptResource.axd?d=eMCWEkDgllH0YualrAqfR3UQfd6g_kMAAHzKTQ4AjJaB5yiTLMhrjAt_4QmWoAfEj98R7LIVj3VEaiGlJLfTFvPdX8b2a4mLjsFvZXZSRls1&amp;t=633710915156718750" type="text/javascript"></script>
<script src="/MenuControlWebApp/ScriptResource.axd?d=eMCWEkDgllH0YualrAqfR3UQfd6g_kMAAHzKTQ4AjJbofaRFIQlinboDZIs6pIMBill9hWYNSGIL6oiwnoh3wkiFIZQMZv5AQz5_b4OfKpE1&amp;t=633710915156718750" type="text/javascript"></script>
<script src="/MenuControlWebApp/ScriptResource.axd?d=eMCWEkDgllH0YualrAqfR9j7JvyL0AOnQkbGUTjx9JWuJNTdOhr33qYLUeSu7lyX2vPjk1d8sAnmZh4DPhLQlg2&amp;t=633710915156718750" type="text/javascript"></script>
    <div>
        <div id="navigationMenu" class="RadMenu RadMenu_Default main_navigation_menu">
	<!-- 2008.3.1016.35 --><ul class="rmHorizontal rmRootGroup">
		<li class="rmItem rmFirst"><a href="#" class="rmLink "><span class="rmText">Home</span></a></li><li class="rmItem"><a href="#" class="rmLink "><span class="rmText">Preview</span></a></li><li class="rmItem rmLast"><a href="#" class="rmLink wArrow"><span class="rmText">View</span></a><div class="rmSlide">
			<ul class="rmVertical rmGroup rmLevel1">
				<li class="rmItem rmFirst"><a href="#" class="rmLink "><span class="rmText">Folders</span></a></li><li class="rmItem"><a href="#" class="rmLink subMenuArrow"><span class="rmText">Searches</span></a><div class="rmSlide">
					<ul class="rmVertical rmGroup rmLevel2">
						<li class="rmItem rmFirst"><a href="#" class="rmLink "><span class="rmText">View</span></a></li><li class="rmItem rmLast"><a href="#" class="rmLink subMenuArrow"><span class="rmText">Recent</span></a></li>
					</ul>
				</div></li><li class="rmItem"><a href="#" class="rmLink "><span class="rmText">Bookmarks</span></a></li><li class="rmItem rmLast"><a href="#" class="rmLink "><span class="rmText">Print</span></a></li>
			</ul>
		</div></li>
	</ul><input id="navigationMenu_ClientState" name="navigationMenu_ClientState" type="hidden" />
</div>
    
    <script type="text/javascript">
//<![CDATA[
Sys.WebForms.PageRequestManager._initialize('ScriptManager', document.getElementById('form1'));
Sys.WebForms.PageRequestManager.getInstance()._updateControls([], [], [], 90);
//]]>
</script>
 
    </div>
    

<script type="text/javascript">
//<![CDATA[
Sys.Application.add_init(function() {
    $create(Telerik.Web.UI.RadMenu, {"_skin":"Default","clientStateFieldID":"navigationMenu_ClientState","collapseAnimation":"{\"type\":12,\"duration\":200}","itemData":[{},{},{"items":[{},{"items":[{},{"cssClass":"subMenuArrow"}],"cssClass":"subMenuArrow"},{},{}],"focusedCssClass":"wArrowExpanded","cssClass":"wArrow"}]}, null, null, $get("navigationMenu"));
});
Sys.Application.initialize();
//]]>
</script>
</form>
</body>
</html>


CSS


.main_navigation_menu
{
    border:none;
}

.main_navigation_menu .rmRootGroup
{
    padding-left: 0;
    margin-left: 0;
    background-color: #1a144c;
    color: #ffffff;
}

.main_navigation_menu .rmHorizontal .rmVertical .rmLink
{
    width:150px;
    height:25px;
    border-bottom:1px solid #e1e1e1;
    border-top:1px solid #ffffff;
    background-color:#f7f7f7;
    background-image:none;
    padding: 0;
    border-left:none;
    border-right:none;
}

.main_navigation_menu .rmHorizontal .rmVertical .dtl_sub_menu_arrow
{    
    width:150px;
    height:25px;
    font-size:10px;
    font-weight:normal;
    color:#525151;
    text-decoration:none;
    border-bottom:1px solid #e1e1e1;
    border-top:1px solid #ffffff;
    background-color:#f7f7f7;
    background-image:url(../images/naviSubArrow_arrow.gif);
    background-repeat:no-repeat;
    background-position:130px 1px;
    padding:0px;
    border-left:none;
    border-right:none;
}

.main_navigation_menu .rmHorizontal .rmVertical .dtl_sub_menu_arrow:hover
{    
    background-color:#ededed;
    width:150px;
    height:25px;
    font-size:10px;
    font-weight:normal;
    color:#525151;
    text-decoration:none;
    border-bottom:1px solid #e1e1e1;
    border-top:1px solid #ffffff;
    background-color:#f7f7f7;
    background-image:url(../images/naviSubArrow_arrow.gif);
    background-repeat:no-repeat;
    background-position:130px 1px;
    padding:0px;
    border-left:none;
    border-right:none;
}

.main_navigation_menu .rmHorizontal .rmVertical .rmLink .rmText
{
    font-size:10px;
    font-weight:normal;
    color:#525151;
    text-decoration:none;
}

.main_navigation_menu .rmHorizontal .rmLink
{
    background-image: url(../images/top_navi_menu_off.gif);
    background-repeat:repeat-x;
    background-position: 50% top;
    cursor: pointer;
    height:34px;
    float: left;
}

.RadMenu_Default .rmHorizontal .rmItem {
        PADDING-BOTTOM: 1px
}

.main_navigation_menu .rmHorizontal .rmLink .rmText
{
    color: #ffffff;
    font-weight:bold;
    font-size:11px;
    text-decoration: none;    
    padding-top: 11px;
}

.main_navigation_menu .rmHorizontal .wArrow {
    padding: 0px 15px 0px 0px;
    background-image: url(../Images/top_navi_menuarrow_off.gif);
    background-repeat:repeat-x;
    background-position:right;
}

.dtl_main_navigation_menu .rmGroup .rmText
{
    padding: 0 40px 0 0;
}

.main_navigation_menu .rmHorizontal .rmVertical .rmLink:hover
{
    background-color:#ededed;
    border:none;
}

.main_navigation_menu .rmHorizontal .rmLink:hover,
.main_navigation_menu .rmHorizontal .rmExpanded,
.main_navigation_menu .rmHorizontal .rmFocused
{
    background-image: url(../images/top_navi_menu_on.gif);
    border:none;
}

.main_navigation_menu .rmHorizontal .wArrow:hover
{
    background-image: url(../images/top_navi_menuarrow_on.gif);
}

.main_navigation_menu .rmHorizontal .wArrowExpanded
{
    background-image: url(../images/top_navi_menuarrow_on.gif);
}

.main_navigation_menu .rmGroup .rmItem,
.main_navigation_menu .rmGroup .rmLink
{
    /*background: transparent;*/
}

Pieter
Top achievements
Rank 1
 answered on 06 Aug 2011
7 answers
270 views
Hi there, i'm wondering if this is possible, what i'd like to be able to implement is a radcombobox where it finds the closest match to whatever you type.

For example i've got a radcombobox with markfirstmatch enabled and allowcustomtext to false (because i want to limit them to the items within the combobox). 

Take this for example; a combobox populated with countries. 

United Kingdom 
United Arab Emirates. 

I start typing 'Uni' and it jumps to any items starting with 'Uni' which is great. However, what if i want to type 'Kingdom' ? Or 'Arab' , or any part of the text. 

I'd like it filter the items in the combobox based on this. 

Another example would be me typing in 'land' and having it find 'England', and any other items containing that text.

Many thanks for your support Telerik.

Alan

Alan T
Top achievements
Rank 1
 answered on 06 Aug 2011
4 answers
201 views
I have a nested grid view in radAjaxPanel. In parent grid, there is one division, in which I am adding linkbuttons runtime on _ItemDatabound. I need to open picture files on click of the link button click.
Like, div in <itemTemplate>

<div id="divAddAttachment" runat="server">  </div>

And on server side, on _ItemDatabound event, I am adding link button and assigning click event of that.
lnkOtherattachment.Text = "link1" ;
 lnkOtherattachment.CommandArgument = userid;
 lnkOtherattachment.CommandName = strFilePath + ext;
 lnkOtherattachment.ID ="lnk" + Guid.NewGuid().ToString();
 lnkOtherattachment.Command += new CommandEventHandler(attach_Click);
 divAttachments.Controls.Add(lnkOtherattachment);


The whole grid is inside RadAjaxPanel. So, as i need to open image on click of the linkbutton,

function OnRequestStart(target, arguments) {             
     if (arguments.get_eventTarget().indexOf("lnk") > -1) {                
         arguments.set_enableAjax(false);
     }
 }


But it never calls the "attach_Click" event on click of the link button.
This works perfect outside the radGrid.
What's wrong with this code?
Jayesh Goyani
Top achievements
Rank 2
 answered on 06 Aug 2011
5 answers
386 views

I am using Telerik RadControls. I have radGrid in which i have upload control for inserting images. But error is thrown when I try to upload any file.

Object must implement IConvertible.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.InvalidCastException: Object must implement IConvertible.

Source Error: An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[InvalidCastException: Object must implement IConvertible.] System.Convert.ChangeType(Object value, TypeCode typeCode, IFormatProvider provider) +2877013 System.Web.UI.WebControls.Parameter.GetValue(Object value, String defaultValue, TypeCode type, Boolean convertEmptyStringToNull, Boolean ignoreNullableTypeChanges) +141 System.Web.UI.WebControls.Parameter.GetValue(Object value, Boolean ignoreNullableTypeChanges) +63 System.Web.UI.WebControls.SqlDataSourceView.AddParameters(DbCommand command, ParameterCollection reference, IDictionary parameters, IDictionary exclusionList, String oldValuesParameterFormatString) +524 System.Web.UI.WebControls.SqlDataSourceView.ExecuteUpdate(IDictionary keys, IDictionary values, IDictionary oldValues) +141 System.Web.UI.DataSourceView.Update(IDictionary keys, IDictionary values, IDictionary oldValues, DataSourceViewOperationCallback callback) +92 Telerik.Web.UI.GridTableView.PerformUpdate(GridEditableItem editedItem, Boolean suppressRebind) +224 Telerik.Web.UI.GridCommandEventArgs.ExecuteCommand(Object source) +985 Telerik.Web.UI.RadGrid.OnBubbleEvent(Object source, EventArgs e) +134 System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +37 Telerik.Web.UI.GridEditFormItem.OnBubbleEvent(Object source, EventArgs e) +216 System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +37 System.Web.UI.WebControls.ImageButton.OnCommand(CommandEventArgs e) +111 System.Web.UI.WebControls.ImageButton.RaisePostBackEvent(String eventArgument) +176 System.Web.UI.WebControls.ImageButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +36 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1565


I am actually trying to use this example with my databases and all.

http://demos.telerik.com/aspnet-ajax/controls/examples/integration/raduploadinajaxifiedgrid/defaultvb.aspx?product=grid&RadUrid=2ecccfe5-76bd-4310-b0a3-c5c84afc1beb



Aamir
Top achievements
Rank 1
 answered on 06 Aug 2011
1 answer
40 views
Hi everyone,

We are using a grid column and it's displayed correctly in the grid.
We have implemented an export function (using RadGrid1.MasterTableView.ExportToCSV();).
The resulting file is a CSV or excel without any value under the rating column.

Are there any known issue with the export of a rating column?

Thank you

Regis
Jayesh Goyani
Top achievements
Rank 2
 answered on 06 Aug 2011
3 answers
336 views
Hi All:

Like others, I am experiencing the following error in my orders selection grid. 
The state information is invalid for this page and might be corrupted.
   at System.Web.UI.ViewStateException.ThrowError(Exception inner, String persistedState, String errorPageMessage, Boolean macValidationError)
   at System.Web.UI.ViewStateException.ThrowViewStateError(Exception inner, String persistedState)
   at System.Web.UI.HiddenFieldPageStatePersister.Load()
   at System.Web.UI.Page.LoadPageStateFromPersistenceMedium()
   at System.Web.UI.Page.LoadAllState()
   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
Inner Exception Trace:   Invalid viewstate.
    Client IP: 127.0.0.1
    Port:
    Referer: http://localhost:52506/WebUI/OrderSelection.aspx
    Path: /WebUI/OrderSelection.aspx
    User-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; .NET4.0E; MS-RTC EA 2; MALC)
    ViewState: /wEPDwULL...
 
Inner Exception Trace:   Invalid length for a Base-64 char array.
   at System.Convert.FromBase64String(String s)
   at System.Web.UI.ObjectStateFormatter.Deserialize(String inputString)
   at System.Web.UI.ObjectStateFormatter.System.Web.UI.IStateFormatter.Deserialize(String serializedState)
   at System.Web.UI.Util.DeserializeWithAssert(IStateFormatter formatter, String serializedState)
   at System.Web.UI.HiddenFieldPageStatePersister.Load()

The grid allows filtering and contains 2 RadDatePickers.  If I change a value in the picker and press enter, I get the above error.  If I tab out of the field then no error.

I have tried EnableLinqExpressions="False", but no luck.

Phil
Phil
Top achievements
Rank 2
 answered on 06 Aug 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?