Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
133 views
Hi guys,

There is a radcombobox and an asp checkbox in my page. On unchecking the asp checkbox, i want to remove all items from the radcombobox drop down. I tried using a javascript code and loop through all the items and access each one to delete, but it was not successful. I need a working javascript code.

Thanks,
Needha
Shinu
Top achievements
Rank 2
 answered on 05 Jun 2013
2 answers
88 views
Hi,

I'm using Js code to clone a dockzone and append it to a div:

  dockZone = $find("<%=RadDockZone_Empty.ClientID %>").clone();
                   dockZoneElement = dockZone.get_element();
                   $telerik.$(dockZoneElement).css("display", "block");
                   $telerik.$(dockZoneElement).css("width", "100%");
                   $telerik.$(dockZoneElement).css("min-height", "155px");
  document.getElementById("test").appendChild(dockZoneElement);

Then I want to save the layout using StorageProvider.
' save the raddocklayout
RadDockLayout1.StorageProvider.SaveStateToStorage(
"123456", SaveState)


Private Function SaveState() As String
        Dim dockStates As List(Of DockState) = RadDockLayout1.GetRegisteredDocksState()
        Dim serializer As New JavaScriptSerializer()
        Dim converters As New List(Of JavaScriptConverter)()
        converters.Add(New UnitConverter())
        serializer.RegisterConverters(converters)
 
        Dim stateString As String = [String].Empty
        For Each state As DockState In dockStates
            Dim ser As String = serializer.Serialize(state)
            stateString = stateString + "|" + ser
        Next
        Return stateString
     End Function

However the client-side created dockzones and the docks inside the dockzones are not saved.

I assume the client-side created dockzone cannot be handled by the code-behind's GetRegisteredDocksState ?

What is the correct method to save the client-side cloned dockzone to the database or to get the serializedState ?

Thanks.


Slav
Telerik team
 answered on 05 Jun 2013
9 answers
512 views
I am currently using Telerik RadControls for ASP.net Ajax Version 2012.3.1308.45,
When I set a MaxLength for RadTextBox to 255, everything works correctly except when Copy and Paste text or using mouse right click to paste text into the RadTextBox, it allow the line break '\n\r'  to bypass the MaxLength count.
Somehow from runtime value, I check and compare the length is more than the MaxLength.
This senarios happens in all sorts of browser (FF, IE, Chrome) and even in the Demo site,
I don't understand if this is the correct behaviour or bugs based on the calculation logic.

I would need to include the count for line break '\n\r' as well else it will hit SQL length limit to cause insert or edit error.
What else can I do to cater this?
Eyup
Telerik team
 answered on 05 Jun 2013
1 answer
318 views
Hi All,

I have radtextbox and combobox in a single page. i am using ItemsRequested for radcombobox.
i enter text in radtextbox and i click radcombobox ItemsRequested event.  but i am not able to get radtextbox text in ItemsRequested event.
but i want to get radtextbox value in ItemsRequested event. is there any way. it's very important. Please any one help me ASAP.



Thanks,
Dhamodhran.S
Shinu
Top achievements
Rank 2
 answered on 05 Jun 2013
1 answer
116 views
I just uninstalled all my old telerik controls and installed the latest version of winforms 2013.1.321.0.

I working on a project that I haven't touched in a couple of years.  When I opened out the c# project I get many errors.

RadListBoxItem was giving me an error so I changed it to RadListDataItem and the error went away.  I haven't been able to view my forms because I have so many errors. 

This is the error i'm stuck on now and if anyone can help it would be greatly appreciated. 
This is my code previously

RadListBoxItemCollection itemsToMove = new RadListBoxItemCollection();

and I get this error:

Error    2    The type or namespace name 'RadListBoxItemCollection' could not be found (are you missing a using directive or an assembly reference?)   

I changed the code to
RadListDataItemCollection itemsToMove = new RadListDataItemCollection();

and this is the error i'm getting.

Error    2    'Telerik.WinControls.UI.RadListDataItemCollection' does not contain a constructor that takes '0' arguments   

Thank you



Stefan
Telerik team
 answered on 05 Jun 2013
5 answers
255 views
I have a rad grid that when exported to excel it gives the following error:

"The file you are trying to open [filename].xls, is in a different format than specified by the file extension. Verify that the file is not corrupted and is from a trusted source before opening the file. Do you want to open the file now?"

What can I do to resolve this error?


Princy
Top achievements
Rank 2
 answered on 05 Jun 2013
2 answers
115 views
Hello,

In the attached chart i have marked first and last bar series with Red color.
Why it is not fully displayed?

Guide me, its urgent

Thank you
Jayanthi
jayanthi
Top achievements
Rank 1
 answered on 05 Jun 2013
1 answer
88 views
Hi!

is there a decent tutorial for creating background images for use in controls such as RadTabStrip?

Kate
Telerik team
 answered on 05 Jun 2013
2 answers
372 views
Hello telerik team,

I am rad async Upload control...I loaded image  but, I want to reduce pixel size ,i am uploaded picture  how much width and height must and should ..I want to store image in the following pixel sizes "100 width *30 height " ....how reduce pixel size...provide some snippet to me.

  <telerik:RadAsyncUpload runat="server" ID="ImgImages2" AllowedFileExtensions=".jpg,.jpeg,.png,.gif"
                            MaxFileInputsCount="1" Skin="Outlook" Width="350px" PostbackTriggers="PerformInsertButton" />
Insert()

  byte[] fileData;
        if (ImgImages.UploadedFiles.Count > 0)
        {
            UploadedFile file = ImgImages.UploadedFiles[0];
            fileData = new byte[file.InputStream.Length];
            string ImgFileName1 = ImgImages.UploadedFiles[0].FileName;
            file.InputStream.Read(fileData, 0, (int)file.InputStream.Length);
            if (fileData.Length > 1048576)
            {
                RadWindowManager1.RadAlert("The length of the uploaded file must be less than 1 MB", 300, 100, "Check SetUp Signature", null);
                return;
            }
            //string ImgFileName = ImgImages.UploadedFiles[0].FileName;
            oCheck.ImgFileName = ImgFileName1;
            oCheck.Signature = fileData;

        }

How reduce pixel size provide some snippet. and how to covert   "radasyncfile.upload[0].file" to "Image "  fro the above one.
Hristo Valyavicharski
Telerik team
 answered on 05 Jun 2013
5 answers
196 views
Does anyone have any sample code to create a candlestick chart through code.  I've got the date in a datatable and i'm trying to configure the chart.  

ChartSeries s = new ChartSeries();
            s.Type = ChartSeriesType.CandleStick;
            s.DataLabelsColumn = "Date";
            s.DataYColumn = "Open";
            s.DataYColumn2 = "High";
            s.DataYColumn3 = "Low";
            s.DataYColumn4 = "Close";
            
this.chart1.Series.Add(s);
Ves
Telerik team
 answered on 05 Jun 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?