Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
364 views
Hello, a new post just to share an issue I have solved and that gave me an headache.
All RadEditor dialogs returned me the error
"Cannot deserialize dialog parameters. Please refresh the editor page."

The problem had nothing with encryption (as suggested in other threads).
The problem was an incompatibility with a URL rewriting rule in web.config, a rule that is suggested on Microsoft MSDN.
<!--Redirect HTML with query parameters to lowercase URLs-->
<rule name="ForcePagesWithParametersLowercase" stopProcessing="false">
  <match url=".*[A-Z].*\.(aspx|htm|html)" ignoreCase="false" />
  <conditions>
    <add input="{QUERY_STRING}" pattern=".*[A-Z].*" />
  </conditions>
  <action type="Redirect" redirectType="Permanent" url="{ToLower:{R:0}}?{ToLower:{QUERY_STRING}}" appendQueryString="false" />
</rule>


The SEO rule forces a permanent redirect on lower case URLs... but it is also responsible of the RadEditor problem.
What's the solution if you don't want to remove the rule?
Change it with the following one
<!--Redirect HTML with query parameters to lowercase URLs-->
<rule name="ForcePagesWithParametersLowercase" stopProcessing="false">
  <match url=".*[A-Z].*\.(aspx|htm|html)" ignoreCase="false" />
  <conditions>
    <add input="{QUERY_STRING}" pattern=".*[A-Z].*" />
    <add input="{REQUEST_FILENAME}" pattern=".*Telerik\.Web\.UI\.DialogHandler.*" negate="true"/>
  </conditions>
  <action type="Redirect" redirectType="Permanent" url="{ToLower:{R:0}}?{ToLower:{QUERY_STRING}}" appendQueryString="false" />
</rule>


Ianko
Telerik team
 answered on 07 Feb 2014
11 answers
99 views
Hi,

We are still using moss 2007 for developing some website. I would like to know if the most recent version of Telerik ASP.NET is compatible with MOSS 2007.

Do you have some links for installation help and/or integrations ?

Thanks and have a great day !
Denis
Top achievements
Rank 1
 answered on 07 Feb 2014
5 answers
176 views
There were many questions today.
When i use example DBContentProvider and use Swedish characters like Ã¥, ä and ö in a file name it no problem to upload the file.
But I can not open it?
When i click on a filename like "Ã…land.doc" I go to a page with url: www.MyDomainNam.se/Handler.ashx?path=dokument%2fArbetsledare%2f%c3%85land.doc

I use Collation: Finnish_Swedish_100_CI_AS and MS SQL 2008.
In web.config i use:
<globalization fileEncoding="iso-8859-1" requestEncoding="iso-8859-1" responseEncoding="iso-8859-1" culture="sv-SE" uiCulture="sv-SE" />

How can I solve it?

If i use FileExplorer with no DBContentProvider, i have no problem to open file with Swedish characters in the filename...
Vessy
Telerik team
 answered on 07 Feb 2014
1 answer
196 views
Hi.

I have a RadGrid (see attachment - 01 - Grid.jpg). 
The first few columns (bold headers) have their columns declared declaratively.

RadGrid ID is GV_DailySales

           <telerik:GridTemplateColumn 
                    HeaderText="Gross Sales<br/>&nbsp;"
                    SortExpression="GrossSales">

