Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
34 views
1 answer
57 views

Hi,

 

I am  facing an issue with our application, the checkbox inside the Telerik  Radgrid in our application is not unchecking when it is clicked first time (as per the business logic the  grid will be loaded as few rows checked. And this issue occurring only in this scenario).  But it is unchecking on the second time clicked.  This issue we got after migrating the  application from .Net 3.5 to 4.0.

In our 3.5 application  grid is working fine in the above said scenario. we have  tried with  4.0 Telerik and Spring DLL ‘s, still we are facing the same issue.

Maria Ilieva
Telerik team
 answered on 10 Dec 2012
1 answer
94 views
Hi,

I am using a rad grid which is having a CheckBox column and with multiselection. Paging is enabled for the grid. If user selects one or more row in the grid and clicks on next or prev page button in the pager. A confirmation message should be displayed to user. If user clicks on "OK" in the confirmation message, i would like to perform operation(delete) and page should be changed (user should be redirected to next page), if he clicks on cancel, selection should be cleared and page should be changed.

Can you please help me with this scenario? A code sample will be of great help.

Thanks.
Angel Petrov
Telerik team
 answered on 10 Dec 2012
2 answers
216 views
Hello.

We have a problem.

If I input special character  "<br/>" or "<a>" into RadTextbox and submit data,

server exception error raised  "System.Web.HttpRequestValidationException"

please let me know how can I solve this problem.
Maria Ilieva
Telerik team
 answered on 10 Dec 2012
1 answer
139 views
i have a radGrid that contains a 'Download file' button, that downloads file from server. The grid has a RadAjax Loading panel that shows a loading icon while time consuming operations are being performed.

The Loading icon works in all cases but interferes with Download functionality. when i select download, the loading icon appears indefinitely & after sometime the following error is displayed:

The data necessary to complete this operation is not yet available.

Detailed 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.

Following is my code:


////////////////////////////This is for RadAjax Loading panel//////////////

<telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
        <script type="text/javascript">
            function centerLoadingPanel()
             {                
                  centerElementOnScreen($get("<%= RadAjaxLoadingPanel1.ClientID %>"));
             }
           function centerElementOnScreen(element)
            {
               var scrollTop = document.body.scrollTop;
                var scrollLeft = document.body.scrollLeft;
                var viewPortHeight = document.body.clientHeight;
                var viewPortWidth = document.body.clientWidth;
                if (document.compatMode == "CSS1Compat") {
                    viewPortHeight = document.documentElement.clientHeight;
                    viewPortWidth = document.documentElement.clientWidth;
                   if (!$telerik.isSafari) {
                        scrollTop = document.documentElement.scrollTop;
                        scrollLeft = document.documentElement.scrollLeft;
                    }
               }
                var topOffset = Math.ceil(viewPortHeight / 2 - element.offsetHeight / 2);
                var leftOffset = Math.ceil(viewPortWidth / 2 - element.offsetWidth / 2);
                var top = scrollTop + topOffset - 40;
                var left = scrollLeft + leftOffset - 70;
                element.style.top =  "0px";
                element.style.left = "0px";
                var loadingImage = document.getElementById('<%= RadAjaxLoadingPanel1.FindControl("Image11").ClientID %>');
                loadingImage.style.left = "100px";
            }
            function RequestStart(sender, eventArgs) 
            {
               
                var loadingImage = document.getElementById('<%= RadAjaxLoadingPanel1.FindControl("Image11").ClientID %>');
                var panel1 = $get("<%= PagerPanel.ClientID %>");
                           if (document.documentElement.scrollHeight > document.documentElement.clientHeight) {
                    $get("<%= RadAjaxLoadingPanel1.ClientID %>").style.height = document.documentElement.scrollHeight + "px";
                }
            }
         
        </script>
    </telerik:RadCodeBlock>
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
<ClientEvents OnRequestStart="centerLoadingPanel()"  />
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="PagerPanel" >          
                <UpdatedControls >
                    <telerik:AjaxUpdatedControl  ControlID="PagerPanel" LoadingPanelID="RadAjaxLoadingPanel1"  UpdatePanelHeight="100%" UpdatePanelRenderMode="Block"  ></telerik:AjaxUpdatedControl>
                </UpdatedControls>               
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>
<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server"  Transparency="0"  EnableSkinTransparency="false" Direction="LeftToRight" ZIndex="-1"    BackgroundPosition="Center"   IsSticky="true" CssClass="MyModalPanel" Height="100%"   >
                    <div class="loading">
                     <table  style=" background-color:White; color:White;height:150px; width:311px; vertical-align:middle " >
                         <tr align="center" >
                             <td align="center" >
                                <img src="~/images/XS-Docs_WaitAnimation.gif"  id="Image11" runat="server" alt="img"  />               
                             </td>
                         </tr>
                     </table>
                   </div>
    </telerik:RadAjaxLoadingPanel>


