Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
151 views
Hi,
  1) I create radgrid datasource from datatable dynamically(headers are not fixed).how to change the columnspan ,rowspan and change style of entire row.

 2) how to print the contents of radgrid.


Thanks
 Dwarak 
dwarak kanniah
Top achievements
Rank 1
 answered on 27 Nov 2009
2 answers
175 views
Is there a way to boost performance with the rad decorator?? 

I have a page with various Telerik components and all are inheriting the skin setting from the web.config.  I also have a decorator on the page. The problem is performance. 

WIthout the decorator my performance repsonse is about what I would expect: about 6-7 seconds to render the page and then open one of the panel bars containing a grid.

 With the decorator it takes about 30 or more seconds.

What if anything can be done here??

R
sitefinitysteve
Top achievements
Rank 2
Iron
Iron
Veteran
 answered on 27 Nov 2009
7 answers
493 views

I am getting an "access denied" error when using the RadEditor for Ajax when using the Link Manager and the Table Wizard.  Initially I got this with the Image manager but have since resolved the issue by setting the folder paths.  However, I remain stumped with the other problems.

My XML definition for the editor is (no code script written):

<rad:radeditor runat="server" ID="RadEditor2" Width="550px" Height="390px" Skin="Web20" ToolsFile="~/App_Data/EditorTools.xml" BackColor="White">

<ImageManager ViewPaths="~/Users/TBA/Images" DeletePaths="~/Users/TBA/Images" UploadPaths="~/Users/TBA/Images" />

<DocumentManager  ViewPaths="~/Users/TBA/" />

<content>

<

h1>This is the editor</h1></content>

</rad:radeditor>

My web.config looks like:

<

system.webServer>

<

handlers>

...

<add name="Telerik.Web.UI.SpellCheckHandler.axd_*" path="Telerik.Web.UI.SpellCheckHandler.axd" verb="*" type="Telerik.Web.UI.SpellCheckHandler, Telerik.Web.UI, Culture=neutral, PublicKeyToken=121fae78165ba3d4" preCondition="integratedMode,runtimeVersionv2.0"/>

<

add name="Telerik.Web.UI.DialogHandler.aspx_*" path="Telerik.Web.UI.DialogHandler.aspx" verb="*" type="Telerik.Web.UI.DialogHandler, Telerik.Web.UI, Culture=neutral, PublicKeyToken=121fae78165ba3d4" preCondition="integratedMode,runtimeVersionv2.0"/>

<

add name="Telerik.RadUploadProgressHandler.ashx_*" path="Telerik.RadUploadProgressHandler.ashx" verb="*" type="Telerik.Web.UI.Upload.RadUploadProgressHandler, Telerik.Web.UI" preCondition="integratedMode,runtimeVersionv2.0"/>

<

add name="Telerik.Web.UI.WebResource.axd_*" path="Telerik.Web.UI.WebResource.axd" verb="*" type="Telerik.Web.UI.WebResource, Telerik.Web.UI" preCondition="integratedMode,runtimeVersionv2.0"/>

</

handlers>
</
system.webServer>

<

system.web>
<

httpHandlers>

...


<
add path="Telerik.Web.UI.DialogHandler.aspx" verb="*" type="Telerik.Web.UI.DialogHandler, Telerik.Web.UI, Version=2008.1.415.20, Culture=neutral, PublicKeyToken=121fae78165ba3d4" validate="false" />

<

add path="Telerik.Web.UI.SpellCheckHandler.axd" verb="*" type="Telerik.Web.UI.SpellCheckHandler, Telerik.Web.UI, Version=2008.1.415.20, Culture=neutral, PublicKeyToken=121fae78165ba3d4" validate="false" />
</
httpHandlers>
</system.web>

Thanks...

Andrew

Arshad Mohamed
Top achievements
Rank 1
 answered on 27 Nov 2009
9 answers
251 views

Hi guys,

I'm having a problem with RadPanelBar. It is refreshing the whole page when I'm using it in SharePoint.

