Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
93 views
Hello
In an aspx project, I have two (very similar) pages that use a number of Telerik controls.
In both pages foreign chars like ó, é   (vowels with tilde) are directy types for example in labels, and some other places
However, in one of the pages these characters display ok, in the other page they display as square boxes.

I am not using resource files, and cannot find any significant differences in the encoding, neither in aspx or aspx.vb files. Both pages use the same master page.
I attach the screenshots (screenok, screenbad) and the respective code (codeok, codebad).

Of course if I use HTML encoding (ó instead of ó) they show ok in every case, but it is a real pain...
What am I missing?

TIA
Oscar
Top achievements
Rank 1
 answered on 11 Apr 2010
6 answers
219 views

Grid simply messes up with Safari, nothing simular to what we see on IE8..

Have searched this site, but cannot find out if Teleriik support safari or not?
There ar enumerious posts on this forum, but does anyone have a definative reference to support for Safari, before submiting bugs..

Thanks
Ray..

Ray
Top achievements
Rank 1
 answered on 11 Apr 2010
1 answer
197 views
I have used Telerik products for years, including the combobox.  But I am having a problem I cannot figure out.

I have a combo box that is populated from an arraylist at page load...

===============================================================================
Page load event code to load combo box:

nopCommTopic.Items.Clear()

RCBI =

New RadComboBoxItem()

 

RCBI.Text =

"Select a topic..." & ",0"

 

RCBI.Value = 0

RCBI.Selected =

True

 

nopCommTopic.Items.Add(RCBI)

 

For Each Nop_Topic_Data In Nop_Topic_Arry

 

    RCBI =

New RadComboBoxItem()

 

    RCBI.Text = Nop_Topic_Data.Name &

", " & Nop_Topic_Data.TopicID.ToString

 

    RCBI.Value = Nop_Topic_Data.TopicID

    nopCommTopic.Items.Add(RCBI)

 

Next

 

 

 

 

 


===============================================================================



The page contains a button for execution after the user selects an item from the above combo box.  After the button is clicked, the code retrieves the selected value from the combo box and then continues processing.  The problem is that the selected value test (see code immediately below) always gets a 0 for the selectedvalue no matter which item in the combo box is selected.  It also does not matter how many different entries in the combo box that you select before pressing the processing button.

The .aspx page code for the combo is shown further below.  It's pretty simple.


===============================================================================
button click event code:

 

 

' Verify that the user did select a topic to translate and save it if they did

 

 

Dim iTopic As Integer = 0

 

 

If Me.nopCommTopic.SelectedValue = 0 Then

 

 

Me.PageErrors.Text = "You must select a topic to translate from the list!"

 

 

Exit Sub

 

 

End If

 

iTopic = nopCommTopic.SelectedValue
===============================================================================

===============================================================================
related code from .aspx page:

 

<

 

telerik:RadComboBox ID="nopCommTopic" Skin="NeoClassic" EnableEmbeddedSkins="false" runat="server"></telerik:RadComboBox>

 

 

<br />

 

 

<br />

 

 

<asp:Button ID="TranslateTopic" runat="server" Text="Translate Selected Topic" />

 

 

 

 

 

===============================================================================

Can you help me figure out what is wrong?

Thanks in advance!  I feel so stupid, but I cannot figure this out.  I must be missing something really basic!

Lynn

Lynn
Top achievements
Rank 2
 answered on 11 Apr 2010
0 answers
90 views
Here is what i want to say in better view
Input
http://i44.tinypic.com/35copol.jpg
output
http://i39.tinypic.com/15bl1l.jpg
anshul kumar
Top achievements
Rank 1
 asked on 11 Apr 2010
0 answers
161 views

Hi,
I want display all image after upload, i like use upload silverlight . All step:
    1- Upload
    2- Generate thumbnail (now for testing, i just do copy to new file with prefix aa_)
    3- Display all thumbnail.

I have a problem at step 3. the last thumbnail not display, i have to right click --> choose 'show picture'.

#aspx

