Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
93 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
140 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
230 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
181 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
1 answer
247 views
Hi!
I would like to resize files that are being uploaded automatically. But I only want to resize the width. Regarding the height of the file, this should auto adjust it self. Forexample; If I'm uploading a file that is 1000 px in width and 2000px in height and then resize it to 500px in width, then I want the height to be auto resized to 1000px. In other words the height and width has to be proportional.

This is the code that I'm using right now.

  int width = 500;
  int height = 500;
  using (System.Drawing.Image thumbnail = originalImage.GetThumbnailImage(width, height, thumbnailImageAbortDelegate, IntPtr.Zero))
  {
      string thumbnailFileName = Path.Combine(target, string.Format("{0}_BigPicture{1}", file.GetNameWithoutExtension(), file.GetExtension()));
      thumbnail.Save(thumbnailFileName);

The problem with this is that is has to take both the height and the width. I cannot leave out the height parameter.

P.S. My DLL version is 2009.3.1208.35 > Telerik.Web.UI.dll (ASP.NET Ajax)

So I hope someone can help.

Thanks
sammy ymmas
Top achievements
Rank 1
 answered on 15 Jun 2010
1 answer
281 views

Sir ,

I want to open rad window in maximize mode through Client Side Code my code is below.

but its not working pls add Maximize  Code in my code.


return

 

string.Format("var win = window.radopen('DisplayImage.aspx?id={0}&regno={1}&hosid={2}','Details');win.center();", Convert.ToString(id), Session["registrationno"].ToString(), Session["HospitalLocationId"].ToString());

Thanks.
Chandan Kumar

 

Princy
Top achievements
Rank 2
 answered on 15 Jun 2010
1 answer
874 views
I'm getting a strange error and thought I'd inquire about how it's happening. I have a MultiPageView, the way it is controlled is through a radiobuttonlist at the top of the page. When I switch the index of the radiobuttonlist, say from 0 to 2 (going from the first page, to the third page in the view) I get a java error that says "Message: 'undefined' is null or not an object" then down in the URI field which I read it lists my page and then "/Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=ctl00_RadScriptManager1_TSM&compress=1&_TSM_CombinedScripts_=%3b%3bSystem.Web.Extensions%2c+Version%3d3.5.0.0%2c+Culture%3dneutral%2c+PublicKeyToken%3d31bf3856ad364e35%3aen-US%3a0d787d5c-3903-4814-ad72-296cea810318%3aea597d4b%3ab25378d2%3bTelerik.Web.UI%2c+Version%3d2010.1.309.35%2c+Culture%3dneutral%2c+PublicKeyToken%3d121fae78165ba3d4%3aen-US%3a30afb63f-e6ac-41db-9851-11879733de0a%3a16e4e7cd%3aed16cbdc%3af7645509%3a24ee1bba%3ae330518b%3a1e771326%3a8e6f0d33%3a6a6d718d%3a58366029%3aaa288e2d%3a874f8ea2%3a19620875%3a33108d14%3abd8f85e4%3ac8618e41%3ae4f8f289%3ae524c98b

I'm wondering if this is an AJAX Toolkit error? I don't know why it's happening, although I can generate it. I'm using Visual Studio 2010 with Framework 3.5 if that matters. Any suggestions or assistance is really appreciated.



T. Tsonev
Telerik team
 answered on 15 Jun 2010
2 answers
102 views
hi,

  i've got a grid populated with data.

  i now want to alter the ordering of this data by dragging and dropping rows within this grid.

  i've looked at your drag/drop example ...

      http://demos.telerik.com/aspnet-ajax/grid/examples/programming/draganddrop/defaultcs.aspx

  and it's more involved than i need.

  simply put, i want to re-order content, client side, without going back to the server -- or at least without having to load up my data again ... as it seems to be doing in your example - see GetOrders()

  are there any examples out there to do this ?

  thanks. info appreciated.

Andy
Yavor
Telerik team
 answered on 15 Jun 2010
5 answers
369 views
Hi All,

I gave empty data source to rad grid.
Empty data source is bonded successfully from client side. but when i want to add new record then i call web service method which inserts record in data base successfully after that i call getAllRecords method to which get all records from data base and returns list.

But when i bind it rad grid, it throws javascript error. tableView12 is null. Here is my code.

function InsertUpdateRecord(result)
    {              
        //var tableView12 = tableView1.get_masterTableView();
        var tableView12 = $find("ControlsStudentRecordAdd_rgAddress").get_masterTableView();      
        tableView12.set_dataSource(result[0].objStudentAddressCollection);
        tableView12.dataBind();
    }

I hope i have clear my point of view. if it is not then do let me know i will try to explain it.

how can i do this task.

Veli
Telerik team
 answered on 15 Jun 2010
1 answer
226 views
I am using the EditForm in my RadGrid.  The controls are all lined up to the left side and I would like to move them to the right about 100px.  I tried <FormMainTableStyle CellPadding="100"/> , but it also created a 100px padding on the top and bottom also.  Is there a way to only create padding on the left side?
Shinu
Top achievements
Rank 2
 answered on 15 Jun 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?