//////////////////////////THis is for Download file code///////////////////

   public bool DownloadFile(string methodname, object[] obj)
        {
            string URi = ConfigurationManager.AppSettings["ServiceURL"].ToString();
           
            WebClient proxy = new WebClient();

            byte[] abc = proxy.DownloadData((new Uri(URi)));
            
            MemoryStream strm = new MemoryStream(abc);

            if (abc.Length > 0)
            {
                string _DownloadableProductFileName = obj[2].ToString();
                BinaryReader _BinaryReader = new BinaryReader(strm);
                long startBytes = 0;
                HttpContext.Current.Response.Clear();
                HttpContext.Current.Response.Buffer = false;
                HttpContext.Current.Response.AddHeader("Accept-Ranges", "bytes");
                //Set the ContentType

                string Content_Type = "";
                if (obj[1].ToString() == "PDF")
                    Content_Type = "application/pdf";
           
                HttpContext.Current.Response.ContentType = Content_Type;

                //Add the file name and attachment, 
                //which will force the open/cancel/save dialog to show, to the header
                HttpContext.Current.Response.AddHeader("Content-Disposition", "attachment;filename=" + _DownloadableProductFileName);

                //Add the file size into the response header
                HttpContext.Current.Response.AddHeader("Content-Length", (strm.Length - startBytes).ToString());
                HttpContext.Current.Response.AddHeader("Connection", "Keep-Alive");

                //Set the Content Encoding type
                HttpContext.Current.Response.ContentEncoding = System.Text.Encoding.UTF8;

                //Send data
                _BinaryReader.BaseStream.Seek(startBytes, SeekOrigin.Begin);
                int maxCount = (int)Math.Ceiling((strm.Length - startBytes + 0.0) / 1024);
                int i;
                for (i = 0; i < maxCount && HttpContext.Current.Response.IsClientConnected; i++)
                {
                    HttpContext.Current.Response.BinaryWrite(_BinaryReader.ReadBytes(1024));
                    HttpContext.Current.Response.Flush();
                }

                _BinaryReader.Close();
                if (i < maxCount)
                    return false;
                else
                    return true;
                
            }
            else
            {
                return false;
            }
           
        }
/////////////////////////////////End///////////////////////////////////////


Maria Ilieva
Telerik team
 answered on 10 Dec 2012
2 answers
74 views
When selecting all text and applying a different alignment (left, right, center, justify) an empty paragraph is added after each element. This happens in Internet Explorer 9.

We are using version 2012.3.1016.45 of the editor, but the same problem happens with the online demo of the editor.

Example:
We have the following HTML-code in the texteditor:

