Telerik Forums
UI for ASP.NET AJAX Forum
9 answers
257 views
Hey,

I have a problem with my radmap. In fact, when i use my MasterPage, my radmap becomes white (i havent Layers...)

Look my code :

DEFAULT.ASPX
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" MasterPageFile="~/SITE CG/CG71/MasterPage.Master" Inherits="Portail_Eau.Default" %>
 
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<%@ Register Src="~/UserControl/UserImpInfo.ascx" TagPrefix="uc1" TagName="UserImpInfo" %>
<%@ Register Src="~/UserControl/UserCaracStation.ascx" TagPrefix="uc1" TagName="UserCaracStation" %>
<%@ Register Src="~/UserControl/UserFonctioStation.ascx" TagPrefix="uc1" TagName="UserFonctioStation" %>
<%@ Register Src="~/UserControl/UserGestionDoc.ascx" TagPrefix="uc1" TagName="UserGestionDoc" %>
<%@ Register Src="~/UserControl/UserERROR.ascx" TagPrefix="uc1" TagName="UserERROR" %>
 
 
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
 
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
 
    <script src="Content/Scripts.js"></script>
    <link href="Content/DefaultStyles.css" rel="stylesheet" />
 
    <form id="form1" runat="server">
 
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
            <Scripts>
                <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js"></asp:ScriptReference>
                <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js"></asp:ScriptReference>
                <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js"></asp:ScriptReference>
            </Scripts>
        </telerik:RadScriptManager>
 
        
            <telerik:RadMap ID="RadMap1" runat="server" MinZoom="9" OnItemDataBound="RadMap1_ItemDataBound" CssClass="MyRadMap">
                <DataBindings>
                    <MarkerBinding DataShapeField="Shape" DataTitleField="nomStation" DataLocationLatitudeField="latitude" DataLocationLongitudeField="longitude" />
                </DataBindings>
                <LayersCollection>
                    <telerik:MapLayer Subdomains="a,b,c" Type="Tile" UrlTemplate="http://#= subdomain #.tile.thunderforest.com/outdoors/#= zoom #/#= x #/#= y #.png"></telerik:MapLayer>
                </LayersCollection>
            </telerik:RadMap>
 
             
    </form>
 
</asp:Content>


And my MasterPage :
<%@ Master Language="C#" AutoEventWireup="true" CodeBehind="MasterPage.master.cs" Inherits="Portail_Eau.SITE_CG.CG71.MasterPage" %>
 
<!doctype html>
 
<html lang="fr" class="no-js">
<head runat="server">
 
    <title>Département de Saône-et-Loire-Très haut débit</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
    <link href="../../SITE CG/CG71/styles/style.css" rel="stylesheet" type="text/css" />
     
    <link rel="icon" type="image/gif" href="http://www.cg71.fr/typo3conf/ext/e_tca_extented/res/cg71/images/favicon.ico" />
    <link href="../../SITE CG/CG71/typo3conf/ext/e_googlemap/pi1/infobulle.css" rel="stylesheet" type="text/css" />
 
</head>
<body>
   
        <asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server">
         
        </asp:ContentPlaceHolder>
    
 
</body>
 
</html>



This is my result :

http://puu.sh/f5OX7/27239a7d9a.jpg


Hum, wierd !
Ianko
Telerik team
 answered on 04 Sep 2015
9 answers
557 views
Hi,
I added some custom tools in my radEditor and I open the RadWindow with this code :

Telerik.Web.UI.Editor.CommandList["InsertDoc"] = function (commandName, editor, args)
    {
        var myCallbackFunction = function (sender, args)
        {
            alert("Hello World");
        }    
        
        editor.showExternalDialog
        (
            '/Test.aspx',
            {},
            950,
            700,
            myCallbackFunction,
            null,
            'Insert Document',
            true,
            Telerik.Web.UI.WindowBehaviors.Close + Telerik.Web.UI.WindowBehaviors.Move,
            false,
            true
        );
    };

 It works fine but now, I would like to maximize the RadWindow like with this code

var manager = $find("<%= RadWindowManager1.ClientID %>");
var oWin = manager.open("Test.aspx", "RadWindow1");
oWin.maximize();

How can I do that ??

Thanks.
Fernando
Top achievements
Rank 2
 answered on 04 Sep 2015
3 answers
137 views

Hi,

 I am fairly new to the Telerik controls. I have couple of problems with RadAsyncUpload.

1. The control's labels are not properly named. I get "#ResourceNotFound#RadAsynUpload:Remove and "#ResourceNotFound#:RadAsyncUpload:Select" instead of "Remove" and "Select" (Attached a screenshot of error)

2. Could not generate "OnFileUploaded" event in my code behind. Am I missing registering something ?

 Please help me with a sample that addresses both of these issues.

 