<telerik:RadPane ID="RadPane2" runat="server" Width="300" BorderWidth="3" BorderColor="ActiveBorder">  
             <input type="hidden" runat="server" id="UploadedFilesJson" /> 
             <center> 
             <object data="data:application/x-silverlight," type="application/x-silverlight-2" width="280" height="120" > 
                <param name="source" value='<%= ResolveUrl("~/Upload.xap") %>'/>  
                <param name="onerror" value="onSilverlightError" /> 
                <param name="background" value="white" /> 
                <param name="minRuntimeVersion" value="2.0.31005.0" /> 
                <param name="windowless" value="true" /> 
 
                <param name="autoUpgrade" value="true" /> 
                <param name="InitParams" value='<%= InitParameters %>'  /> 
 
                <a href="http://go.microsoft.com/fwlink/?LinkID=124807" style="text-decoration: none;">  
                    <img src="http://go.microsoft.com/fwlink/?LinkId=108181" alt="Get Microsoft Silverlight" style="border-style: none"/>  
                </a> 
            </object> 
            </center> 
            <div id="uploaded-files">  
            </div> 
 
 
         </telerik:RadPane> 

#Script in aspx

<script type="text/javascript">  
            var $ = $telerik.$;  
            var uploadInProgress;  
            var uploadedFiles = new Array();  
 
              
 
            function updateHiddenField() {  
                var json = Sys.Serialization.JavaScriptSerializer.serialize(uploadedFiles);  
                $get('UploadedFilesJson').value = json;  
            }  
 
            // Fired when a file is uploaded  
            function onClientFileUploaded(json) {  
                  
                var uploadedFile = Sys.Serialization.JavaScriptSerializer.deserialize(json);  
                var A = $("<img />")  
                .attr("src", '<%= ResolveUrl(TargetFolder) %>' + uploadedFile.FileName)  
                .load(function(e) { PageMethods.CreateThumbNail(uploadedFile.FileName); })  
                ;  
                Array.add(uploadedFiles, uploadedFile);  
                  
            }  
            //Called when all files are uploaded  
            function onClientUploadFinished() {  
                updateHiddenField();  
                var image; var deleteFile; var html="";  
                for (var i = 0; i < uploadedFiles.length; i++) {  
 
                    image = '<%= ResolveUrl(TargetFolder) %>aa_' + uploadedFiles[i].FileName  
                    html += "<img id='img_"+i.toString()+"' width='150px' src='" + image + "' /><br/>";  
                    var aa = document.getElementById("uploaded-files");  
                     
                }  
                  
                aa.innerHTML = html;  
                  
 
            }  
              
              
        </script> 
#c
protected string InitParameters  
        {  
            get 
            {  
                List<string> uploadConfig = new List<string>();  
 
                uploadConfig.Add("UploadServiceUrl=" + ResolveUrl("~/RadUploadHandler.ashx"));  
                uploadConfig.Add("TargetFolder=" + ResolveUrl(TargetFolder));  
                uploadConfig.Add("AllowedExtensions=" + "Image Files(*.gif;*.jpg;*.jpeg;*.png)");  
                uploadConfig.Add("OverwriteExistingFiles=" + true);  
                uploadConfig.Add("IsAutomaticUpload=" + true);  
                uploadConfig.Add("OnClientFileUploaded=" + "onClientFileUploaded");  
                //Name of the JavaScript function that will be called when all files are uploaded.  
                uploadConfig.Add("OnClientFilesUploadFinished=" + "onClientUploadFinished");  
                  
                return String.Join(",", uploadConfig.ToArray());  
            }  
        }  
        private void PopulateUploadedFilesList()  
        {  
            if (!string.IsNullOrEmpty(UploadedFilesJson.Value))  
            {  
                DataContractJsonSerializer serializer = new DataContractJsonSerializer(typeof(List<UploadedFileInfo>));  
                UploadedFiles = (List<UploadedFileInfo>)serializer.ReadObject(new MemoryStream(Encoding.UTF8.GetBytes(UploadedFilesJson.Value)));  
                UploadedFilesJson.Value = string.Empty;  
            }  
        }  
 
        [WebMethod]  
        public static void DeleteFile(string fileName)  
        {  
            string uploadFolder = HttpContext.Current.Request.MapPath(TargetFolder);  
            File.Delete(Path.Combine(uploadFolder, fileName));  
        }  
 
        [WebMethod]  
        public static void CreateThumbNail(string fileName)  
        {              
            string uploadFolder = HttpContext.Current.Request.MapPath(TargetFolder);  
            string pathImg = Path.Combine(uploadFolder, fileName);  
            File.Copy(Path.Combine(uploadFolder, fileName), Path.Combine(uploadFolder, "aa_" +fileName));  
           //  
        } 

