Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
183 views
Hi,
I am trying to hide and show RadComboBox.
But this code doesn't seem to be working. I checked in IE and FireFox. Thank you.





$
.ajax({  
            url
: applicationPath + "/test/Test.svc/GetResultById",  
            type
: "POST",  
            dataType
: "json",  
            data
: '{"sId":' + sender.get_value() + '}',  
            contentType
: "application/json; charset=utf-8",  
            success
: function(result)  
             
{  
                 
var combo = "<%= RadComboBox1.ClientID %>"); 
 
                 
if(result.d == false)  
                 
{  
 
                    combo
.hideDropDown();  
                 
}  
                 
else 
                 
{ 
                    combo
.showDropDown(); 
                 
} 
             
}        
nav100
Top achievements
Rank 1
 answered on 27 Jan 2011
1 answer
97 views

in my button click event i have:

StringBuilder strTXTFileBuilder = new StringBuilder();
Response.Clear();
Response.AddHeader("content-disposition", "attachment;filename="ExportResult.txt");
Response.Charset = "";
strTXTFileBuilder.Append ("FirstItem:")...... // code to populate the stringbuilder
Response.ContentType = "application/vnd.text";
StringWriter stringWrite = new StringWriter();
HtmlTextWriter htmlWrite = new HtmlTextWriter(stringWrite);
Response.Write(strTXTFileBuilder.ToString());
Response.End();

it works without RadAjaxLoadingPanel. Once I put onto the page a RadAjaxLoadingPanel, when i click on the button again i get error:
Line: 6
Error: Sys.WebForms.PageRequestManagerParserErrorException: The message received from the server could not be parsed. Common causes for this error are when the response is modified by calls to Response.Write(), response filters, HttpModules, or server trace is enabled.
Details: Error parsing near '


any idea what am i doing wrong? please help
thanks in advance
Daniel
Telerik team
 answered on 27 Jan 2011
0 answers
153 views

Hi,

I am trying to hide and show RadComboBox. I am using .hideDropDown() but it doesn't work. What could be an issue?

$.ajax({ 
            url
: applicationPath + "/test/Test.svc/GetResultById", 
            type
: "POST", 
            dataType
: "json", 
            data
: '{"sId":' + sender.get_value() + '}', 
            contentType
: "application/json; charset=utf-8", 
            success
: function(result) 
             
{ 
                 
if(result.d == false) 
                 
{ 
                  

 

                           var combo = "<%= RadComboBox1.ClientID %>");

                    combo.hideDropdown(); 
                 
} 
             
}          

nav100
Top achievements
Rank 1
 asked on 27 Jan 2011
3 answers
84 views
The bounds.x and bounds.y values for a radWindow are usually incorrect in onDragEnd event handler. Sometimes they are wildly off, sometimes by just a bit, sometimes they go up when I move the window closer to the top/left, sometimes they go down. There doesn't seem to be any logic in why they are off, or by how much, but 99.9% of the time they are incorrect. They only time they actually seem correct is when the window is first displayed, before it is actually moved.

Anyone else have this problem? Any fix for it?
Tracy Dryden
Top achievements
Rank 1
 answered on 27 Jan 2011
6 answers
107 views

I have a user control that I use for editing / inserting records for the radgrid.  Within that user control there is a radcombobox.  But, when I try to retrieve the selectedvalue like so:    locationTypeCode = rcmLocationType.SelectedValue, it returns null. Why is that?  the next line below is retrieving the value from a radtextbox like locationName = rtbLocationName.Text,  which works fine.  so, is there a bug with the combobox?  I CAN retrieve the selected TEXT like this:  rcmLocationType.Text, but I do not want the text, I want the selected value.  So what is the workaround or code to access the selected value in the combobox?

thanks.

Veli
Telerik team
 answered on 27 Jan 2011
1 answer
196 views
Hi Guys,

Hope you can help me with this.

I got a Grid with a GridTemplateColumn and other informational columns, and inside the GridTemplateColumn is a ImageButton that will execute a function that will open documents. Here is the code:
Public Sub OpenDocument(ByVal sAttachmentPath As String)
    Dim sAttachmentExt As String
    Response.Clear()
    Response.ClearHeaders()
    Response.ClearContent()
    sAttachmentExt = sAttachmentPath.Substring(sAttachmentPath.LastIndexOf(CChar(".")))
    Try
        Select Case sAttachmentExt
            Case ".doc"
                Response.ContentType = "application/msword"
            Case ".docx"
                Response.ContentType = "application/vnd.openxmlformats-officedocument.wordprocessingml.document"
            Case ".xls"
                Response.ContentType = "application/vnd.ms-excel"
            Case ".xlsx"
                Response.ContentType = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
            Case ".ppt"
                Response.ContentType = "application/vnd.ms-powerpoint"
            Case ".pptx"
                Response.ContentType = "application/vnd.openxmlformats-officedocument.presentationml.presentation"
            Case ".pdf"
                Response.ContentType = "application/pdf"
            Case ".html"
                Response.ContentType = "application/html"
            Case ".txt"
                Response.ContentType = "application/plain"
            Case ".zip"
                Response.ContentType = "application/zip"
            Case ".rar"
                Response.ContentType = "application/rar"
            Case ".gif"
                Response.ContentType = "application/gif"
            Case ".jpg"
                Response.ContentType = "application/jpeg"
            Case ".png"
                Response.ContentType = "application/png"
            Case ".swf"
                Response.ContentType = "application/x-shockwave-flash"
            Case ".mpeg"
                Response.ContentType = "application/mpeg"
            Case ".avi"
                Response.ContentType = "application/x-msvideo"
            Case Else
                Response.ContentType = "application/plain"
        End Select
 
        Response.AddHeader("Content-Disposition", "attachment;filename=" & sAttachmentPath)
        Dim sourcefile As FileStream = New FileStream(sAttachmentPath, FileMode.Open)
 
        Dim FileSize As Integer
        FileSize = sourcefile.Length
        Dim getContent() As Byte = New Byte(FileSize - 1) {}
 
        sourcefile.Read(getContent, 0, CInt(sourcefile.Length))
        sourcefile.Close()
        Response.BinaryWrite(getContent)
        Response.Flush()
 
    Catch ex As Exception
        Throw ex
    Finally
        Response.End()
    End Try
End Sub

All work fine for the first time. But as soon I do a sorting of columns or filtering or change page, the Response.End() gives me an error of "Unable to evaluate expression". As a postback is made it start working again. Also I used HttpContext.Current.ApplicationInstance.CompleteRequest instead of Response.End() to see if continue working, in this case the error is not given, but still doesn't open the document. I know this is not a error of yours, but maybe there's something I could set to the grid to let me do what i need. Please let me know if you need any other information.

Thanks,
Josue
Veli
Telerik team
 answered on 27 Jan 2011
6 answers
110 views
Hi,

I have the collation of my database as CI_AI. While the query I use returns the expected records from db,
when they are returned in the radcombobox, the records listed are fewer. Whatever I do, the returned results are
somehow being filtered with accent sensitive properties.

Anyone seen this before?

Thank you
Francisco
Top achievements
Rank 1
 answered on 27 Jan 2011
3 answers
147 views
Hi

We're experiencing slow inital loads when using the RadScriptManager EnableScriptCombine feature if there is moderate load on the page. 

Why is the combining so slow? How can I speed it up? And why are other websites on the same server experiencing this slowdown aswell?
Page A under load, Page B with EnableScriptCombine enabled slows down.

I found the thread about disabling it and/or using a CDN. CDN isn't an option and disabling the combining results in ~20 more requests. 

Thanks
Simon
Telerik team
 answered on 27 Jan 2011
1 answer
450 views
When displaying, the RadComboBox is selecting the wrong font.

Configuration is:

<telerik:RadComboBox ID="radcomboboxRealEstateManager" runat="server" CssClass="mainFormInput" Skin="Telerik" Width="220px" DataTextField="Name"  DataValueField="UserID" Font-Names="Calibri, Arial, sans-serif">

In Firefox it displays per Formatting Issue image attached. In IE8 it falls back to the telerik style (see fontstyle inheritence image attached).

However, as can be seen in the fontstyle inheritance image, for some reason the RadComboBox control is rendering the Font-Names (to Styles="font-family") without the commas and spaces (which results in the odd output).

The version of the controls being used is 2010.2.713.35. I'd guess I'm likely to have to upgrade the controls (which is less than ideal as typically this causes all sorts of problems).

D
Kalina
Telerik team
 answered on 27 Jan 2011
2 answers
88 views
I use a tab strip created on demand with content in pageviews create on demand.
These pageviews contain some panels containing all controls created runtime and some  upload external pages.
I have to manage these edit controls created at runtime to click on a button, going to change the style of the textbox, but I can not handle it.

I can create as many pageviews their content created runtime all at once, or do I create content only event RadMultiPage1_PageViewCreated?
Help me please
Silvia
Luigi
Top achievements
Rank 1
 answered on 27 Jan 2011
Narrow your results
Selected tags
Tags
+124 more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?