Regards,

Siva

 â€‹

Peter Filipov
Telerik team
 answered on 04 Sep 2015
5 answers
195 views

I am using RequiredFeildValidators inside a RadWindow but the btnAddDebtor1 click causes a postback closing the window even though the clientside validators are false.  What is the solution to this issue?

 

<!DOCTYPE html>
 
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
 
    <script type="text/javascript">
 
        function GetRadWindow() {
            var oWindow = null;
 
            if (window.radWindow)
                oWindow = window.radWindow;
            else if (window.frameElement && window.frameElement.radWindow)
                oWindow = window.frameElement.radWindow;
            return oWindow;
        }
 
        function CloseModal() {
            var oWnd = GetRadWindow();
            if (oWnd) oWnd.close();
        }
 
    </script>
 
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server" />
 
    <div>
    <telerik:RadButton ID="btnAddDebtor" runat="server" Text="Add Debtor" ButtonType="StandardButton" CausesValidation="false">
        <Icon PrimaryIconCssClass="rbAdd" PrimaryIconLeft="4" PrimaryIconTop="4"></Icon>
    </telerik:RadButton>
 
    <telerik:RadWindowManager ID="RadWindowManager1" runat="server" EnableShadow="true">
        <Windows>
        <telerik:RadWindow ID="RadWindow_DebtorContent" runat="server" Width="700" Height="480" Modal="true" Behaviors="Close">
            <ContentTemplate>
                <div class="form-horizontal" style="width:670px">
                    <br />
                   <div class="form-group">
                        <asp:Label runat="server" AssociatedControlID="Contact" CssClass="col-md-2 control-label">Contact</asp:Label>
                        <div class="col-md-10">
                        <telerik:RadTextBox runat="server" ID="Contact" CssClass="form-control" Width="240px"></telerik:RadTextBox>
                        <asp:RequiredFieldValidator runat="server" ID="rfContact" Display="Dynamic" ControlToValidate="Contact" CssClass="text-danger" ErrorMessage="Please provide Contact" ValidationGroup="Debtor"></asp:RequiredFieldValidator>
                        </div>
                    </div>
                    <br />
 
                    <telerik:RadButton ID="btnAddDebtor1" runat="server" Text="Add Debtor" ButtonType="StandardButton" ValidationGroup="Debtor" OnCommand="btnAddDebtor_Click">
                        <Icon PrimaryIconCssClass="rbAdd" PrimaryIconLeft="4" PrimaryIconTop="4"></Icon>
                    </telerik:RadButton>
                    <br />
                </div>
            </ContentTemplate>
        </telerik:RadWindow>
        </Windows>
    </telerik:RadWindowManager>
    </div>
    </form>
</body>
</html>

C#

  

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
 
namespace Bookings
{
    public partial class test : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            RadWindow_DebtorContent.OpenerElementID = btnAddDebtor.ClientID;
        }
 
        public void btnAddDebtor_Click(object sender, CommandEventArgs e)
        {
            if (this.Page.IsValid)
            {
                //Update Database
 
                ScriptManager.RegisterStartupScript(this, GetType(), "close", "CloseModal();", true);
            }
        }
    }
}

Marin Bratanov
Telerik team
 answered on 04 Sep 2015
1 answer
133 views

Hello,

I am trying to replace the default Sharepoint date picker with the Telerik Date Picker control. I have installed the Sharepoint Web Parts through the msi, and have installed the UI for ASP.NET AJAX controls through the Telerik Control Panel. Can anyone please guide me on what my next steps need to be in order to incorporate Telerik's Date Picker control in my Sharepoint site? 

Thanks in advance.

Marin
Telerik team
 answered on 04 Sep 2015
6 answers
393 views

Hi,

My bar chart uses only one colour for all series, how can I get it to use random colours? (or generate a custom palette myself).

Preferably to be set in code-behind.

Marin Bratanov
Telerik team
 answered on 04 Sep 2015
14 answers
597 views
I am using the FormDecorator to control the look and feel of my site.

After reading...

Telerik ASP.NET FormDecorator allows you to beautifully style 10 types of elements: Buttons, CheckBoxes, RadioButtons, Fieldset, TextBox, Textarea, Labels, H4, h5, H6.

...I assumed that the Form Decorator would change the appearance of any asp:Label on my form.  In fact, it does!  However, it only seems to change the color and not the font-family to match the currently selected skin.  Is this a bug or a design flaw or something I am doing wrong?

Thanks.
Jerry
Top achievements
Rank 1
 answered on 03 Sep 2015
11 answers
492 views
Good morning,
is there a way to disable the blinking cursor at the end of the ComboBox select Box?

See attached a example image.

Thanks in advance.

Regards
Dirk
RANI
Top achievements
Rank 1
 answered on 03 Sep 2015
