Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
294 views

Hi,
I want use a RadMenu in an UserControl.
I load dynamically the Menu Items in Page_Load Event and I want to set dynamically the SkinId of RadMenu.

If I set the SkinId in Page_Load I have this problem.
"The 'SkinId' property can only be set in or before the Page_PreInit event for static controls. For dynamic controls, set the property before adding it to the Controls collection."

But Usercontol don't have the Pre_Init event.

How do I set dynamically SkinId of my RadMenu ?

Thanks,
Marco

Veronica
Telerik team
 answered on 15 Jun 2010
2 answers
204 views
I have table structured

Menu_Master :
PK    [MenuID] [int] IDENTITY(1,1) NOT NULL,
    [MenuName] [varchar](50) NOT NULL,
    [URL] [varchar](50) NULL,
    [ParentMenuID] [int] NULL,
 
If I have assign DataFieldParentId = ParentMenuID then TreeView goes blank just suggest me ..
Nikolay Tsenkov
Telerik team
 answered on 15 Jun 2010
1 answer
148 views
Hi,

Im not sure if this is the ideal use of the grid/ It may not be possible but i am trying to achieve the following scenario:

One grid on the screen with a selector for 9 different data sources as the user clicks the datasource the new set gets bound to the grid (needdatasource rebind()).  the grid is defined in code and i call the new definition as the new data source is clicked this works fine until you go to page or group the data at which point it keeps the column headings but doesnt know what datafiled to user so just puts the object name in the field.

I tried calling my method to define the grid each time the needdatasource is called this worked for paging but not for grouping should this work?
Paul Lewis
Top achievements
Rank 1
 answered on 15 Jun 2010
1 answer
94 views
I'm using the default theme with the FormDecorator.  It doesn't appear there are any special BG images that represent a disabled checkbox, when checked and unchecked.  My disabled checkboxes appear as though they are enabled (they are not checkable however).

The attached file "standard_formdecorator_checkbox_images_for_default_theme.gif" shows the standard BG image from the FormDecorator retrieved via WebResource.axd.  There are 4 checkbox states in it.  A couple are hover states, but I'm not sure what they all are.  I attached this file for reference.

I created the other attached GIF, "disabled_checkbox_bg_image_for_default_theme.gif".  This has 2 images in it which represent a disabled checkbox when checked and when unchecked.  It would be nice if Telerik could add these state BG images to the FormDecorator.  I attached it here for Telerik or anyone else who might find it useful.  Here is the CSS I added so this BG image is used:

/*  Disabled checkbox - checked  */ 
.RadForm_Default .rfdInputDisabled.rfdCheckboxChecked, 
.RadForm_Default .rfdInputDisabled.rfdCheckboxChecked:hover 
    { background: transparent url(/images/disabled_checkbox_bg_image_for_default_theme.gif) no-repeat 0 -220px !important; } 
 
/*  Disabled checkbox - unchecked  */ 
.RadForm_Default .rfdInputDisabled.rfdCheckboxUnchecked, 
.RadForm_Default .rfdInputDisabled.rfdCheckboxUnchecked:hover 
    { background: transparent url(/images/disabled_checkbox_bg_image_for_default_theme.gif) no-repeat 0 0 !important; } 

Bozhidar
Telerik team
 answered on 15 Jun 2010
1 answer
123 views
I have a RadTextBox in a CreateUserWizard template.  I tried to use following code to reference it in client side:

var tb = $find("<%= UserName.ClientID %>"); 
But I always get null.

Is there any way to reference the RadTextbox in javascript?

Here is the code in the page:
<asp:CreateUserWizard ID="C" runat="server">
        <WizardSteps>
            <asp:CreateUserWizardStep ID="Step1" runat="server">
                <contenttemplate>
                    <telerik:RadTextbox ID="UserName" Label="Username:" runat="server" MaxLength="15" />
                     ........
                </contenttemplate>
            </asp:CreateUserWizardStep>
</WizardSteps>
</asp:CreateUserWizard
Shinu
Top achievements
Rank 2
 answered on 15 Jun 2010
1 answer
240 views