<h1>Lorem Ipsum</h1>
<h4>Lorem ipsum dolor sit amet, consectetur adipiscing elit</h4>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur fermentum vestibulum elit nec rhoncus.</p>
<p>Duis urna elit, porttitor vel luctus vitae, suscipit dapibus nisi. Maecenas vulputate dapibus malesuada. Sed ut erat eget elit vulputate tincidunt. Sed in quam congue erat pulvinar.</p>
<p>Fusce non ligula et neque placerat dictum. Vivamus consectetur diam quis enim porta eget commodo justo interdum. Morbi id nisi eget nisi egestas dictum non in est. Praesent dignissim dolor non lorem faucibus pellentesque. Vivamus imperdiet cursus enim ut luctus. Morbi hendrerit suscipit turpis, ut sollicitudin erat auctor vitae.</p>
<p>In eget nisi sit amet metus semper bibendum:</p>
<ul>
    <li>Cras purus </li>
    <li>Lacinia id conseqat </li>
    <li>Gravida ut metus </li>
    <li>Pellentesque interdum </li>
    <li>Cras fermentum fringilla enim tincidunt </li>
    <li>Duis porttitor </li>
    <li>...</li>
</ul>
<p> </p>
<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis.</p>

Then we do CTRL-A to select all the text and click the button to change the alignment (center, right or justify).

In Google Chrome we get this correct result:

<h1 style="text-align: justify;">Lorem Ipsum</h1>
<h4 style="text-align: justify;">Lorem ipsum dolor sit amet, consectetur adipiscing elit</h4>
<p style="text-align: justify;">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur fermentum vestibulum elit nec rhoncus.</p>
<p style="text-align: justify;">Duis urna elit, porttitor vel luctus vitae, suscipit dapibus nisi. Maecenas vulputate dapibus malesuada. Sed ut erat eget elit vulputate tincidunt. Sed in quam congue erat pulvinar.</p>
<p style="text-align: justify;">Fusce non ligula et neque placerat dictum. Vivamus consectetur diam quis enim porta eget commodo justo interdum. Morbi id nisi eget nisi egestas dictum non in est. Praesent dignissim dolor non lorem faucibus pellentesque. Vivamus imperdiet cursus enim ut luctus. Morbi hendrerit suscipit turpis, ut sollicitudin erat auctor vitae.</p>
<p style="text-align: justify;">In eget nisi sit amet metus semper bibendum:</p>
<ul>
    <li style="text-align: justify;">Cras purus </li>
    <li style="text-align: justify;">Lacinia id conseqat </li>
    <li style="text-align: justify;">Gravida ut metus </li>
    <li style="text-align: justify;">Pellentesque interdum </li>
    <li style="text-align: justify;">Cras fermentum fringilla enim tincidunt </li>
    <li style="text-align: justify;">Duis porttitor </li>
    <li style="text-align: justify;">...</li>
</ul>
<p style="text-align: justify;"> </p>
<p style="text-align: justify;">Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis.</p>
<div style="text-align: justify;"><br />
</div>

In Internet Explorer 9, an empty paragraph is added after each element:

<h1 style="text-align: justify;">Lorem Ipsum</h1>
<p style="text-align: justify;">
</p>
<h4 style="text-align: justify;">Lorem ipsum dolor sit amet, consectetur adipiscing elit</h4>
<p style="text-align: justify;">
</p>
<p style="text-align: justify;">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur fermentum vestibulum elit nec rhoncus.</p>
<p style="text-align: justify;">
</p>
<p style="text-align: justify;">Duis urna elit, porttitor vel luctus vitae, suscipit dapibus nisi. Maecenas vulputate dapibus malesuada. Sed ut erat eget elit vulputate tincidunt. Sed in quam congue erat pulvinar.</p>
<p style="text-align: justify;">
</p>
<p style="text-align: justify;">Fusce non ligula et neque placerat dictum. Vivamus consectetur diam quis enim porta eget commodo justo interdum. Morbi id nisi eget nisi egestas dictum non in est. Praesent dignissim dolor non lorem faucibus pellentesque. Vivamus imperdiet cursus enim ut luctus. Morbi hendrerit suscipit turpis, ut sollicitudin erat auctor vitae.</p>
<p style="text-align: justify;">
</p>
<p style="text-align: justify;">In eget nisi sit amet metus semper bibendum:</p>
<p style="text-align: justify;">
</p>
<ul>
    <p style="text-align: justify;">
    </p>
    <li>
    <div style="text-align: justify;">Cras purus </div>
    </li>
    <p style="text-align: justify;">
    </p>
    <li>
    <div style="text-align: justify;">Lacinia id conseqat </div>
    </li>
    <p style="text-align: justify;">
    </p>
    <li>
    <div style="text-align: justify;">Gravida ut metus </div>
    </li>
    <p style="text-align: justify;">
    </p>
    <li>
    <div style="text-align: justify;">Pellentesque interdum </div>
    </li>
    <p style="text-align: justify;">
    </p>
    <li>
    <div style="text-align: justify;">Cras fermentum fringilla enim tincidunt </div>
    </li>
    <p style="text-align: justify;">
    </p>
    <li>
    <div style="text-align: justify;">Duis porttitor </div>
    </li>
    <p style="text-align: justify;">
    </p>
    <li>
    <div style="text-align: justify;">...</div>
    </li>
    <p style="text-align: justify;">
    </p>
