Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
203 views
How to set the Title for Edit Form Popup Template during edit and adding new record?

Regards,
Jones
Princy
Top achievements
Rank 2
 answered on 29 Jun 2009
0 answers
100 views

I have a custom HttpModule that filters out whitespace.  When it is enabled, the progress dialog does not appear.  I can't seem to figure out why.  Here is the code along with the change to web.config.  Please note that the whitespace code isn't even running on the upload.aspx page.  The line of code that causes the progress bar to fail seems to be:

if (app.Request["HTTP_X_MICROSOFTAJAX"] != null) { return; }

 

If I put a "return;" immediately above this line, the progress dialog appears.  If I put a "return;" immediately after this line, the progress dialog does NOT appear.  How does the executing the above line of code cause the progress dialog to fail to appear?

Thanks for any insight into this issue.  For now, I have to disable my whitespace httpmodule.

John

    <httpModules> 
      <add name="RadUploadModule" type="Telerik.Web.UI.RadUploadHttpModule, Telerik.Web.UI" /> 
      <add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>  
      <add name="EntityTransactionModule" type="REO.Web.Data.EntityTransactionModule, REO.Web"/>  
      <add name="WhitespaceModule" type="WhitespaceModule"/>  
    </httpModules> 
 

 

 

 

 

 

 

 

#region Using  
 
using System;  
using System.IO;  
using System.Web;  
using System.IO.Compression;  
using System.Text.RegularExpressions;
#endregion  
 
/// <summary>  
/// Removes whitespace from the webpage.  
/// </summary>  
public class WhitespaceModule : IHttpModule  
{
    #region IHttpModule Members  
 
    void IHttpModule.Dispose()  
    {  
        // Nothing to dispose;   
    }  
 
    void IHttpModule.Init(HttpApplication context)  
    {  
        context.BeginRequest += new EventHandler(context_BeginRequest);  
    }
    #endregion  
 
    void context_BeginRequest(object sender, EventArgs e)  
    {  
        HttpApplication app = sender as HttpApplication;  
 
        if (app.Request["HTTP_X_MICROSOFTAJAX"] != null) { return; }  
 
        string rawurl = app.Request.Path.ToLower();  
        if (rawurl.EndsWith(".aspx") && !rawurl.ToLower().EndsWith("upload.aspx"))  
        {  
            app.Response.Filter = new WhitespaceFilter(app.Response.Filter);  
        }  
    }
    #region Stream filter  
 
    private class WhitespaceFilter : Stream  
    {  
 
        public WhitespaceFilter(Stream sink)  
        {  
            _sink = sink;  
        }  
 
        private Stream _sink;  
        private static Regex reg = new Regex(@"(?<=[^])\t{2,}|(?<=[>])\s{2,}(?=[<])|(?<=[>])\s{2,11}(?=[<])|(?=[\n])\s{2,}");
        #region Properites  
 
        public override bool CanRead  
        {  
            get { return true; }  
        }  
 
        public override bool CanSeek  
        {  
            get { return true; }  
        }  
 
        public override bool CanWrite  
        {  
            get { return true; }  
        }  
 
        public override void Flush()  
        {  
            _sink.Flush();  
        }  
 
        public override long Length  
        {  
            get { return 0; }  
        }  
 
        private long _position;  
        public override long Position  
        {  
            get { return _position; }  
            set { _position = value; }  
        }
        #endregion  
 
        #region Methods  
 
        public override int Read(byte[] buffer, int offset, int count)  
        {  
            return _sink.Read(buffer, offset, count);  
        }  
 
        public override long Seek(long offset, SeekOrigin origin)  
        {  
            return _sink.Seek(offset, origin);  
        }  
 
        public override void SetLength(long value)  
        {  
            _sink.SetLength(value);  
        }  
 
        public override void Close()  
        {  
            _sink.Close();  
        }  
 
        public override void Write(byte[] buffer, int offset, int count)  
        {  
            byte[] data = new byte[count];  
            Buffer.BlockCopy(buffer, offset, data, 0, count);  
            string html = System.Text.Encoding.Default.GetString(buffer);  
 
            if (!html.Contains("textarea"))  
            {  
                html = reg.Replace(html, string.Empty);  
            }  
 
            byte[] outdata = System.Text.Encoding.Default.GetBytes(html);  
            _sink.Write(outdata, 0, outdata.GetLength(0));  
        }
        #endregion  
 
    }
    #endregion  
}  
 

 

 

