Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
104 views
Hi

In my scenario, i have a treeview in the left side of a RadSplitter and on the other radPane , i load a user control when a node is clicked. My problem is that when i enter a value in a textbox includes in my usercontrol on the right pane, i want to update the associated radTreeNode.text with the associated text in my user control's textbox. I'm not sure how i can achieve that thing, so any help would be appreciated.

If you need more details on that, please let me know.

Thanks in advance for your helps.

Yana
Telerik team
 answered on 06 Nov 2008
1 answer
173 views
Hello All,

I am using combobox inside radgrid,I have not set any width of combobx because I want to set combobox width depend on its content,but my combobox taking default width 160 px,I don't know where it comes from,I have applied skin to it but in skin also I have not applied any height
Rosi
Telerik team
 answered on 06 Nov 2008
1 answer
120 views
I have a column that is a date type and want to group by just the year portion of the date. 

Any help would be appreciated.

Thanks
Princy
Top achievements
Rank 2
 answered on 06 Nov 2008
1 answer
104 views
Hi

I m Using a tree view displaying from webservice but what i need is when i click on tree view node i want to pass a two parameter values to calling WebService file,one is Node value and another one is my webform querystring value or textbox value to webservice.can anyone  plz help me this.

reply me


Simon
Telerik team
 answered on 06 Nov 2008
3 answers
81 views
when i m trying to call data from sql server to the treeview using webservice i getting the following  error

Error during Serialization or deserialization using the JSON Javascript Serializer.The Length of the string exceeds the value set on the max JSONlength property.

this is my following code in webservice method

private

 

DataTable GetProductCategories1(object categoryId)

 

{

 

SqlConnection connection = new SqlConnection(ConfigurationManager.ConnectionStrings["hakConnectionString"].ConnectionString);

 

 

SqlCommand selectCommand = new SqlCommand(@"Select * From Table911 where Left(Fld121,1) like '" + categoryId + "'" ,connection);

 

 

//selectCommand.Parameters.AddWithValue("parentId", categoryId);

 

 

SqlDataAdapter adapter = new SqlDataAdapter(selectCommand);

 

 

DataTable productCategories = new DataTable();

 

adapter.Fill(productCategories);

 

return productCategories;

 

}

Veselin Vasilev
Telerik team
 answered on 06 Nov 2008
0 answers
71 views
Hi,

I'm hoping you may be able to help with this.

On our development machines (XP Laptops) AP.Net 2.0 with all SP's loaded and Telerik radAjax Control suite vQ4 2006 plus updates from Q1 2008 (ex the downloaded zip there of), we find our Callbacks particularly with RadWindow to Owner Page, with Refresh work perfectly.
However, the installation  to 2003 server produces different results in that the refresh of the parent is not fired.
(Very often and intermittently it does work, similarly we have intermittent successes with the RadGrid Postback on it, but perfect results in the Dev Environment running out of VS 2005.)

Typically our calling (Parent page ) looks as follows:

<

body topmargin=0 leftmargin=0 >

 

 

<form id="form1" runat="server" >

 

 

<script language="javascript" type="text/javascript">

 

 

 

function openUnallocatedContacts()

 

{

 

//Use urlExtn to add a unique instance to the called page, to overcome IE7 Browser caching

 

 

var urlExtn = "ms=" + new Date().getTime();

 

 

 

var oWnd = radopen("ContactsUnallocated.aspx?" + urlExtn + "&OwnerId=" + <%= OwnerId %>

 

+

"&PlanId=" + <%= PlanId %>

 

+

"&SubPlanId=" + <%= SPlanId %> ,

 

 

"ContactsUnallocated" );

 

}

 

function openTabbedContacts(Id)

 

{

 

var urlExtn = "ms=" + new Date().getTime();

 

 

var oWnd = radopen("ContactTabbedDetails.aspx?" + urlExtn + "&ContactsID="

 

+ Id +

"&OwnerId=" + <%= OwnerId %> , "ContactTabbedDetails" );

 

}

 

</script>

 

 

 

<radW:RadWindowManager

 

 

ID="RadWindowManager1"

 

 

runat="server"

 

 

Overlay="true">

 

 

 

<Windows>

 

 

<radw:RadWindow

 

 

ID="ContactsUnallocated"

 

 

runat="server"

 

 

Skin = "Inox"

 

 

Width="900px"

 

 

Height="650px"

 

 

Top="60"

 

 

Left="50"

 

 