Hi there,

I have, in my telerik web application, some telerik controls such as RadScriptManager, RadFormDecorator, RadAjaxManager, RadAjaxLoadingPanel, RadAjaxPanel, and others.

When i loading this app run to VS2010, its work very good. But when i publish this app and run with IIS 7.5, i find erros below:

* ASP.NET Ajax client-side framework failed to load.

* 'Sys' não está definido.

PS: im using FW 4.0.

Can anyone help me? Thks

Sebastian
Telerik team
 answered on 15 Jun 2010
1 answer
104 views
Hi, I am using the tree control. When the page loads I want it to look like the 1st node is selected. I am using the Outlook skin so I want it to highlighted blue.

Basically, when the page loads, I have a tree view on the left side of the page and the data that gets displayed is on the right side of the page. So when you first come to the page, the first node needs to be selected and the right side will already have the data displayed in that area.

Can anyone help. Thanks in advance

Also, when I deployed the site, I included the Telerik DLL of course but I added this line in the web.config because I was getting a Telerik error ScriptResource.axd not found
 <!--<httpHandlers>
      <remove verb="*" path="*.asmx"/>
      <add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
      <add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
      <add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" validate="false"/>
      <add path="Telerik.Web.UI.WebResource.axd" verb="*" type="Telerik.Web.UI.WebResource, Telerik.Web.UI" validate="false" />
    </httpHandlers>
   
This helped but now another programmer is telling me I cant have this in web.config in IIS7

It works on my machine but not the deployment server.

Does anyone know the answer here
Nikolay Tsenkov
Telerik team
 answered on 15 Jun 2010
10 answers
151 views
I have a radpanelbar that I need to access from js and i always get a compiler error saying RadPanelBar1 is not available in this context.
Code is posted below.

Also; before i added the panelbar the code was in an asp:panel and I couldnt access any radcontrols from my js, asp controls were fine, now I cant access any of them inside the panelbar.

js where I am attempting to access the panelbar
 
var title = $find('<%= RadPanelbar1.FindItemByValue("Content").FindControl("txtContentTitle").ClientID %>'); 

My radpanelbar and the controls inside of it.