I did a sample test application without using SharePoint and it is working properly (not refreshing the whole page).

Below is the sample I create: (Note that this sample is the asp.net, not the SharePoint code as it will be the same).
Kindly highlight or specify what I did wrong or what I need to do in able to make it work on SharePoint.

Please be kind as I am not a frequent forum poster. Thanks in advance for the help/support.

### Navigation Control: START ###
=== ASCX: START ===
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="navigation.ascx.cs" Inherits="AJAXEnabledWebApplication1.navigation" %>
<%@ Register Assembly="Telerik.Web.UI, Version=2008.2.826.20, Culture=neutral, PublicKeyToken=121fae78165ba3d4"
    Namespace="Telerik.Web.UI" TagPrefix="rad" %>
   
<rad:RadPanelBar runat="server" ID="radPanelBar1" Skin="Office2007" ExpandMode="SingleExpandedItem" Width="100%">
</rad:RadPanelBar>
=== ASCX: END ===

=== ASCX.CS: START ===

namespace AJAXEnabledWebApplication1
{
    public partial class navigation : System.Web.UI.UserControl
    {
        public EventHandler OnItemClick;

        protected void Page_Load(object sender, System.EventArgs e)
        {
            if (!this.IsPostBack)
            {
                radPanelBar1.DataSource = this.GetData();
                radPanelBar1.DataTextField = "Desc";
                radPanelBar1.DataValueField = "Id";
                radPanelBar1.DataBind();
            }
        }

        protected override void OnInit(System.EventArgs e)
        {
            radPanelBar1.ItemClick += radPanelBar1_ItemClick;
        }

        private void radPanelBar1_ItemClick(object sender, Telerik.Web.UI.RadPanelBarEventArgs e)
        {
            if (OnItemClick != null)
            {
                OnItemClick(this, new navigation.NavigationEventArgs(e.Item.Value));
            }
        }

        private DataTable GetData()
        {
            DataTable dt = new DataTable();

            dt.Columns.Add("Id");
            dt.Columns.Add("Desc");

            for (int i = 0; i < 5; i++)
            {
                DataRow newRow = dt.NewRow();

                newRow["Id"] = i.ToString();
                newRow["Desc"] = i.ToString() + " Description";

                dt.Rows.Add(newRow);
            }

            return dt;
        }

        #region <<<EventHandler>>>
        public delegate void EventHandler(object sender, NavigationEventArgs e);

        public class NavigationEventArgs : System.EventArgs
        {
            private string _id = string.Empty;

            public NavigationEventArgs()
            {
                _id = string.Empty;
            }

            public NavigationEventArgs(string id)
            {
                _id = id;
            }

            public string Id
            {
                get { return _id; }
                set { _id = value; }
            }
        }
        #endregion
    }
}
=== ASCX.CS: END ===
### Navigation Control: END ###


### ACTUAL PAGE: START ###
=== ASPX: START ===

<%@ Page Language="C#" AutoEventWireup="true" Codebehind="Default.aspx.cs" Inherits="AJAXEnabledWebApplication1._Default" %>

<%@ Register Src="navigation.ascx" TagName="Navigation" TagPrefix="navigationUC" %>
<%--<%@ Register Src="~/layouts/_controltemplates/navigation.ascx" TagName="Navigation" TagPrefix="navigationUC" %>--%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Untitled Page</title>
</head>
<body>
    <form id="form1" runat="server">
        <asp:ScriptManager ID="ScriptManager1" runat="server" />
        <asp:UpdatePanel ID="UpdatePanel1" runat="server">
            <ContentTemplate>
                <div>
                    <table style="width: 100%; height=100%">
                        <tr>
                            <td>
                                <navigationUC:Navigation runat="server" ID="navigationUC1"></navigationUC:Navigation>
                            </td>
                        </tr>
                        <tr>
                            <td height="100%">
                                <asp:ListBox runat="server" ID="listBox" Height="400px"></asp:ListBox>
                            </td>
                        </tr>
                    </table>
                </div>
            </ContentTemplate>
        </asp:UpdatePanel>
    </form>