Modal="true"

 

 

>

 

 

</radw:RadWindow>

 

 

<radw:RadWindow

 

 

ID="ContactTabbedDetails"

 

 

runat="server"

 

 

Width="600px"

 

 

Height="500px"

 

 

Skin = "Inox"

 

 

Top="50"

 

 

Left="70"

 

 

Modal="true"

 

 

>

 

 

</radw:RadWindow>

 

 

</Windows>

 

 

</radW:RadWindowManager>

 

 

<div>

 

 

<table class="tblGradnt800" width="100%">

 

 

<tr>

 

 

<td class ="FrmHdrRow_GrdntCenter">

 

 

&nbsp;<asp:Label ID="lblbreadcrumb" runat="server"

 

 

Width="100%" BackColor="Transparent" ForeColor="WhiteSmoke" Font-Size="XX-Small"

 

 

>Allocated Contacts: </asp:Label>

 

 

</td>

 

 

</tr>

 

 

 

<tr>

 

 

<td

 

 

class ="TDInnerRowStyle_left">

 

 

 

<radG:RadGrid ID="GrvContacts"

 

 

runat="server"

 

 

EnableAJAX="true"

 

 

AutoGenerateColumns = "False"

 

 

AllowAutomaticDeletes="True"

 

 

AllowAutomaticInserts="True"

 

 

AllowAutomaticUpdates="false"

 

 

AllowSorting="True"

 

 

ShowStatusBar="True"

 

 

LoadingTemplateTransparency="50"

 

 

CssClass="GridVClass"

 

 

Width ="100%"

 

 

Height="100%"

 

 

CellPadding="4"

 

 

GridLines="None" AllowPaging="True"

 

 

EnableOutsideScripts="True"

 

 

EnableAJAXLoadingTemplate="True"

 

 

Visible="True"

 

 

HorizontalAlign="Left"

 

 

 

OnDeleteCommand="grvContDetails_DeleteCommand"

 

 

OnNeedDataSource="grvContDetails_NeedDataSource"

 

 

OnItemCommand="grvContDetails_ItemCommand"

 

 

SelectedItemStyle-BackColor="Gold"

 

 

EditItemStyle-BackColor="Gold" PageSize="15"

 

 

 

>

 


<

MasterTableView DataKeyNames="PersonId"

 

 

CommandItemDisplay="Top" >

 

 

<Columns>

 

 

<radG:GridTemplateColumn

 

 

HeaderText="Details"

 

 

UniqueName ="Edit"

 

 

DataField="Select" AutoPostBackOnFilter ="True">

 

 

<ItemTemplate >

 

 

<img src="../../RadControls/Grid/Skins/Default/Edit.gif"

 

 

onclick="openTabbedContacts('<%# DataBinder.Eval(Container.DataItem, "PersonId") %>');

 

return false;"

/>

 

 

 

</ItemTemplate>

 

 

<ItemStyle Width ="50px" HorizontalAlign="Left" />

 

 

<HeaderStyle Width ="50px" HorizontalAlign="Left" />

 

 

</radG:GridTemplateColumn>

 


<

<

radG:GridBoundColumn

 

.......
.........
....

</

radG:GridButtonColumn>

 

 

</Columns>

 


 

<CommandItemTemplate>

 

 

<table width="100%" style="border-right: #003333 thin solid; border-top: #003333 thin solid; padding-bottom: 2px; margin: 1px; border-left: #003333 thin solid; padding-top: 2px; border-bottom: #003333 thin solid" >

 

 

<tr>

 

 

<td align="left" style="width: 50%">

 

 

<asp:LinkButton ID="LinkButton2"

 

 

runat="server"

 

 

 

OnClientClick="openUnallocatedContacts('<%= OwnerId %>');return false;">

 

 

<img style="border:0px"

 

 

alt=""

 

 

src="../../RadControls/Grid/Skins/AddRecord.gif"

 

 

/>Allocate Contacts to Plan

 

 

</asp:LinkButton>

 

 

</td>

 

 

<td align="right" style="width: 50%">

 

 

<asp:LinkButton ID="LinkButton4"

 

 

runat="server"

 

 

CommandName="Re bindGrid"

 

 

>

 

 

<img style="border:0px"

 

 

alt=""

 

 

src="../../RadControls/Grid/Skins/Refresh.gif" />

 

Refresh

</asp:LinkButton>

 

 

</td>

 

 

</tr>

 

 

</table>

 

 

 