<telerik:RadWindowManager ID="RadWindowManager1" runat="server" Behavior="Default"  
        Height="25px" InitialBehavior="None" Width="166px"></telerik:RadWindowManager> 
    <Windows> 
        <telerik:RadWindow Height="100px" Width="300px" OnClientClose="OnClientClose" EnableViewState="false" NavigateUrl="Dialog1.aspx" ID="rdWindow" runat="server" Behaviors="Close" VisibleOnPageLoad="true" DestroyOnClose="true" Modal="true" Visible="false"> 
        </telerik:RadWindow> 
    </Windows> 
 
    <div id="CMSContent"> 
        <cc1:RoundedDiv ID="rdContentInsert" runat="server" SkinsPath="~/App_Themes/Default/RoundedDiv/Skins" RoundBottomRight="true"  Skin="Blue"  Title="Add Content"> 
            <asp:Label ID="lblStatus" runat="server" CssClass="cmsStatus" ></asp:Label>  
 
            <telerik:RadPanelBar runat="server" ID="RadPanelBar1"  
                ExpandMode="FullExpandedItem" Width="800px"> 
                 
                <Items> 
                    <telerik:RadPanelItem runat="server" Value="Content Management" Text="Content" Expanded="true"> 
                        <Items> 
                            <telerik:RadPanelItem runat="server" Value="Content"> 
                                <ItemTemplate> 
                                    <table cellpadding="3">        
                                        <tr> 
                                            <td align="left" valign="top"> 
                                                <asp:TextBox ID="txtFileDescription" runat="server" MaxLength="50" CssClass="cmsFileDescription" 
                                                OnClick="clickclear(this, 'File Description')" OnBlur="clickrecall(this,'File Description')">File Description</asp:TextBox> 
                                            </td> 
                                            <td align="left" valign="top"  > 
                        
                                                <telerik:RadUpload ID="rulUploader" runat="server" CssClass="cmsUploader" AllowedFileExtensions=".jpg,.jpeg,.pjpeg,.gif,.png" ControlObjectsVisibility="None" MaxFileInputsCount="1" Skin="Vista"  
                                                AllowedMimeTypes="image/jpeg,image/gif,image/png,image/pjpeg" MaxFileSize="104857600" EnableViewState="true" > 
                                                </telerik:RadUpload> 
                      
                                            </td>       
                                            <td align="left" valign="top"> 
                                                <asp:Button ID="btnUpload" runat="server" Text="Upload Content" ValidationGroup="Editor" OnClick="btnUpload_Click" /> 
                                            </td> 
                                            <td align="left" valign="top"> 
                                                    <asp:Button ID="btnUploadCancel" runat="server" Text="Cancel Upload Mode" OnClick="btnUploadCancel_Click"  /> 
                                            </td> 
                                        </tr>    
                                    </table>   
                                    <asp:RequiredFieldValidator ID="rfvTitle" runat="server" ErrorMessage="*Please input a Title." Display="dynamic" ValidationGroup="Editor"  
                                        ControlToValidate="txtContentTitle" Font-Bold="true"></asp:RequiredFieldValidator> 
                                    <asp:RequiredFieldValidator ID="rfvFileDescr" runat="server" ErrorMessage="*Please input a File Description." Display="dynamic" ValidationGroup="Editor"  
                                        ControlToValidate="txtFileDescription" Font-Bold="true"></asp:RequiredFieldValidator> 
                                    <asp:RegularExpressionValidator ID="revFileDescription" runat="server" ErrorMessage="*File Description has illegal characters." Display="dynamic" 
                                        ValidationGroup="Editor" ControlToValidate="txtFileDescription" Font-Bold="true" ValidationExpression='^(([a-zA-Z]:|\\)\\)?(((\.)|(\.\.)|([^\\/:\*\?"\|<>\. ](([^\\/:\*\?"\|<>\. ])|([^\\/:\*\?"\|<>]*[^\\/:\*\?"\|<>\. ]))?))\\)*[^\\/:\*\?"\|<>\. ](([^\\/:\*\?"\|<>\. ])|([^\\/:\*\?"\|<>]*[^\\/:\*\?"\|<>\. ]))?$' ></asp:RegularExpressionValidator> 
                                    <asp:RequiredFieldValidator ID="rfvcbxContentType" runat="server" ErrorMessage="*Please select a content type." Display="dynamic" ValidationGroup="Editor"  
                                       ControlToValidate="cbxContentTypes" Font-Bold="true"></asp:RequiredFieldValidator> 
     
                                    <table cellpadding="3"> 
                                       <tr> 
                                            <td > 
                                                <asp:TextBox ID="txtContentTitle" runat="server" MaxLength="8000" CssClass="cmsContentTitle" 
                                                    OnClick="clickclear(this, 'Title')" OnBlur="clickrecall(this,'Title')">Title</asp:TextBox>             
                                            </td> 
                                        </tr> 
                                         <tr> 
                                            <td align="left" valign="top"> 
                                                <asp:TextBox ID="txtTagContent" runat="server" MaxLength="8000"  CssClass="cmsFileDescription" 
                                                OnClick="clickclear(this, 'Content Keywords')"  
                                                    OnBlur="clickrecall(this,'Content Keywords')" Width="800px">Content Keywords</asp:TextBox> 
                                            </td> 
                                            <td align="left" valign="top" > 
                                                <asp:Label ID="lblContentTypes" runat="server" Text="Content Type:"></asp:Label>&nbsp; 
                                            </td> 
                                            <td align="left" valign="top" > 
                                                <telerik:RadComboBox ID="cbxContentTypes" runat="server" />                 
                                            </td>                      
                                       </tr>    
                                       <tr> 
                                           <td> 
                                               <telerik:RadEditor ID="txtContent" runat="server"  
                                                   EnableResize="False" Skin="Outlook" Width="800px" Height="250px"  
                                                ToolbarMode="ShowOnFocus" ToolTip="Type Content Here"  
                                                   ToolsFile="../../App_Themes/Default/ToolsLimited.xml" >  
                                                   <CssFiles> 
                                                    <telerik:EditorCssFile Value="cmsContentText" /> 
                                                   </CssFiles>  
                                               </telerik:RadEditor> 
                                            </td> 
                                            <td align="left" valign="top"> 
                                                <asp:Label ID="lblActive" runat="server" Text="Content Active:"></asp:Label><br /> 
                                                <br /> 
                                                <br />          
                                                <asp:Label ID="lblActiveFrom" runat="server" Text="Active From:" CssClass="cmsFromLabel" ></asp:Label><br /> 
                                                <br /> 
                                                <asp:Label ID="lblActiveTo" runat="server" Text="Active To:"></asp:Label></td> 
                                            <td align="left" valign="top" style="width: 182px"> 
                                                <asp:CheckBox ID="chkActive" runat="server" /> 
                                                <br /> 
                                                <br />              
                                                <telerik:RadDateTimePicker ID="dtpFromDate" runat="server"  
                                                    MaxDate="9999-12-31 11:59:59 PM" MinDate="2010-05-11"  />   
                                                <br /> 
                                                <br /> 
                                                <telerik:RadDateTimePicker ID="dtpToDate" runat="server" MaxDate="9999-12-31 11:59:59 PM" />    
                                            </td>          
                                        </tr> 
                                        <tr> 
                                           <td> 
                                                <asp:Button ID="btnInsertContent" runat="server" Text="Save Content" OnClick="btnInsertContent_Click" /> 
                                                &nbsp;&nbsp;        
                                                <asp:Button ID="btnClear" runat="server" Text="Cancel"  
                                                    onclick="btnClear_Click" /> 
                                            </td> 
                                        </tr>     
                                    </table> 
                        
                                </ItemTemplate> 
                            </telerik:RadPanelItem> 
                        </Items> 
                    </telerik:RadPanelItem>                 
                </Items> 
            </telerik:RadPanelBar>       
    </cc1:RoundedDiv>    
    </div> 
 