and their data comes from a generic List<DailySales>. The Sort Expression value of "GrossSales"
is a property of this generic list and I am able to sort this column using the basic column sorting procedure.
This is true for the first few columns (from column "DAY" to "Average Check" because they are properties
defined in the DailySales object so no problems there. File attachment 01 - Grid.jpg shows an example
of the sorting that works fine.

--------------------------------------------------------------------------------------
For the next few columns they are of type GridTemplateColumn but had been added dynamically.

Here's the code snippet on how I added them dynamically.
           
            GV_DailySales.DataSource = ds.getDailySalesForTheMonth(DailySales_Date);  //source data for the columns that sorts fine

            #region dynamically add GridTemplateColumns for ATP

            List<PL_StoreSupport.Products> P = ds.getAllProductsForDailySales();   //my source data for the dynamic columns

            for (int i = 0; i < P.Count; i++)
            {
                TL.GridTemplateColumn gridTemplateColumn = new TL.GridTemplateColumn();
                TL.RadButton b = new TL.RadButton() { Width = Unit.Pixel(25) };
                b.Icon.PrimaryIconUrl = "~/ScriptsStylesItems/Images/icon_trends2.png";
                Label l = new Label() { Text = "<br/>" + P[i].Product_Name };
                gridTemplateColumn.HeaderTemplate = new CreateItemTemplate(b, l);
                gridTemplateColumn.HeaderStyle.Width = Unit.Pixel(85);
                gridTemplateColumn.HeaderStyle.HorizontalAlign = HorizontalAlign.Center;
                gridTemplateColumn.UniqueName = Guid.NewGuid().ToString(); //or whatever name?
                //gridTemplateColumn.SortExpression = "SortExpression";//to determine which --> does not work
                GV_DailySales.MasterTableView.Columns.Add(gridTemplateColumn);
            }

            #endregion

----------------------- here's the code snippet how i defined my ITemplate----------------------------
//just a matter of adding a label and a RadButton on the header 

#region CreateItemTemplate
    public class CreateItemTemplate : ITemplate
    {
        private TL.RadButton RadButton_viewStat;
        private Label label;
        
        public CreateItemTemplate()
        {
             
        }
        public CreateItemTemplate(TL.RadButton b, Label l)
        {
            this.RadButton_viewStat = b;
            this.label = l;
        }

        public void InstantiateIn(Control container)
        {
            container.Controls.Add(RadButton_viewStat);
            container.Controls.Add(label);
        }
    }
    #endregion


----------------------- I created a Label for the dynamically created columns to hold the row data ---------------------------
 protected void GV_DailySales_ItemCreated(object sender, TL.GridItemEventArgs e)
        {
            TL.GridDataItem ITEM = e.Item as TL.GridDataItem;

            switch (e.Item.ItemType)
            {
                #region add numberic text box | asp labels

                case TL.GridItemType.Item:
                case TL.GridItemType.AlternatingItem:

                    for (int i = 9; i < ITEM.Cells.Count; i++)
                    {
                        #region RAD NUMERIC TEXT BOXES & LABELS

                        //..generic controls - dataLabel - asp labels
                        Label dataLabel  = new Label();
                        dataLabel.ID = "dataLabel_" + i.ToString();
                        dataLabel.Text = "85";
                        ITEM.Cells[i].Controls.Add(dataLabel);

                        //..adjust alignment
                        ITEM.Cells[i].HorizontalAlign = HorizontalAlign.Center;

                        #endregion

                        
                    }
                    break;

                #endregion
            }

--------------------------------- I populated the rows with random integers to simulate data ---------------------------
protected void GV_DailySales_ItemDataBound(object sender, TL.GridItemEventArgs e)
        {
            if ((e.Item.DataItem != null) && (e.Item is TL.GridDataItem))
            {
                #region DYNAMIC COLUMNS

                for (int i = 9; i < ITEM.Cells.Count; i++)
                {
                    Label dataLabel = ITEM.FindControl("dataLabel_" + i.ToString()) as Label;
                    dataLabel.Text = (i * i * ITEM.RowIndex).ToString();

                }

                #endregion
            }
        }


------ 
I did not use the the GV_DailySales.Databind() method anymore because I am already handling this via the 
GV_DailySales_NeedDataSource event handler as I've read this to be "recommended practice."

I'd like to ask for some help how I can possible sort these dynamically added columns.







Angel Petrov
Telerik team
 answered on 07 Feb 2014
3 answers
131 views
Hello,

I am trying to close RadWindow from a button inside ASP.NET Wizard control step. but the javascript wont fire. 

<form id="form1" runat="server">
    <script type="text/javascript">
        function CloseAndRebind() {
            GetRadWindow().BrowserWindow.refreshGrids();
            GetRadWindow().close();
        }
 
        function GetRadWindow() {
            var oWindow = null;
            if (window.radWindow) oWindow = window.radWindow;
            else if (window.frameElement.radWindow) oWindow = window.frameElement.radWindow;
 
            return oWindow;
        }
 
        function Cancel() {
            GetRadWindow().close();
        }
    </script>
    <ajaxToolkit:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server" />
    <div style="padding: 10px;">
         <div>
            <asp:Wizard ID="Wizard1" runat="server" BackColor="#EFF3FB" BorderColor="#B5C7DE"
                BorderWidth="1px" DisplaySideBar="False" OnFinishButtonClick="Wizard1_FinishButtonClick">
                <HeaderStyle BackColor="#284E98" BorderColor="#EFF3FB" BorderStyle="Solid" BorderWidth="2px"
                    Font-Bold="True" ForeColor="White" HorizontalAlign="Center" />
                <NavigationButtonStyle BackColor="White" BorderColor="#507CD1" BorderStyle="Solid"
                    BorderWidth="1px" ForeColor="#284E98" />
                <StepStyle Font-Size="0.8em" ForeColor="#333333" />
                <HeaderTemplate>
                    <asp:Label ID="lblHeader" runat="server" />
                </HeaderTemplate>
                <WizardSteps>
                    <asp:WizardStep ID="WizardStep7" runat="server" Title="Thank you!" StepType="Complete">
                        <div style="padding: 10px;">
                            <h4>
                                Thank you!
                            </h4>
                                 
                                <telerik:RadButton ID="btnClose" runat="server" OnClientClick="CloseAndRebind();" Text="Go to main page" />
</div>
                    </asp:WizardStep>
                </WizardSteps>
            </asp:Wizard>
        </div>
    </div>
    </form>
Marin Bratanov
Telerik team
 answered on 07 Feb 2014
4 answers
309 views
How can I repaire background color in RadListviewFloated ?
I change color back ground in rlvI and rlvA, it's same but I use change class="rlvI <%# Eval("ID") %>" with class rlvI"ID"
it's running only half of it?

I try to get ID by ListView_ItemDataBound but it's only change half of it too?

Tran Huy
Top achievements
Rank 1
 answered on 07 Feb 2014
1 answer
174 views
I am currently using the RadToolTipManager successfully to add a usercontrol dynamically, but it loses the "Text" setting after the control is added.  I would like to add the text property back using "OnClientHide" event, but when I add the javascript function and use the set_text method, the page reloads after the text is set.

What is the best way to get this done?  I also tried to set the "OnClientHide" property to a "Protected Sub" on the VB codebehind file, but I get a Javascript error that the method is undefined.  What would be the proper parameters on the codebehind sub that need to be delcared?

Thank you,
Ed Sudit
Marin Bratanov
Telerik team
 answered on 07 Feb 2014
1 answer
77 views
I have a custom module Inside of DNN professional, using a RadGrid.  When right clicking the header context menu in Chrome (version 32), the menu does not pop up in the correct location.  It works fine in IE and Firefox. I would like it to be connected to the mouse click location, but it isn't.  When scrolled up on the page, the menu pops up towards the bottom. Has anyone else had this trouble and know how it can be fixed?

ASPX code:

 <telerik:RadGrid runat="server" ID="rgCloseWorkOrder"  AllowSorting="True" PageSize="20" AllowPaging="True" GridLines="None" EnableLinqExpressions="false" AllowMultiRowEdit="false"
            Skin="Hay" EnableAjaxSkinRendering="true"  EnableHeaderContextMenu="true" EnableHeaderContextFilterMenu="true" MasterTableView-ClientDataKeyNames="WorkOrderID"
            OnItemDataBound="rgWorkOrder_ItemDataBound" OnNeedDataSource="rgCloseWorkOrder_NeedDataSource"   OnItemCommand="rgCloseWorkOrder_ItemCommand"
            OnSortCommand="rgCloseWorkOrder_SortCommand" OnPreRender="rgCloseWorkOrder_PreRender">
            <PagerStyle Mode="NextPrevNumericAndAdvanced"></PagerStyle>
            <GroupingSettings CaseSensitive="false" />
            <ExportSettings ExportOnlyData="true" OpenInNewWindow="true" IgnorePaging="true" FileName="ExportedClosedWorkFlows" />
            <ClientSettings AllowExpandCollapse="True" ClientEvents-OnColumnHidden="rgCWorkOrder_ColumnHidden" ClientEvents-OnColumnShown="rgCWorkOrder_ColumnShown">
                <Resizing AllowColumnResize="true" AllowResizeToFit="true" ClipCellContentOnResize="false" EnableRealTimeResize="true" AllowRowResize="true"
                    ResizeGridOnColumnResize="true" />                
            </ClientSettings>
            <MasterTableView AutoGenerateColumns="false" EditMode="EditForms" AllowFilteringByColumn="true" ShowFooter="true" TableLayout="Auto" HierarchyLoadMode="Client"
                NoDetailRecordsText="No Items Found" AllowNaturalSort="true"  AllowMultiColumnSorting="true" CommandItemDisplay="Top" CssClass="closeWorkOrder">
                <CommandItemTemplate>
                    <span style="font-weight: 700; padding: 3px 0 3px 5px; line-height: 23px">To create work order, please go to the Accounts screen and select an account.</span>
                </CommandItemTemplate>
                <DetailTables>
                    <telerik:GridTableView DataKeyNames="WorkOrderID" runat="server" DataMember="WorkOrderID" AllowPaging="false" EnableHeaderContextMenu="false"
                        EnableHeaderContextFilterMenu="false" AllowFilteringByColumn="false" AllowSorting="false" GridLines="None" AutoGenerateColumns="false"
                        IsFilterItemExpanded="false" TableLayout="Auto" HierarchyLoadMode="ServerBind" ShowFooter="false" AllowCustomSorting="false" AllowNaturalSort="false">
                        <ParentTableRelation>
                            <telerik:GridRelationFields DetailKeyField="WorkOrderID" MasterKeyField="WorkOrderID" />
                        </ParentTableRelation>
                        <Columns>
                            <telerik:GridHyperLinkColumn HeaderText="Comment" DataTextField="Details" SortExpression="Details" UniqueName="Details" AutoPostBackOnFilter="false" />
                        </Columns>
                    </telerik:GridTableView>
                </DetailTables>
                <Columns>
                    <telerik:GridBoundColumn DataField="ServiceRequestNumber" FilterControlWidth="30px" HeaderText="Service Req No." SortExpression="ServiceRequestNumber"
                        UniqueName="ServiceRequestNumber" AutoPostBackOnFilter="true" />
                    <telerik:GridBoundColumn DataField="ServiceNumber" HeaderText="Customer No." FilterControlWidth="30px" SortExpression="ServiceNumber" UniqueName="ServiceNumber"
                        AutoPostBackOnFilter="true" DataType="System.Int64" FilterListOptions="VaryByDataType" />
                    <telerik:GridBoundColumn DataField="PropertyDataMap" FilterControlWidth="30px" HeaderText="Route" SortExpression="PropertyDataMap" UniqueName="PropertyDataMap" Display="true"
                        AutoPostBackOnFilter="true" />
                    <telerik:GridBoundColumn DataField="WorkOrderStatusCode" HeaderText="Status" UniqueName="WorkOrderStatusCode" Visible="false" />
                    <telerik:GridBoundColumn DataField="ServiceCode" FilterControlWidth="30px" HeaderText="Service Code" SortExpression="ServiceCode" UniqueName="ServiceCode" AutoPostBackOnFilter="true" Display="false" />
                    <telerik:GridBoundColumn DataField="Address" FilterControlWidth="40px" HeaderText="Address" SortExpression="Address" UniqueName="Address" AutoPostBackOnFilter="true" />
                    <telerik:GridBoundColumn DataField="City" FilterControlWidth="30px" HeaderText="City" SortExpression="City" UniqueName="City" AutoPostBackOnFilter="true" />
                    <telerik:GridBoundColumn DataField="State" FilterControlWidth="30px" HeaderText="State" SortExpression="State" UniqueName="State" Display="true" AutoPostBackOnFilter="true" />
                    <telerik:GridBoundColumn DataField="Zip" FilterControlWidth="30px" HeaderText="Zip" SortExpression="Zip" UniqueName="Zip" Display="true" AutoPostBackOnFilter="true" />
                    <telerik:GridBoundColumn DataField="CustomerPhoneNumber" FilterControlWidth="30px" HeaderText="Phone No." SortExpression="CustomerPhoneNumber" UniqueName="CustomerPhoneNumber" Display="false"
                        AutoPostBackOnFilter="true" />
                    <telerik:GridBoundColumn DataField="ItemTypeCode" FilterControlWidth="30px" HeaderText="Item" SortExpression="ItemTypeCode" UniqueName="ItemTypeCode" Display="false" AutoPostBackOnFilter="true" />
                    <telerik:GridDateTimeColumn DataField="RequestedDate" HeaderText="Completion Date" FilterControlWidth="80px" ItemStyle-Width="150px" SortExpression="RequestedDate" UniqueName="RequestedDate" DataType="System.DateTime" DataFormatString="{0:MM/dd/yyyy}"
                        FilterDateFormat="MM/dd/yyyy" AutoPostBackOnFilter="true" FilterListOptions="VaryByDataType" Resizable="true" />
                    <telerik:GridDateTimeColumn DataField="DueDate" HeaderText="Due Date" FilterControlWidth="80px" ItemStyle-Width="150px" SortExpression="DueDate" UniqueName="DueDate" DataType="System.DateTime" DataFormatString="{0:MM/dd/yyyy}"
                        AutoPostBackOnFilter="true" />
                    <telerik:GridBoundColumn DataField="MaintenanceDescription" HeaderText="Description" FilterControlWidth="40px" SortExpression="MaintenanceDescription" UniqueName="MaintenanceDescription"
                        AutoPostBackOnFilter="true" />
                    <telerik:GridBoundColumn DataField="ServiceCodeDescription" FilterControlWidth="30px" HeaderText="Service Detail" SortExpression="ServiceCodeDescription" UniqueName="ServiceCodeDescription" Display="false"
                        AutoPostBackOnFilter="true" />
                    <telerik:GridBoundColumn DataField="ResolutionDescription" HeaderText="Resolution Description" UniqueName="ResolutionDescription" AutoPostBackOnFilter="true"></telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="Zone" HeaderText="Zone" FilterControlWidth="30px" SortExpression="Zone" UniqueName="Zone" AutoPostBackOnFilter="true" Display="false" />
                    <telerik:GridBoundColumn DataField="ItemID" HeaderText="Item ID" Visible="false" FilterControlWidth="30px" UniqueName="ItemID"
                        AutoPostBackOnFilter="true" DataType="System.Guid" FilterListOptions="VaryByDataType" />
                     <telerik:GridBoundColumn DataField="RemovedSerialNum" FilterControlWidth="30px" Display="true" HeaderText="Removed Serial #" UniqueName="RemovedSerialNum"
                        AutoPostBackOnFilter="true"  FilterListOptions="VaryByDataType" />
                    <telerik:GridBoundColumn DataField="ReplacementSerialNum" FilterControlWidth="30px" HeaderText="Replacement Serial #" Display="true" UniqueName="ReplacementSerialNum"
                        AutoPostBackOnFilter="true"  FilterListOptions="VaryByDataType" />
                    <telerik:GridBoundColumn DataField="FinalItemID" FilterControlWidth="30px" Visible="false" HeaderText="Final Item ID" UniqueName="FinalItemID"
                        AutoPostBackOnFilter="true" DataType="System.Guid" FilterListOptions="VaryByDataType" />
                    <telerik:GridBoundColumn DataField="ExistingItemID" FilterControlWidth="30px" HeaderText="Existing Item ID" Visible="false" UniqueName="ExistingItemID"
                        AutoPostBackOnFilter="true" DataType="System.Guid" FilterListOptions="VaryByDataType" />
                    <telerik:GridBoundColumn DataField="Latitude" FilterControlWidth="30px" HeaderText="Latitude" Display="false" UniqueName="Latitude" AutoPostBackOnFilter="true" FilterListOptions="VaryByDataType"
                        DataType="System.Double" />
                    <telerik:GridBoundColumn DataField="Longitude" FilterControlWidth="30px" HeaderText="Longitude" Display="false" UniqueName="Longitude" AutoPostBackOnFilter="true" FilterListOptions="VaryByDataType"
                        DataType="System.Double" />
                    <telerik:GridBoundColumn DataField="OnRoute" FilterControlWidth="30px" HeaderText="On Route" UniqueName="OnRoute" AutoPostBackOnFilter="true" Display="false" />
                    <telerik:GridEditCommandColumn ButtonType="ImageButton" UniqueName="EditCommandColumn">
                        <ItemStyle CssClass="MyImageButton" Wrap="true"></ItemStyle>
                    </telerik:GridEditCommandColumn>
                    <telerik:GridTemplateColumn HeaderText="Actions" AllowFiltering="false" UniqueName="Actions">
                        <ItemTemplate>
                            <a href="https://maps.google.com/maps?q=<%#Eval("Latitude") %>,<%#Eval("Longitude") %>" target="_blank">
                                <img src="/images/globe_go.png" title="Map Me" alt="Map Me" width="20" />
                            </a>
                        </ItemTemplate>
                    </telerik:GridTemplateColumn>
                </Columns>
                <EditFormSettings EditFormType="WebUserControl" InsertCaption="Add work order" EditColumn-UpdateText="Update Address" UserControlName="~/DesktopModules/LARehrigPenn/WorkOrder/EditWorkOrder.ascx">
                    <EditColumn UniqueName="EditWorkFlow">
                    </EditColumn>
                </EditFormSettings>
            </MasterTableView>
        </telerik:RadGrid>
Viktor Tachev
Telerik team
 answered on 07 Feb 2014
6 answers
131 views
Hi,

Working in VS2008, I have a normal working aspx page with telerik:RadAjaxManager, telerik:RadScriptManager and asp:WebPartManager

Everything works fine until I drop a RadAjaxPanel into a WebZone. Then it blows up with
"Cannot modify the controls collection of a GenericWebPart.  To create a new GenericWebPart, use the WebPartManager.CreateWebPart() method"

Markup is
<asp:WebPartZone ID="WebPartZone5" runat="server">
                    <ZoneTemplate>
                      <telerik:RadAjaxPanel ID="RadAjaxPanel5" runat="server" ></telerik:RadAjaxPanel>
                    </ZoneTemplate>
                </asp:WebPartZone>

UpdatePanels can go in Webpart zones, what is wrong with the Telerik Panel

Thanks and regards

Gordon
Maria Ilieva
Telerik team
 answered on 07 Feb 2014
2 answers
149 views
Hello telerik,

I have trouble while using RadChart of type Pie.
I have used datatable of my pie chart but Instead of displaying legend items as column headers, it is displaying 1,2,3...so on
I have attached one screenshot for this problem.
Please help me.

Danail Vasilev
Telerik team
 answered on 07 Feb 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?