</CommandItemTemplate>

 




and the RadWindow as such..From the Edit col calls the Function

<

body topmargin=0 leftmargin=0 >

 

 

<form id="form1" runat="server" >

 

 

<asp:scriptmanager ID="Scriptmanager1" runat="server"></asp:scriptmanager>

 

 

<script language="javascript" type="text/javascript">

 

 

 

function GetRadWindow()

 

{

 

var oWindow = null;

 

 

if (window.radWindow) oWindow = window.radWindow;

 

 

else if (window.frameElement.radWindow) oWindow = window.frameElement.radWindow;

 

 

return oWindow;

 

}

 

 

function CloseOnReload()

 

{

RefreshParentPage();

 

 

 

//Use this to get around the IE7 "Close, are you sure" dialog

 

 

window.opener = self;

window.open(

'~/CloseDummyIE7.htm', '_self');

 

window.close();

}

 

function RefreshParentPage()

 

{

GetRadWindow().BrowserWindow.location.reload();

}

 

 

function openTabbedContacts(Id)

 

{

 

 

var urlExtn = "ms=" + new Date().getTime();

 

 

var oWnd = radopen("ContactTabbedDetails.aspx?" + urlExtn + "&ContactsID="

 

+ Id +

"&OwnerId=" + <%= OwnerId %> , "TabCRM" );

 

}

 

 

</script>

 




<div>

 

<table class="tblGradnt800" width="100%" height="500px">

 

 

<tr>

 

 

<td

 

 

class ="TDInnerRowStyle_left">

 

 

<radG:RadGrid ID="GrvContacts" 

 

runat

="server"

 

 

 

 

EnableAJAX ="true"

 

 

 

 

EnableOutsideScripts="True"

 

 

.........................etc

</radgrid>

<%

--

 

 The button event  responsible for calling the JavaScript function  to close and reload the parent page 

--

%>

 


<

tr>

 

 

<td align="right" height="20">

 

 

<asp:Button ID="Button1"

 

 

runat="server"

OnClick="btnSavePDetl_Click"  

 

 

OnClientClick="CloseOnReload()"

 

 


Style
="position: relative"

 

 

CssClass="GradntButton"

 

 

Text="Save&Close" />

 

 

</td>

 

 

</tr>

 

 

</table>

 

 

</div>

 

 

</form>

 

</

body>

 

</

html>

 



If anyone can be of help...greatly appreciated.
Thanks
Neal
Neal
Top achievements
Rank 1
 asked on 06 Nov 2008
2 answers
145 views
Hi.. i have problem.. everything is rendering as it should. Postback occures and in button handler i get 0 files..

ascx code:
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="UploadItemGalleryImage.ascx.cs" Inherits="IpitchitWeb.UserWebControls.UploadItemGalleryImage" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<%@ Register Assembly="Microsoft.Web.GeneratedImage" Namespace="Microsoft.Web" TagPrefix="generatedImg" %>
<%@ Register Namespace="Microsoft.Web" TagPrefix="generatedImg" %>

<telerik:RadUpload ID="RadUpload1" runat="server"
MaxFileInputsCount="10" AllowedFileExtensions="gif, jpg, png"
    MaxFileSize="5120000" OverwriteExistingFiles="True">
</telerik:RadUpload>
<telerik:RadProgressArea ID="RadProgressArea1" Runat="server">
</telerik:RadProgressArea>
<telerik:RadProgressManager ID="RadProgressManager1" Runat="server" />
<asp:Button ID="btnUploadFiles" runat="server" onclick="UploadFinished"
    Text="Upload files to gallery" />

<telerik:RadAjaxPanel runat="server" ID="galleryPanel">
<div>
    <asp:Label runat="server" ID="AlbumNameLabel" AssociatedControlID="AlbumName"></asp:Label>
    <asp:TextBox runat="server" ID="AlbumName" Text='<%# AlbumTitle %>'></asp:TextBox>
</div>
<div>
    <asp:Label runat="server" ID="AlbumDescriptionTitle" AssociatedControlID="AlbumDescriptionText">Album description:</asp:Label>
    <asp:TextBox runat="server" ID="AlbumDescriptionText" Text='<%# AlbumDescription %>'></asp:TextBox>
</div>
<div>
    <asp:Button runat="server" ID="btnSaveAlbumDetials" Text="Save album details" />