Thank you
Neil
Nikolay Tsenkov
Telerik team
 answered on 15 Jun 2010
3 answers
234 views
I have two pages both with a RadGrid with an "Open" (GridButtonColumn) button. The "Open" button on the Organization page will redirect to the Contacts page and the "Open" button on the Contacts page will redirect to the Organization page.

Intermittently, after clicking the "Open" button (on either the Organization or the Contacts page), the OnItemCommand will not fire. The page remains on the original page and the RadGrid just appears with every other row looking blank.

I don't know if this is relevant, but it almost always happens if I have to scroll down the RadGrid to select a row.

Please help.

Maria Ilieva
Telerik team
 answered on 15 Jun 2010
1 answer
185 views
Hi there,

I have, in a telerik web application, one button making logon of the users. Look:

 

<asp:UpdatePanel ID="UpdatePanel1" runat="server"> 
<ContentTemplate>

 

<asp:Button ID="btnEntrar" runat="server" Text="Entrar" onmouseover="this.style.cursor='hand'"

 

OnClick="btnEntrar_Click" />

 

</ContentTemplate>

 

</asp:UpdatePanel>


In server side, i have 2 states:

if user was authenticated, response.redirect("page.aspx"),
else app sends radalert.
Look:

 

protected

 

 

void btnEntrar_Click(object sender, EventArgs e)  

 

 

{

 

 

 

if ((this.txtLogin.Text == "cayo") && (this.txtSenha.Text == "123"))

{

Response.Redirect(

 

"Principal.aspx"); 

 

 

}

 

 

 

else

 

{

 

 

 

ScriptManager.RegisterStartupScript(this, this.GetType(), "radalerts", "radalert('Login ou senha <b>inválidos</b>! Favor verificar.', 330, 100);", true);

}

 

 

}

 

 

 

If i dont set RadScriptManager1.RegisterPostBackControl(this.btnEntrar); in Page_Load, radalert is work and redirect fails, else, redirect works and radalert fails.

whats to happen?

 

 

Fiko
Telerik team
 answered on 15 Jun 2010
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?