===
And have a problem : the upload silverlight is disable in RadWindows when using Firefox, it ok if not use in RadWindows.
===
Please view image attach
======
And would you like send to me source code of Upload Silverlight that is used at here ( the source you attached is not same that in example.) I like that used in example.

Thank you 

sohrab akhavan
Top achievements
Rank 1
 asked on 11 Apr 2010
1 answer
93 views
My RadGrid is not displayed correctly. I use the Default skin.

In Chrome the Grid is Displayed next to the command toolbar. See screenshot Chrome.jpg. When i click on one of the export buttons and the page makes a roundtrip the display is restored and everything is displayed correctly.

In IE the display is also wrong. 

Any idea's what's causing this?
Dick
Top achievements
Rank 1
 answered on 11 Apr 2010
2 answers
111 views
Hello, i think i've tried just about every option i can find to Collapse the ChildNodes of the Level==0 parent i suspect that 
is has something to do with the fact that i'm not actually using the " e " in e.Nodes.... to try and do the actual process
but i'm trying to use the actual RadTreeView ID collection itself, but the reason i'm doing that is because i want to Collapse 
all of the Level 0 AAAA node when i then select the Level 0 BBBB node for instance, so if i tried to use the " e " value
i would be pointing to the BBBB node which i what i want to expand, but before i expand it, i want to Collapse the AAAA node 
just for example. thanks for any ideas or suggestins! 

   protected void trvDB2_NodeExpand(object sender, RadTreeNodeEventArgs e)  
    {  
        foreach (RadTreeNode rtn in trvDB2.Nodes)  
        {  
            if (rtn.Level == 0 && !e.Node.Text.Equals(rtn.Text))  
            {   
                int    rntnc = rtn.Nodes.Count;  
                //Nodes   ns = rtn.Nodes.Remove();  
                //for (int index = rtn.Nodes.Count - 1; index >= 0; index--)  
                for   (int index = rtn.Nodes.Count - 1; index >= 0; index--)  
                {  
                    //string rtnrtntxt0 = rtn.Nodes[index].Text;  
                    //if (rtn.Nodes[index].Level==1)  
                    //{  
                    //    //string rtnrtntxt = rtn.Text;  
                    //    //string rntnit = rtn.Nodes[index].Text;  
                    //    rtn.Nodes.Clear();  
                    //    //rtn.Nodes[index]  
                    //    //rtn.Nodes[index];  
                    //    //rtn.Nodes  
                    //}  
                }  
                //string x = rtn.Text;  
                //IEnumerator ie =  rtn.Nodes.GetEnumerator();  
                //while (ie.MoveNext())  
                //{  
                //    ((RadTreeNode)(ie.Current)).Nodes.Clear();  
                //}  
                //foreach (RadTreeNode rtn2 in rtn.Nodes)  
                //{  
                //     //string r = rtn 
                //     //rtn2.Nodes.Clear();  
                //     //rtn2.c  
                //     //rtn2.Nodes.Clear();  
                //     //rtn.Nodes.Remove(rtn2);  
                //}  
                //rtn.Nodes.Remove();  
                //rtn.CollapseChildNodes();  
                //rtn.CollapseParentNodes();  
            }  
        }  
        for (int index = trvDB2.CheckedNodes.Count - 1; index >= 0; index--)  
        {  
            //trvDB2.CheckedNodes[index].Checked = false;  
        }  
        for (int index = trvDB2.Nodes.Count - 1; index >= 0; index--)  
        {  
            string trvnodetxt = trvDB2.Nodes[index].Text;  
            if (trvDB2.Nodes[index].Level == 0 && !e.Node.Text.Equals(trvnodetxt))  
               {  
                   trvDB2.Nodes[index].CollapseChildNodes();  
                   trvDB2.Nodes[index].Nodes.Clear();  
                   trvDB2.Nodes[index].Remove();  
               }  
        }  
        //e.Node.CollapseChildNodes();  
        //e.Node.CollapseParentNodes();  
        //PopulateNodeOnDemand(e, TreeNodeExpandMode.ServerSideCallBack);  
    } 