John
Top achievements
Rank 1
 asked on 28 Jun 2009
0 answers
101 views

Bottlerocket
Top achievements
Rank 1
 asked on 27 Jun 2009
3 answers
95 views
I'm in a very strange situation..

<

telerik:GridButtonColumn CommandName="Delete" UniqueName="Delete" Text="Delete" ButtonType="ImageButton"

 

 

ImageUrl="~/Image/Delete.gif" ConfirmDialogType= "RadWindow" ConfirmText="Are you sure you want to delete this ?"

 

 

ItemStyle-Width="20px" HeaderStyle-Width="20px">

 

 

<ItemStyle HorizontalAlign="Center"/>

 

 

</telerik:GridButtonColumn>

This confirm window is popup but when I click OK or Cancel no response..It's only happening on my production machine, Windows server 2003 sp2 and browser is IE7. The same configuration is on test machine. its working with out any issues. scripting is enabled on browser.
Any idea..it's very urgent ..

Thanks!

 

jo
Top achievements
Rank 1
 answered on 26 Jun 2009
1 answer
91 views

i have something like this

 

If

 

 

RadScriptManager1.IsInAsyncPostBack Then    

 

 

    Dim clicked_item As String = "Product"

 

    RadMenu1.FindItemByText(clicked_item).HighlightPath()

 

 

 

Else
     Dim clicked_item As String = "Product"

 

    RadMenu1.FindItemByText(clicked_item).HighlightPath()

end if

it will work fine if it is in the else statment but wont work when its in the if. Does this have to do with asyncpostback ? i think it is. so how do i solve this problem. thanks.

 

appdev
Top achievements
Rank 1
 answered on 26 Jun 2009
1 answer
95 views
Hi Telerik Team,

We are using Rad Grid in our application, it is showing vertical scroll bars. I have opened a support ticket for this issue. Please have a look into below support ticket url for better idea....

http://www.telerik.com/account/support-tickets/view-ticket.aspx?threadid=221251

Do we have any workaround to fix this issue?

Thanks,

KKB.
Dimo
Telerik team
 answered on 26 Jun 2009
3 answers
180 views
I have a grid that is grouped by an OrderID column
Under this grouping are my individual ordered items (quantity, sku, price, etc...)

I would like RadGrid to sort by the first sku in the order, so that as I scroll down through the grid, the first sku in each order is sorted against the first sku in the previously listed order. 

If I turn off the grouping, everything will be ordered properly based on the dataset.  So it's definitely doing this as part of the group by function.  But then I loose my visual grouping and my Order Total (GridAggragateFunction.Sum)

Thanks.






Nikolay Rusev
Telerik team
 answered on 26 Jun 2009
2 answers
133 views
Hi

I have implemented a country list using an sql datasource of countries for text and abbreviations
for values, but I would like to have a default initial item "-- select country -- "  which creates a
validation failure using standard 'required field validator' for example.

This seems to be a common requirement but I did not find a simple solution in the docs.
I mus be missing something. What is the best way to do this?

I tried adding an item in the database table with an empty string for the abbreviation but this
did not seem to cause validation to fail if no selection was made.

Thanks as ever for you help

Clive
Clive Hoggar
Top achievements
Rank 1
 answered on 26 Jun 2009
2 answers
147 views
Hi All,

What is the current status on DST support in RadScheduler?
All our data in the database are UTC (as they should be :-)), but we want to allow our customers to plan in their local time and obviously the TimeZoneOffset doesn't cut it, since it is going to be wrong half the time...
I also saw in the documentation that "If left unchanged, TimeZoneOffset, defaults to the server's time zone offset, also accounting for Daylight Saving Time corrections", but this does not seem to be the case. If TimeZoneOffset is not provided, the control defaults to UTC.
I'm hoping that with the improved TimeZone support in .Net, Telerik will also see a chance to implement this?

Thanks,
Dirk
Peter
Telerik team
 answered on 26 Jun 2009
1 answer
166 views
Hi,

I have a ConfirmDailogType="RadWindow" inside a GridButtonColumn and I would like to associate a CSS class to this rad window that shows a confirm box to style it as a RadWindow, but I don't know how to do it. I just see examples of isolated RadWindows and in a GridButton Column I don't have any property to set a cssClass just for the confirmDialogType.

Hope you have any solution for my problem.
Thanks!
Fiko
Telerik team
 answered on 26 Jun 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?