Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
231 views
dear sir,
how to apply loading panel in radtabstrip?
pls help me.
Regards
padmanaban.
Princy
Top achievements
Rank 2
 answered on 14 Sep 2011
15 answers
283 views
Hi,

After applying SP1 for Server 2008 R2 (or SP1 for Windows 7), we started to receive errors when using RadCompression.

The issue only occurs when calling web-services. The web-service call actually works but there is always an exception that is handled in Application_Error, and since we have centralized our error handling, an error is logged for each web-service call. Before SP1 there were no errors!!!

The exception is:
System.Web.HttpException (0x80004005): Server cannot append header after HTTP headers have been sent.
   at System.Web.HttpResponse.AppendHeader(String name, String value)
   at System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
   at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

To reproduce the exception:
Create new web application, add a page with the following code:
<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="WebForm1.aspx.vb" Inherits="WebApplication4.WebForm1" %>
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<head runat="server">
    <title></title>
    <script runat="server">
        Sub rg_NeedDataSource(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridNeedDataSourceEventArgs) Handles rg.NeedDataSource
            Dim dt As New System.Data.DataTable()
            dt.Columns.Add("Col1", GetType(String))
            dt.Columns.Add("Col2", GetType(String))
            For i As Integer = 0 To 10
                dt.Rows.Add({"Row" & i, "Data"})
            Next
            rg.DataSource = dt
        End Sub
    </script>
 
    <script type="text/javascript">
        function callWebService()
        {
            $telerik.$.ajax({
                type: 'POST',
                url: 'WebService1.asmx/HelloWorld',
                contentType: 'application/json; charset=utf-8',
                dataType: 'json'
            });
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <asp:ScriptManager ID="ScriptManager" runat="server">
    </asp:ScriptManager>
    <div>
        <telerik:RadGrid ID="rg" runat="server" AutoGenerateColumns="true" Width="100%">
            <ClientSettings>
                <Scrolling AllowScroll="true" ScrollHeight="281px" UseStaticHeaders="true" />
            </ClientSettings>
        </telerik:RadGrid>
        <asp:Button ID="aaa" runat="server" Text="callWebService" OnClientClick="callWebService(); return false;" />
    </div>
    </form>
</body>
</html>

Add a web-service with the following code-behind:
Imports System.Web.Services
Imports System.Web.Services.Protocols
Imports System.ComponentModel
 
<System.Web.Script.Services.ScriptService()>
Public Class WebService1
    Inherits System.Web.Services.WebService
 
    <WebMethod()> _
    Public Function HelloWorld() As String
        Return "Hello World"
    End Function
 
End Class


web.config System.webServer section:
<system.webServer>
        <modules runAllManagedModulesForAllRequests="true">
            <remove name="RadCompression" />
            <add name="RadCompression" preCondition="managedHandler" type="Telerik.Web.UI.RadCompression" />
        </modules>
    </system.webServer>

Deploy the web application to an IIS web application!
Important!!! it must run in a "real" IIS web application and not the Visual Studio built in web server.

When pressing the button, an error on the server will always occur (even as the web service works!!!).
You can see the exception when attaching to the IIS and setting a break-point in Global.asax.vb on the Application_Error line (or logging the error here).
 
Regards
Caesar
Pavel
Telerik team
 answered on 14 Sep 2011
1 answer
248 views
I have bound a grid using sqldatasource. Enabled filtering.
How to i access the filtered datatable.

i want to get the whole datatable not the just page one.

Thanks


Princy
Top achievements
Rank 2
 answered on 14 Sep 2011
3 answers
207 views
I'm trying to diagnose a problem that I'm having that is very strange and I was wondering if anyone can point me in a good direction to investigate. I have a page which contains a radajaxmanager, a combo box, a tab strip and a grid. The combo box selection updates other controls on the page via Ajax. Using Fiddler I can see that selecting a value from the combo box is creating an http post and this is followed by 2 further http get requests for the same page. The subsequent get requests aren't post backs (IsPostBack returns false) and therefore some code in the page is running when it shouldn't and this is breaking some of the functionality in the page.

This only happens in Chrome and FF3 but works okay in IE6 (in IE6 I don't get additional get requests). Additionally, it seems to be data dependant in that I only get the additional http get requets when I point my development environment at the system test database. I'm certain that the additional requests aren't being raised by some dodgy javascript.

I did wonder if this was caused by some behaviour in the Ajax Manager to try to get the browser back button to work, but EnableHistory is set to false.

Unfortuantely I'm unable to reproduce this in a snippit of code and I haven't narrowed it down to know what's causing it, I just suspect that additional http requests might be caused by something in the RadAjaxManager.

I'm using version 2009.1.527.35

Many thanks in advance for any welcome suggestions,


Steve.
james
Top achievements
Rank 1
 answered on 14 Sep 2011
4 answers
156 views
Hi,

We are dynamically building radgrids in PageLoad and adding an event handler for needDataSource as follows

            Dim NewGrid As New RadGrid
                NewGrid.DataSource = dv
                NewGrid.Skin = "Web20"
                NewGrid.ID = "rg_" & FormID.ToString
                NewGrid.AllowFilteringByColumn = True
                NewGrid.AllowSorting = True
                NewGrid.AllowPaging = True
               AddHandler NewGrid.NeedDataSource, AddressOf Me.grid_NeedDataSource
                NewGrid.DataBind()

On any sort or filter operations on the resulting grid, the grid never calls the grid_NeedDataSource which is as follows

 Protected Sub grid_NeedDataSource(ByVal source As Object, ByVal e As Telerik.Web.UI.GridNeedDataSourceEventArgs)
        Dim FormID As Integer
        Dim dv As New DataView

        Try
            Dim rg As RadGrid = CType(source, Telerik.Web.UI.RadGrid)
            If rg IsNot Nothing Then

                FormID = CInt(rg.ID.ToString.Remove(0, 3))
                dv = CreateDataTable(FormID)
                rg.DataSource = dv
            End If

        Catch ex As Exception

        End Try
       
    End Sub

I assume this has to do with the page and control life cycle - I have tried creating the grids in PageLoad (not in an IsPostback test) and this simply reloads the grid but without sort/filtering. Can anyone tell me what I am doing wrong here?
Jack
Top achievements
Rank 1
 answered on 14 Sep 2011
2 answers
183 views
I am not sure is this is possible or not in the radgrid, but I have a grid and in the grid I have some basic filtering and also have some fileter templates that use a radcombocox to filter by.  Everything works fine but the users want it setup so that when you filter the grid and then navagate away from the page that when you come back to the page it will load with the last filters already set in the grid. 

When I have done this before I have set the filter up so that it is all done outside the grid and alters the dataset.  Was wondreing if I can do it withing the grid.

This is one of the filters on the grid
<telerik:GridBoundColumn SortExpression="ClientName" DataField="ClientName" HeaderText="Client Name">
      <FilterTemplate>
          <telerik:RadComboBox ID="RadComboBoxClientName" DataTextField="ClientName" DataValueField="ClientName" AppendDataBoundItems="true" Width="150px" SelectedValue='<%# ((GridItem)Container).OwnerTableView.GetColumn("ClientName").CurrentFilterValue %>' runat="server" OnClientSelectedIndexChanged="ClientNameIndexChanged" Skin="Office2007">
           </telerik:RadComboBox>
      <telerik:RadScriptBlock ID="RadScriptBlock1" runat="server">
          <script type="text/javascript">
                   function ClientNameIndexChanged(sender, args) {
                       var tableView = $find("<%# ((GridItem)Container).OwnerTableView.ClientID %>");
                       if (args.get_item().get_value() == "0") {
                            tableView.filter("ClientName", args.get_item().get_value(), "NoFilter");
                        }
                       else {
                            tableView.filter("ClientName", args.get_item().get_value(), "EqualTo");
                       }
             }
            </script>
       </telerik:RadScriptBlock>
   </FilterTemplate>
   <ItemStyle VerticalAlign="Top" />
</telerik:GridBoundColumn>
Eric Klein
Top achievements
Rank 1
 answered on 13 Sep 2011
5 answers
181 views
First I need a layout to the radPanelBar such as: Columneft, ColumnCenter, CoilumnRight.
Then I  need add programmatically RadControls such as button, radiupload, progressarea to a RadPnaelBar in specific columns.

It is possible??.
Because i try do it but I couldn't do

Thanks
Cat Cheshire
Top achievements
Rank 1
 answered on 13 Sep 2011
9 answers
766 views
Hi Telerik,

May I have an example on how to directly access a RadAlert object and set its z-index before it appears on the page.

I have a RadWindow which is popped open and is modal. 

I then open an alert like so:

if (inputs[0].value.length == 0) {
    oWindow.BrowserWindow.radalert('Please select a dashboard to upload.', 200, 100, 'Error Uploading');
    return;
}

This causes the radalert to open with the same z-index as the oWindow. I would like to directly modify the radalert to have a z-index which is greater than the oWindow -- this is to mimic the functionality of alert, which appears above oWindow by default.

Thanks.

Sean
Sean
Top achievements
Rank 2
 answered on 13 Sep 2011
2 answers
74 views
Hi,

I am using a couple of telerik controls in my site, radgrid & radchart. RadGrid is working fine, but radchart is throwing the onerror when I run it on the server (it runs fine locally).

It seems a lot of people have had this problem, and I tried the fixes but it does not appear to have resolved anything.

Here is the relevant snippet from the web config
<add path="ChartImage.axd" verb="*" type="Telerik.Web.UI.ChartHttpHandler, Telerik.Web.UI, Version=2010.1.519.35, Culture=neutral, PublicKeyToken=121fae78165ba3d4" validate="false" /> 

When I try to access "http://localhost/Instructor/ChartImage.axd" I get a 404 also.

Thanks in advance for any help you might be able to offer.

Regards,
Adam

EDIT:
When I try to do this error 404.0 when showing rad chart image in IIS7 i get a 500 error.
Randy Bauer
Top achievements
Rank 1
 answered on 13 Sep 2011
4 answers
478 views
Good Evening,

I need to create a dropdown that contains to fields from a database seperated by a hyphen "-".

How would I do that using the following code:

public void radcombo_mns_incidents_ItemsRequested(object sender, RadComboBoxItemsRequestedEventArgs e)
{
    radcombo_mns_incidents.DataTextField = "INCIDENT_ID";
    radcombo_mns_incidents.DataValueField = "INCIDENT_ID";
    radcombo_mns_incidents.DataSource = from c in quarkdb.MNs
                                        join t in quarkdb.STATUS_TYPEs on c.STATUS equals t.RECORD_ID
                                        where t.STATUS != "Closed"
                                        select new
                                        {
                                            c.INCIDENT_ID,
                                            c.TITLE
 
                                        };
    radcombo_mns_incidents.DataBind();

I would like the text field to display INCIDENT_ID - TITLE, so that they dropdown would have:

34556222 - Outage in location blablah
34544566 - Outage in location hahaha
Joe
Top achievements
Rank 1
 answered on 13 Sep 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?