</body>
</html>
=== ASPX: END===

=== ASPX.CS: START===

namespace AJAXEnabledWebApplication1
{
    public partial class _Default : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
        }

        protected override void OnInit(EventArgs e)
        {
            navigationUC1.OnItemClick += navigationUC1_OnItemClick;
        }

        private void navigationUC1_OnItemClick(object sender, navigation.NavigationEventArgs e)
        {
            listBox.Items.Add(e.Id);
        }
    }
}
=== ASPX.CS: END ===
### ACTUAL PAGE: END ###

mathieu cupryk
Top achievements
Rank 1
 answered on 27 Nov 2009
1 answer
105 views
Hi

I am trying to export all my pages to a PDF file. 
a few questions about this:
-Is there a code sample that shows me how to use <?hard-pagebreak?>. I would like to export every 8 columns to a new page ( got about 50 columns)?
- i am using paging in my RadGrid and have IgnorePaging=false but it does not export all the rows in the grid only the one on the current page?

thanks

Dirk
Daniel
Telerik team
 answered on 26 Nov 2009
5 answers
196 views
Hi

I am having a strange problem with some users... I  feel sure the fix is simple but
I haven't cracked it yet..

The filename that is on the tab of the exported worksheet, when I download it
myself, is 'WinelistExport.xls'  as expected, but some users see it as
'%57%69%6e'    etc etc.   I realise that this is in fact the urlEncoded version of the same filename.

It must depend on some computer depend setting.  How can I get round this and make sure
it shows the worksheet tab normally?

Thanks

Clive.
Daniel
Telerik team
 answered on 26 Nov 2009
5 answers
246 views
Hi all,

Using Q1 2009 of Telerik RadControls for ASP.NET AJAX. I recently upconverted a web application to VS 2010 Beta 2 format (and ASP.NET 4.0). While it was generally successful and the application runs, I am experiencing an error which seems very difficult to get around. Hoping to get some feedback to see if anyone else has encountered it and if so, how resolve - or should I abandon for now and revert back to VS 2008/ASP.NET 3.5?

What is happening is this: I have a ScriptManager (or RadScriptManager - same issue) on a Master Page. On "some" content pages, not all, I encounter the following Javascript error when posting back from any control:
 
Line: 14816
Error: Object doesn't support this property or method