</div>
<asp:DataList runat="server" ID="Gallery" DataSourceID="TempGalleryDataSource" Visible="false">
<HeaderTemplate>
<div>Album</div>
</HeaderTemplate>
    <ItemTemplate>
        <div>
            <asp:Label runat="server" ID="imageAlbumTitle"></asp:Label>
            <generatedImg:GeneratedImage ImageHandlerUrl="~/Handlers/GetThumbnail.ashx" runat="server" AlternateText='<%# Eval("Filename")  %>'>
                <Parameters>
                    <generatedImg:ImageParameter Name="Width" Value="200" />
                    <generatedImg:ImageParameter Name="Height" Value="200" />
                    <generatedImg:ImageParameter Name="Path" Value='<%# Eval("Filename") %>' />
                    <generatedImg:ImageParameter Name="UseFileSystem" Value="False" />
                    <generatedImg:ImageParameter Name="CacheToServer" Value="True" />
                    <generatedImg:ImageParameter Name="CacheToClient" Value="True" />
                </Parameters>
            </generatedImg:GeneratedImage>
            <div>
                <span>Main item image:</span>
                <asp:LinkButton runat="server" CommandName="MakeFrontImage" CommandArgument='<%# Eval("ImageId") %>'></asp:LinkButton>
            </div>
        </div>
    </ItemTemplate>
</asp:DataList>
<asp:Button runat="server" ID="btnUpdateGalleryImage" Text="Update Gallery" />
</telerik:RadAjaxPanel>
<data:TempGalleriesDataSource runat="server" ID="TempGalleryDataSource"
 EnableCaching="false" EnablePaging="false" SelectMethod="GetByFolderId">
    <Parameters>
        <%--<data:CustomParameter Name="FolderId" Type="Int32" Value='<%# FolderId %>' />--%>
    </Parameters>
</data:TempGalleriesDataSource>

codebehind:
namespace IpitchitWeb.UserWebControls
{
    public partial class UploadItemGalleryImage : System.Web.UI.UserControl
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            //Ipitchit.Data.DataRepository.OriginalImagesProvider.GetAll()

        }

        private string storePath;

        /// <summary>
        /// Virtual path for temp folder and that doesn't include Galleries path. Creates folder if it doesn't exist.
        /// </summary>
        public String StorePath
        {
            get { return storePath; }
            set {
                storePath = value;
                storePath = Ipitchit.Helper.ImageProcessing.ConvertToServerPath(storePath);
                string syspath = storePath + "\\Galleries";
                RadUpload1.TargetPhysicalFolder = syspath;

                if (!System.IO.Directory.Exists(syspath))
                {
                    try
                    {
                        System.IO.Directory.CreateDirectory(syspath);
                    }
                    catch (System.Exception ex)
                    {
                        throw ex;
                    }
                }
                RadUpload1.TargetPhysicalFolder = syspath;
            }
        }

        public int Width { get; set; }
        public int Height { get; set; }

        private Guid folderId;
        public Guid FolderId
        {
            get
            {
                if (ViewState["folderId"] != null)
                {
                    folderId = new Guid(ViewState["folderId"].ToString());
                }
                return folderId;
            }
            set {
                folderId = value;
                ViewState["folderId"] = folderId.ToString();
            }
        }

        public string AlbumTitle { get; set; }

        public string AlbumDescription { get; set; }

        protected void UploadFinished(object sender, EventArgs e)
        {
            //upload finished.. ready to save files to folders.
            // Galeries folder is tempfolder + \Galleries

            string SavePath = Server.MapPath(storePath + "/Galleries/");
            //TempFolders savelocation = DataRepository.TempFoldersProvider.GetByFolderid(FolderId);
            //we know where we will save files.. now we must save them and rezise them correctly.

            foreach (Telerik.Web.UI.UploadedFile file in RadUpload1.UploadedFiles)
            {
                string filename = SavePath + Guid.NewGuid().ToString() + "." + file.GetExtension();
                int Width = 600;
                int Height = 600;
              
                //saving temp image to database.
                var originalImage = new OriginalImages();
                Ipitchit.Helper.ImageTransformInfo transformation = Ipitchit.Helper.ImageProcessing.SaveImageAsResized(filename, file.InputStream, Width, Height);
                originalImage.Size = transformation.OriginalImage.ImageByteBuffer.Length;
                originalImage.Width = transformation.OriginalImage.Image.Width;
                originalImage.Height = transformation.OriginalImage.Image.Height;
                originalImage.StorageWidth = transformation.ResizedImage.Image.Width;
                originalImage.StorageWidth = transformation.ResizedImage.Image.Height;
                originalImage.Uploader = this.Page.User.Identity.Name;
                originalImage.Created = DateTime.Now;
                originalImage.Filename = filename;
                originalImage.Alt = AlbumTitle;
                originalImage.AlbumTitle = AlbumTitle;
                originalImage.AlbumDescription = AlbumDescription;
                originalImage.AlbumOrder = 0;
                DataRepository.OriginalImagesProvider.Insert(originalImage);

                //saving gallery..
                var tempgallery = new TempGalleries();
                tempgallery.FolderId = this.FolderId;
                tempgallery.CreatedDate = DateTime.Now;
                tempgallery.ValidDate = DateTime.Now.AddHours(1);
                tempgallery.IsFront = false;
                tempgallery.ImageId = originalImage.ImageId;
                DataRepository.TempGalleriesProvider.Insert(tempgallery);
            }
            var folderparameter = new Ipitchit.Web.Data.CustomParameter("FolderId", FolderId.ToString());
            folderparameter.Type = TypeCode.String;

            TempGalleryDataSource.Parameters.Add(folderparameter);
            
            Gallery.Visible = true;
            Gallery.DataBind();
        }
    }
}