</ul>
<p style="text-align: justify;">
</p>
<p style="text-align: justify;"> </p>
<p style="text-align: justify;">
</p>
<p style="text-align: justify;">Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis.</p>
Roelande
Top achievements
Rank 1
 answered on 10 Dec 2012
2 answers
118 views
Hi, I'm using RadTimePicker (really i'm using DnnTimePicker, but it's the same)  in my dotnetnuke proyect.
RadTimePicker works fine, but i found a little problem.
I have the proyect in a server, if I set the mindate value for example to today at 11:00, then the  RadTimePicker mindate value is "4/12/2012 11:00". This "today" uses the server date.

Ok, its ok, if I open the solution in a client machine with the same date, all works fine, i can't select any hours before mindate.

But i think that mindate validation uses client machine "today" for compare with RadTimePicker mindate. Then if client machine has a different date, for example, 5/12/2012, if I select for example 10:00, mindate validation will compare mindate (4/12/2012 11:00) and selected date (5/12/2012 10:00) and like

4/12/2012 11:00 < 5/12/2012 10:00

I will can select this hour.

I'm not sure that this, because, If client machine has a previous date to server machine date (for example 3/12/2012), in my theory, if i select 12:00, "mindate validation" will compare:

4/12/2012 11:00 < 3/12/2012 12:00

but this doesn't happen, it's like only compares 11:00 < 12:00 and permits to select this.

I don't understand how works this validation, but one thing is sure:

- Client machine with the same o previous date that server machine: all works ok.
- Client machine with a bigger date: this don't work.


I hope that you can help me :)

Thanks, regards, Javi.

PD: sorry for my english
Javi
Top achievements
Rank 1
 answered on 10 Dec 2012
1 answer
65 views
i have radcombo with emptymessage even though not selecting any value it is postbacking....

my code is

 

 

<telerik:RadComboBox ID="Commodity" AppendDataBoundItems="true" EmptyMessage="--Select--"

 

 

 

Width="80px" runat="server" CheckBoxes="true" DropDownWidth="150px" AutoPostBack="true" EnableCheckAllItemsCheckBox="true"

 

 

 

CheckedItemsTexts="DisplayAllInInput" OnSelectedIndexChanged="gvNetExposurefilter_SelectedIndexChanged">

 

 

 

</telerik:RadComboBox>

 

Kalina
Telerik team
 answered on 10 Dec 2012
4 answers
380 views
I'm using the EnableAutomaticLoadOnDemand with a RadComboBox, the EntityDataSource is defined in code behind and connected with the RadComboBox.

When I open the DropDown of the RadComboBox I get this error:

Object reference not set to an instance of object

There is an example of how to define a datasource in the code behind in this case? Is possible using EnableAutomaticLoadOnDemand?

Alberto


saeed
Top achievements
Rank 1
 answered on 10 Dec 2012
10 answers
153 views
Is it possible to change the start time 12:00AM to "Open"  and end time 12:00AM to close on the picker?
Princy
Top achievements
Rank 2
 answered on 10 Dec 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
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
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?