Then, if I choose to debug, the error occurs at the last line of this code block (14816):
  

},_removeDropDown:function(){ 
var _3c=this.get_dropDownElement().parentNode; 
_3c.parentNode.removeChild(_3c);
if(this._disposeChildElements&&typeof   
(Sys.WebForms)!="undefined"){ 
Sys.WebForms.PageRequestManager.getInstance()._destroyTree(_3c);

Following some leads, I have been able to work around the error on some pages by declaring the ScriptManager "closer" to the page that uses it - basically, "hiding" or removing the ScriptManager on the MasterPage and replacing it with one on the content page. BTW, if you try to do this, you'll find that while you can easily add a ScriptManager programmatically, it's quite difficult to remove one, since it's resistant to Controls.Remove(), ControlsRemoveAt(), .Visible, etc. The solution which has worked for me is to place the ScriptManager in a ContentPlaceHolder on the Master Page, "blank" it out on the content page using an empty ContentPlaceHolder, then programmatically add a new ScriptManager in Page_Init. (Yes, a hack, I know.)

However, placing the ScriptManager on the content page only works for some of the pages! In addition, in more complex content pages with nested user controls (e.g. a UC with a RadGrid, which then also hosts a UC for the edit form), I can't determine where/when exactly to add the ScriptManager to satisfy all the controls; some of them can't find it and exception out.

I have tested this on a stripped down project which just 1 Master Page + 1 content page. If I place the ScriptManager on the Master Page, I get the error. If I wipe out the ScriptManager on the Master Page and then re-add it in Page_Init of the content page, it works fine without errors, and I get AJAX partial page postback functionality.

Lastly, I have tried using the Q3 2009 version (trial) and I get the same error.

Any advice appreciated! Thanks,

Allen

T. Tsonev
Telerik team
 answered on 26 Nov 2009
4 answers
105 views
Hi

I am trying to export my RadGrid to a pdf file but at the moment I get all my 50 columns crammed into 1 page : (

What code can i use to make the export spread over a few pages?

using this now:

ResultsGrid.ExportSettings.IgnorePaging =

False

 

 

 

If ResultsGrid.SelectedItems.Count <> 0 Then

 

 

For Each item As GridDataItem In ResultsGrid.MasterTableView.Items

 

 

If Not item.Selected Then item.Visible = False

 

 

Next

 

 

End If

 

ResultsGrid.ExportSettings.OpenInNewWindow =

True

 

ResultsGrid.ExportSettings.IgnorePaging =

False

 

ResultsGrid.ExportSettings.ExportOnlyData =

True

 

 

 

ResultsGrid.MasterTableView.ExportToPdf()

 


thanks

Dirk
Daniel
Telerik team
 answered on 26 Nov 2009
6 answers
142 views
I am working with a RadGrid and RadScriptManager from the new 2009 Q3 release. I am encountering major problems with the code bombing when I set EnableAjax="true". However, everything works just fine when I set EnableAjax="false". Also everything worked fine under the previous 2009 Q2 release of RadGrid and RadScriptManager with VS2008.

So is the problem with VS2010 beta 2 or is the problem with the 2009 Q3 release? What parts of RadGrid and RadScriptManager are supposed to work with the new VS21010 beta 2? 
Simon
Telerik team
 answered on 26 Nov 2009
3 answers
376 views
Hi:

I have RadGrid which contains GridTableView as rows inside <DetailTables>. One of the column in RadGrid contains the image button. My requirement is whenever the Image Button from the row is clicked i need to export the data from the respective GridTableView in to Excel Sheet. I am able to export the entire grid data in to excel (tatSummaryGrd.MasterTableView.ExportToExcel()) but NOT able to export the row wise data(GridTableView data) in to Excel.

Please find the code below and advise how i can achieve this.

<radG:RadGrid ID="tatSummaryGrd"
                        runat="server" AllowMultiRowSelection="False" AllowPaging="False"
                        Width="100%" AllowSorting="True" AutoGenerateColumns="False" BorderColor="LightBlue"
                        BorderWidth="1px" AllowMultiRowEdit="true" EnableAJAX="True" GridLines="None"
                        OnDetailTableDataBind="tatSummaryGrd_DetailTableDataBind"
                        OnNeedDataSource="tatSummaryGrd_NeedDataSource"
                        OnItemCommand = "tatSummaryGrd_ItemCommand"
                        Skin="SkeltaGrid" RadControlsDir="<%$ ReplaceTemplateExpn:telerik/radcontrols/%>"
                        >
                    <mastertableview nodetailrecordstext="No records found " nomasterrecordstext="No records found"
                        autogeneratecolumns="false"  DataSourceID=""
                        datakeynames="ImportID" HierarchyDefaultExpanded="false">                       
                        <Columns>
                            <radG:GridTemplateColumn UniqueName="Process" >
                                <HeaderTemplate>
                                    Process
                                </HeaderTemplate>
                                <ItemTemplate>
                                    <label>
                                        <%# Eval("Process")%>
                                    </label>
                                </ItemTemplate>
                                <HeaderStyle HorizontalAlign="Left"  />
                                <ItemStyle HorizontalAlign="Left"  />
                            </radG:GridTemplateColumn>
                            <radG:GridTemplateColumn UniqueName="SubProcess" >
                                <HeaderTemplate>
                                    Sub Process
                                </HeaderTemplate>
                                <ItemTemplate>
                                    <label>
                                        <%# Eval("SubProcess")%>
                                    </label>
                                </ItemTemplate>
                                <HeaderStyle HorizontalAlign="Left"  />
                                <ItemStyle HorizontalAlign="Left"  />
                            </radG:GridTemplateColumn>                           
                            <radG:GridTemplateColumn UniqueName="ExportToExcel" >
                                <HeaderTemplate>
                                    Export to Excel                                  
                                </HeaderTemplate>
                                <ItemTemplate>
                                    <asp:ImageButton ID="exportToExcelImgBtn" runat="server" CommandName="Excel" ImageUrl="../skimages/msexcel.jpg"
                                ToolTip="Export to Excel" />                                
                                </ItemTemplate>

                                <HeaderStyle HorizontalAlign="Left"  />
                                <ItemStyle HorizontalAlign="Left"  />
                            </radG:GridTemplateColumn>
                        </Columns>
                       
                        <DetailTables>
                            <radG:GridTableView Name="Policies" DataKeyNames="ImportID,PolicyID,InternalPolicyID,ExecutionId" AllowMultiColumnSorting="True"
                                    DataSourceID="" TabIndex="0" AllowAutomaticUpdates="true"
                                    >
                                <ParentTableRelation>
                                    <radG:GridRelationFields MasterKeyField="ImportID" DetailKeyField="ImportID" />
                                 </ParentTableRelation>
                                 <Columns>
                                    <radG:GridTemplateColumn UniqueName="PolicyID">
                                        <HeaderTemplate>
                                            Policy
                                        </HeaderTemplate>
                                        <ItemTemplate>
                                            <label >
                                                <%# Eval("PolicyID")%>
                                            </label>
                                        </ItemTemplate>
                                        <HeaderStyle HorizontalAlign="left" Width="90px" />
                                        <ItemStyle HorizontalAlign="Left" Width="90px" />
                                    </radG:GridTemplateColumn>
                                    <radG:GridTemplateColumn UniqueName="ExistsInExcel">
                                        <HeaderTemplate>
                                            Money Recieved
                                        </HeaderTemplate>
                                        <ItemTemplate>
                                            <%# Eval("ExistsInExcel")%>
                                        </ItemTemplate>
                                        <HeaderStyle HorizontalAlign="Center" Width="90px" />
                                        <ItemStyle HorizontalAlign="Center" Width="90px" />
                                    </radG:GridTemplateColumn>                                                                       
                                </Columns>
                            </radG:GridTableView>
                         </DetailTables>
                    </mastertableview>
                    
                    <exportsettings exportonlydata="true" filename="Work Item Status Report" ignorepaging="true" openinnewwindow="true">
                    </exportsettings>
                   
                </radG:RadGrid>

Code Behind:

protected

 

void tatSummaryGrd_NeedDataSource(object source, GridNeedDataSourceEventArgs e) {

 

tatSummaryGrd.DataSource = InsuranceProcessLib.GetExcelImportHistory(_FromDate, _ToDate);

}

 

protected void tatSummaryGrd_DetailTableDataBind(object source, Telerik.WebControls.GridDetailTableDataBindEventArgs e) {

 

 

 

if (_DataViews.Contains(e.DetailTableView)) return;

 

_DataViews.Add(e.DetailTableView);

 

int importID = BPM.IsNullInt(e.DetailTableView.ParentItem.GetDataKeyValue("ImportID"), 0);

 

 

e.DetailTableView.DataSource = InsuranceProcessLib.GetExcelImportPolicyList(importID);

e.DetailTableView.DataBind();

}

 

protected void tatSummaryGrd_ItemCommand(object source, GridCommandEventArgs e) {

 

 

if (e.CommandName == "Excel") {

 

 

Int32 index = Convert.ToInt32(e.CommandArgument);

 

 

GridDataItem item = tatSummaryGrd.Items[index];

 

item.OwnerTableView.ExportToExcel();

}
}

 

 

 

 

}

 




Daniel
Telerik team
 answered on 26 Nov 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?