Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
102 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
263 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
135 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
50 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
105 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
104 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
3 answers
153 views
I had a hard time to find a solution to RadMenu filter in RadGrid and made the code myself so i wanted to share it if anyone else needed it.
Maybe someone could point out stuff i could have done better... i used it here to translate to danish...

protected override void OnLoad(EventArgs e)
{
   gridview2.HeaderContextMenu.ItemCreated += HeaderContextMenu_ItemCreated;
    base.OnLoad(e);
}
 
protected void HeaderContextMenu_ItemCreated(object sender, RadMenuEventArgs e)
{
    switch (e.Item.Value)
    {
        case "SortAsc":
            e.Item.Text = "Sortere ascending";
            break;
        case "SortDesc":
            e.Item.Text = "Sortere descending";
            break;
        case "SortNone":
            e.Item.Text = "Fjern sortering";
            break;
        case "GroupBy":
            e.Item.Remove();
            break;
        case "UnGroupBy":
            e.Item.Remove();
            break;
        case "ColumnsContainer":
            e.Item.Text = "Vis/Fjern Kolonner";
            break;
        case "FilterMenuParent":
            e.Item.Text = "Filter";
            break;
        case "FilterMenuContainer":
            var btnClearFilter = e.Item.FindControl("HCFMClearFilterButton") as Button;
 
            var lcShowRows = e.Item.Controls[1] as LiteralControl;
            var lcAnd = e.Item.Controls[4] as LiteralControl;
            var btnFilter = e.Item.FindControl("HCFMFilterButton") as Button;
 
            if (btnClearFilter != null) btnClearFilter.Text = "Fjern filter";
            if (lcShowRows != null) lcShowRows.Text = "<label class=\"rgHCMShow\">Vis rækker der følger disse regler:</label>";
            if (lcAnd != null) lcAnd.Text = "<label class=\"rgHCMAnd\">Og</label>";
            if (btnFilter != null) btnFilter.Text = "Tilføj filters";
 
            foreach (var combo in e.Item.Controls.OfType<RadComboBox>())
            {
                var i = 0;
                while (i < combo.Items.Count)
                {
                    switch (combo.Items[i].Text)
                    {
                        case "NoFilter":
                            combo.Items[i].Text = "Intet Filter";
                            i++;
                            break;
                        case "Contains":
                            combo.Items[i].Text = "Indeholder";
                            i++;
                            break;
                        case "EqualTo":
                            combo.Items[i].Text = "Er Lig Med";
                            i++;
                            break;
                        case "GreaterThan":
                            combo.Items[i].Text = "Større End";
                            i++;
                            break;
                        case "LessThan":
                            combo.Items[i].Text = "Mindre End";
                            i++;
                            break;
                        default:
                            combo.Items.Remove(i);
                            break;
                    }
                }
            }
            break;
    }
}
Pavlina
Telerik team
 answered on 07 Feb 2014
11 answers
213 views
Hello!

I am evaluating RadControls for ASP.NET AJAX Q3 2013 and found an issue with the RadComboBox control.
It seems that the autocomplete feature selects the first matched item regardless of its visibility.

In the following example, if we press "2" the item "2 Hidden" is selected though it is not shown:
<telerik:RadComboBox ID="RadComboBox1" runat="server"
    <Items>   
        <telerik:RadComboBoxItem runat="server" Text="1 Shown" />   
        <telerik:RadComboBoxItem runat="server" Text="2 Hidden" style="display:none" />   
        <telerik:RadComboBoxItem runat="server" Text="2 Shown" />   
    </Items>
</telerik:RadComboBox>

Please the the attached screenshot.

What am I doing wrong? Is there a simple way to work around this issue?

Thank you!
Nencho
Telerik team
 answered on 07 Feb 2014
9 answers
396 views
Hi there

I picked up an issue when renaming a folder in the RadFileExplorer.  I had a look at your online demo's and the same happens there as well.

If you look at the following demo: FileExplorer / Custom File Content Provider

http://demos.telerik.com/aspnet-ajax/fileexplorer/examples/dbfilebrowsercontentprovider/defaultcs.aspx

You can follow these steps to reproduce the problem.

  • Create a folder, e.g. "MyTest" under the existing "Fruits" folder.
  • The "MyTest" folder will display in the Tree view as well as the Grid view.
  • Rename it to "MyTest1" in the Tree view on the left hand side.
  • The folder is renamed in the Tree view and the Grid view shows the content of the folder
  • Now click on the parent "Fruits" folder in the Tree View.
  • The Tree view will display the correct new name, but the Grid view still shows the old name of "MyTest" (if it does not behave this way the first time, just repeat the steps of renaming the folder in the Tree view again).

When clicking a folder in the Tree view. the Grid view gets refreshed once, but then it seems as if it gets cached and when clicking it again, it shows the old data, even though a folder has been renamed in the meantime in the Tree view.

Any way to get around this problem?

Greetings

Gerrit

Vessy
Telerik team
 answered on 07 Feb 2014
1 answer
78 views
My SEO team wants me to use an external JS or jQuery so the links are not crawled by Google.

Is it possible to setup RadMenu this way?

We currently use noindex nofollow, but the SEO team does not want us to use noindex nofollow on internal links.

Kate
Telerik team
 answered on 07 Feb 2014
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?