***********************************************
            foreach (Telerik.Web.UI.UploadedFile file in RadUpload1.UploadedFiles) is 0. so no files in postback???




Paul
Telerik team
 answered on 06 Nov 2008
3 answers
228 views
I'm watching this video:
http://www.asp.net/learn/mix-2008-presentations/video-307.aspx

He talks quite extensively about using telerik's dynamic data templates.

Where can I get those?

thanks.
Sebastian
Telerik team
 answered on 06 Nov 2008
3 answers
223 views
For some reason, I only get TextChanged to fire if I switch between design/html source mode before hitting my submit button. The entire control is embedded within a regular <asp:UpdatePanel ...> If I take the editor out of the update panel, the initial postback is fine and the .Content/.Text properties have their values. Does RadEditor-Ajax play nice with UpdatePanels? I'm using build version 1001 in a ASP.net 3.5 web project.

        <asp:ScriptManager ID="ScriptManager1" runat="server" EnablePartialRendering="true"></asp:ScriptManager> 
        <asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Always"
            <Triggers> 
                <asp:AsyncPostBackTrigger ControlID="btnSubmit" EventName="Click" /> 
            </Triggers> 
            <ContentTemplate> 
                <telerik:RadEditor  
                    runat="server"  
                    ID="RadEditor1"  
                    Visible="true"  
                    Skin="Default"  
                    ToolbarMode="Default">  
                    <Tools> 
                        <telerik:EditorToolGroup Tag="FirstBar"
                            <telerik:EditorTool Name="Cut" />                     
                            <telerik:EditorTool Name="Copy" /> 
                            <telerik:EditorTool Name="Paste" /> 
                            <telerik:EditorSeparator /> 
                            <telerik:EditorTool Name="Undo" /> 
                            <telerik:EditorTool Name="Redo" /> 
                            <telerik:EditorSeparator /> 
                            <telerik:EditorTool Name="FindAndReplace" /> 
                            <telerik:EditorTool Name="AjaxSpellCheck" /> 
                            <telerik:EditorSeparator /> 
                            <telerik:EditorTool Name="Bold" />                     
                            <telerik:EditorTool Name="Italic" /> 
                            <telerik:EditorTool Name="Underline" />    
                        </telerik:EditorToolGroup>   
                    </Tools> 
                </telerik:RadEditor>                  
            </ContentTemplate>  
        </asp:UpdatePanel> 
        <br /> 
        <asp:Button ID="btnSubmit" runat="server" Text="Submit" CausesValidation="true" />    

Rumen
Telerik team
 answered on 06 Nov 2008
1 answer
210 views
Hello,

I will be upgrading our existing ASP.NET rotator to the new ASP.NET Ajax rotator is their an upgrade guide to accomplish this. I have noticed that a few of the properties are no longer available such as. I need to set the below properties pragmatically.


rotator1.TransitionType

rotator1.TransitionEffect
 
rotator1.SmoothScrollDelay
rotator1.UseSmoothScroll
rotator1.AutoPostBack

Kyle

 

Shinu
Top achievements
Rank 2
 answered on 06 Nov 2008
Narrow your results
Selected tags
Tags
+? more
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?