5 answers
470 views

I need to ​exit edit mode in batch radgrid ​on client click of a button in that radgrid. Is there any way to do this ?

I couldn't retreive data entered in the RadGrid while its in edit mode (using javascript : "batchManager.getCellValue(mapCell)").

I have to do this in client side too.

Thanks for your help ! 

AbbasB

 

 
Viktor Tachev
Telerik team
 answered on 03 Sep 2015
3 answers
127 views

Hi,

We have a website integrated with Sitefinity(CMS) and we started using Telerik  controls. I have encountered a problem which needs to be solved as soon as possible to meet our deadline. 

The RadGrid was working till this afternoon, we realized the commands does not fire anymore. The grid displays the rows but the "Add New Record", "Edit" and "Delete" does not work. These were working before, not sure what happened now. All I could find is, there are few JavaScript errors (please see the attached image). 

 The grid is also pasted below for your review. Please help us out of this issue.

 <telerik:RadGrid ID="radProviderListGrid" AllowAutomaticDeletes="true"
            DataSourceID="sqlCEProviderActivities" AllowSorting="True" AllowPaging="True" Width="650px"
            runat="server" PageSize="50"
            AllowAutomaticInserts="false"
            Skin="WebBlue" OnItemCommand ="radProviderListGrid_ItemCommand"  OnItemDeleted="radProviderListGrid_ItemDeleted" OnItemUpdated="radProviderListGrid_ItemUpdated" 
            OnItemInserted ="radProviderListGrid_ItemInserted" OnInsertCommand="radProviderListGrid_InsertCommand" OnUpdateCommand="radProviderListGrid_UpdateCommand" 
            MasterTableView-DataKeyNames="ID" AutoGenerateColumns="false" ShowGroupPanel="True" EnableHierarchyExpandAll="true" EnableLinqExpressions="false" GridLines="None">
            <PagerStyle Mode="NextPrevAndNumeric"></PagerStyle>
            <MasterTableView Width="100%" CommandItemDisplay="Top" EditMode="EditForms" DataSourceID="sqlCEProviderActivities" DataKeyNames="ID" AutoGenerateColumns="false" ShowGroupFooter="true">
                <NoRecordsTemplate>
                    <div>
                        There are no CE Provider Activities to display
                    </div>
                </NoRecordsTemplate>
                <Columns>
                    <telerik:GridEditCommandColumn ButtonType="LinkButton" UniqueName="EditCommandColumn"/>
                    <telerik:GridBoundColumn DataField="ID" HeaderText="ID" SortExpression="ID" UniqueName="ID" Visible="true">
                    </telerik:GridBoundColumn> 
                    <telerik:GridBoundColumn DataField="StartDate" HeaderText="Start Date" SortExpression="StartDate" UniqueName="StartDate" DataFormatString="{0:d}">
                    </telerik:GridBoundColumn> 
                    <telerik:GridBoundColumn DataField="EndDate" HeaderText="End Date" SortExpression="EndDate" UniqueName="EndDate" DataFormatString="{0:d}"/>
                    <telerik:GridBoundColumn DataField="City" HeaderText="City" SortExpression="City" UniqueName="City">
                    </telerik:GridBoundColumn> 
                    <telerik:GridCheckBoxColumn DataField="IsOngoingActivity" HeaderText="Ongoing Activity?" DataType="System.Boolean" SortExpression="IsOngoingActivity" UniqueName="IsOngoingActivity"/>
                    <telerik:GridCheckBoxColumn DataField="ListOnSite" HeaderText="List On Site" DataType="System.Boolean" SortExpression="ListOnSite" UniqueName="ListOnSite"/>
                    <telerik:GridButtonColumn Text="Delete" CommandName="Delete" ButtonType="LinkButton" UniqueName="DeleteCommandColumn" ConfirmText="Delete Row?" ConfirmTitle="Delete?" />
                </Columns>
                <EditFormSettings EditFormType="Template">
                    <EditColumn ButtonType="ImageButton" />
                    <FormTemplate>
                        <p></p>
                        <p><b>CE Provider Activity Details</b></p>
                        <hr />
                         <table class="formTable">
                                       
                                        <tr>
                                            <td style="text-align:right">Do not list on site</td>
                                            <td class="control">
                                                <asp:CheckBox ID="chkDoNotListOnsite" runat="server" Checked='<%# IIf(DataBinder.Eval(Container.DataItem, "ListOnSite") Is DBNull.Value, False, Eval("ListOnSite"))%>' />
                                            </td>
                                            <td style="text-align:right">Is Ongoing Activity?</td>
                                            <td class="control">
                                                <asp:CheckBox ID="chkOngoingActivity" runat="server" Checked='<%# IIf(DataBinder.Eval(Container.DataItem, "IsOngoingActivity") Is DBNull.Value, False, Eval("IsOngoingActivity"))%>'/>
                                            </td>                                        
                                        </tr>
                                        <tr>
                                          <td style="text-align:right">Start Date :</td>
                                            <td class="control">
                                                <telerik:RadDatePicker ID="radDateStartDate" Width="150px" runat="server" DbSelectedDate='<%# Bind("StartDate")%>' Skin="Metro">
                                                </telerik:RadDatePicker>
                                            </td>  
                                            
                                            <td style="text-align:right">End Date :</td>
                                            <td class="control">
                                                <telerik:RadDatePicker ID="radDateEndDate" Width="150px" runat="server"  DbSelectedDate='<%# Bind("EndDate")%>' Skin="Metro">
                                                </telerik:RadDatePicker>
                                            </td>
                                        </tr>

                                        <tr>
                                            <td style="text-align:right">Country</td>
                                            <td class="control">
                                                <asp:DropDownList runat="server" ID="ddlCountry" class="dropdownlist" DataSourceID="sqlCountries" 
                                                     DataTextField="Country" >
                                                </asp:DropDownList>
                                            </td>
                                             <td style="text-align:right">Languages</td>
                                            <td class="control"><asp:DropDownList runat="server" ID="ddlLanguages" class="dropdownlist" DataTextField='<%# Bind("Languages")%>'>
                                                <asp:ListItem></asp:ListItem>
                                                    <asp:ListItem>English</asp:ListItem>
                                                    <asp:ListItem>French</asp:ListItem>    
                                                    <asp:ListItem>English & French</asp:ListItem>    
                                            </asp:DropDownList></td>

                                        </tr>
                                        
                                        <tr>
                                            <td style="text-align:right">State/Province</td>
                                            <td class="control">
                                                <asp:DropDownList runat="server" ID="ddlStates" class="dropdownlist" DataSourceID="sqlStates" DataTextField="FullName" />
                                            </td>
                                            <td style="text-align:right">Registration Fee</td>
                                            <td class="control">
                                                <telerik:RadNumericTextBox ID="radNumericTextBox" runat="server" class="textBox" NumberFormat-DecimalDigits="2" Type="Currency" MinValue="0" Text='<%# Bind("RegistrationFee")%>'> 
                                                </telerik:RadNumericTextBox></td>
                                        </tr>
                                        <tr>
                                            <td style="text-align:right"> City </td>
                                             <td class="control">
                                                 <asp:TextBox ID="txtCity" runat="server" class="textBox" Text='<%# Bind("City")%>'>
                                                </asp:TextBox>
                                             </td>
                                            <td>

                                            </td>
                                            <td>

                                            </td>
                                        </tr>
                                        
                                         <tr>
                                            <td style="text-align:right">Website</td>
                                            <td colspan="3"><asp:TextBox ID="txtWebsite" runat="server" ClientIdMode="Static" class="URL" Text='<%# Bind("Website")%>'>
                                                </asp:TextBox>
                                                <asp:RegularExpressionValidator ID="regUrl"
                                                    runat="server"
                                                    ControlToValidate="txtWebsite"
                                                    ValidationExpression="^((http|https)://)?([\w-]+\.)+[\w]+(/[\w- ./?]*)?$"
                                                    Text="Enter a valid URL" ForeColor="red"/>
                                            </td>
                                        </tr>
                                    </table>
                        <hr />
                        <table id="tblEditForm" style="border-collapse: collapse;">
                            <tr><td colspan="2"></td></tr>
                            <tr>
                                <td>
                                    <table><tr><td colspan="2">&nbsp;</td></tr></table>
                                </td>
                                <td>
                                    <table id="tblEditFormInner">
                                        <tr>
                                            <td colspan="2">
                                                <asp:Button ID="btnUpdate" Text='<%# IIf((TypeOf(Container) is GridEditFormInsertItem), "Insert", "Update") %>'
                                                    runat="server" CommandName='<%# IIf((TypeOf(Container) is GridEditFormInsertItem), "PerformInsert", "Update")%>'></asp:Button>&nbsp;
                                                <asp:Button ID="btnCancel" Text="Cancel" runat="server" CausesValidation="False"
                                                    CommandName="Cancel"></asp:Button>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>&nbsp;</td>
                                        </tr>
                                    </table>
                                </td>
                            </tr>
                        </table>
                    </FormTemplate>
                </EditFormSettings>
            </MasterTableView>
            <ClientSettings AllowColumnsReorder="True">
                <Selecting AllowRowSelect="True"></Selecting>
            </ClientSettings>
            <GroupingSettings ShowUnGroupButton="true" />
        </telerik:RadGrid>

 

Viktor Tachev
Telerik team
 answered on 03 Sep 2015
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?