Bob
Top achievements
Rank 1
 answered on 11 Apr 2010
6 answers
346 views
Hi All,
I have the scheduler setup to use an 

Telerik.Web.UI.XmlSchedulerProvider

 

to look after its bookings/appointments.  This works well in that the provider handles all the inserts/updates/deletes for me.
I do, however, have a need to send a notification email to the Admin when new appointments get inserted or updated.  In this email I want to provide a link to the scheduler, passing the appointment ID in the QueryString so that the appointment in question can be highlighted.  This all works great for updates, as the ID is available in the 

 

RadScheduler1_AppointmentUpdate

Method in the e.Appointment.ID property.
The same cannot be said for 

 

RadScheduler1_AppointmentInsert

 

as the ID is null - I suppose the insert of the xmlProvider has not happened yet.

So my question is, at what point/event can I obtain the ID of the newly created Appointment?

Thanks for any help.
Steele.

Zheng Gong
Top achievements
Rank 1
 answered on 10 Apr 2010
1 answer
91 views
Hi, i have a very simple plot chart. The query returns a date and a int value.

When the int value exceeds a predetermined amount i want the point color red
If it's not possible to have different colors depending on a value, is it possible to have a red grid line at a given value.

Thanks
Rod
Rod Barrand
Top achievements
Rank 1
 answered on 10 Apr 2010
0 answers
150 views

Hello,

When I create nodes I have a problem. I have a list:

e.g.:



class Liste  
{  
    public string pfad;  
    public Liste(string pfad)  
    {  
        this.pfad = pfad;  
    }  
}  
 
....  
 
if (!IsPostBack)  
{  
    LadeWerte();  
    ZeigeTreeView();  
}  
 
.....  
 
private void LadeWerte()  
{  
liste.Add(new Liste("c:\\dateien\\nord\\stad_nord"));  
liste.Add(new Liste("c:\\dateien\\stad_test"));  
liste.Add(new Liste("c:\\dateien\\nord\\stad_sued"));  
}  
 
 

From this list, I create nodes. Here is my code:

private void ZeigeTreeView()  
    {  
        RadTreeNode rtn = new RadTreeNode("Layouts", "rootfolder");  
 
        foreach (Liste list in liste)  
        {  
            Rekursiv(rtn, list.pfad);              
        }  
 
        RadTreeView1.Nodes.Add(rtn);  
    }  
 
    private void Rekursiv(RadTreeNode node, string newnode)  
    {  
        if (newnode != "")  
        {  
            RadTreeNode rtn2 = new RadTreeNode();  
            string substr = "";  
            if (newnode.LastIndexOf("\\") > 0)  
                substr = newnode.Substring(0, newnode.IndexOf("\\"));  
            else 
                substr = newnode;  
            rtn2.Text = substr;  
            rtn2.Value = "Folder";  
            string nextnode = "";  
            if (newnode.IndexOf("\\") > 0)  
            {  
                nextnode = newnode.Substring(newnode.IndexOf("\\") + 1);  
                Rekursiv(rtn2, nextnode);  
            }  
            node.Nodes.Add(rtn2);  
        }  
    } 

I get the following structure:

+Layouts
    +c:
        +dateien
            +nord
                -stadt_nord
    +c:
        +dateien
            -stad_test
    +c:
        +dateien
            +nord
                -stad_sued

However, I want the following structure:

+Layouts
    +c:
        +dateien
        -stad_test
        +nord
            -stad_nord
            -stad_sued

Can you help me here? Nodes that should already exist are not created again. How can I do that.

Thanks

Reiner
Reiner Ebel
Top achievements
Rank 1
 asked on 10 Apr 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?