Telerik Forums
UI for ASP.NET AJAX Forum
10 answers
178 views
Hi,

Do we have Property Grid Control for Windows Forms?

Thanks,
Albert
Nikolay
Telerik team
 answered on 19 Jul 2011
4 answers
145 views
Hi,

I'm currently trying to open a radWindow on a parent page from a click on a button on a toolBar inside a grid (I get the idea from this demo), but it doesn't work well. The only thing I can do is to open the new window behind the current window and the modal/title attribute don't work at all (but the size it correct). If I try to open the window from a standard button, it works just fine. Is it anyone who know why this doesn't work ?

Thank you
David

Here is my code :

Default.aspx :

<!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>
    <telerik:RadStyleSheetManager id="RadStyleSheetManager1" runat="server" />
</head>
<body>
    <form id="form1" runat="server">
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
        <Scripts>
            <%--Needed for JavaScript IntelliSense in VS2010--%>
            <%--For VS2008 replace RadScriptManager with ScriptManager--%>
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" />
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js" />
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js" />
        </Scripts>
    </telerik:RadScriptManager>
    <script type="text/javascript">
        function yo(sender, e) {
            radopen("test.aspx", null);
        }
    </script>
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
    </telerik:RadAjaxManager>
     
    <telerik:RadWindowManager ID="RadWindowManager1" runat="server"
            EnableShadow="true" RestrictionZoneID="RestrictionZone"
            ShowContentDuringLoad="False">
        <Windows>
            <telerik:RadWindow ID="win1" runat="server" VisibleStatusbar="false" Behaviors="Close,Move" Width="750px" Height="400px" Modal="true" Title="I'm not working" />
        </Windows>
    </telerik:RadWindowManager>
     
    <div>
        <telerik:RadButton ID="yo" runat="server" Text="yo" AutoPostBack="false" OnClientClicked="yo">
        </telerik:RadButton>
    </div>
    </form>
</body>
</html>


test.aspx:

<!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 type="text/javascript">
        function here(sender, e) {
            var win = GetRadWindow().BrowserWindow;
            win.radopen(null, "win1"); // Open a window that is define in the radWindowManager of the parentPage
        }
 
        // Donne la référence d'une fenêtre radWindow
        function GetRadWindow() {
            var oWindow = null;
            if (window.radWindow)
                oWindow = window.radWindow;
            else if (window.frameElement.radWindow)
                oWindow = window.frameElement.radWindow;
            return oWindow;
        }
    </script>
 
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <telerik:RadButton ID="but1" runat="server" AutoPostBack="false" Text="Click here Dude!"
            OnClientClicked="here">
        </telerik:RadButton>
 
        <telerik:RadScriptManager runat="server"></telerik:RadScriptManager>
 
        <telerik:RadGrid ID="RadGrid1" runat="server" AutoGenerateColumns="false" OnNeedDataSource="RadGrid1_needDS">
            <MasterTableView AutoGenerateColumns="false" Name="test" CommandItemDisplay="Top"
                    DataKeyNames="Id">
                <CommandItemTemplate>
                    <telerik:RadToolBar ID="RadToolBarGrid" runat="server" OnClientButtonClicking="here">
                        <Items>
                            <telerik:RadToolBarButton Text="Add new" ImageUrl="~/Images/Add.png">
                            </telerik:RadToolBarButton>
                        </Items>
                    </telerik:RadToolBar>
                </CommandItemTemplate>
                <Columns>
                    <telerik:GridBoundColumn DataField="Id" HeaderText="Id" UniqueName="Id">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="Title" HeaderText="Title" UniqueName="Title">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="Style" HeaderText="Style" UniqueName="Style">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="Rating" HeaderText="Rating" UniqueName="Rating">
                    </telerik:GridBoundColumn>
                </Columns>
            </MasterTableView>
        </telerik:RadGrid>   
    </div>
    </form>
</body>
</html>


test.aspx.cs:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
 
namespace RadControlsWebApp5
{
    public partial class test : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
 
        }
 
        protected void RadGrid1_needDS(object sender, EventArgs e)
        {
            List<movie> movies = new List<movie>();
 
            movies.Add(new movie(1, "King Kong", "Action", "4/5"));
            movies.Add(new movie(2, "The Black Knight", "Action", "4.5/5"));
            movies.Add(new movie(3, "Harry Potter and the deadly hallow", "Fantasy", "4/5"));
            movies.Add(new movie(4, "Inception", "Sc-fiction", "5/5"));
            movies.Add(new movie(5, "Transformer : The revenge of the fallen", "Action, Sc-Fiction", "3/5"));
 
            RadGrid1.DataSource = movies;
        }
    }
 
    public class movie
    {
        public movie(int id, string title, string style, string rating)
        {
            Id = id;
            Title = title;
            Style = style;
            Rating = rating;
        }
 
        public int Id { get; private set; }
        public string Title { get; private set; }
        public string Style { get; private set; }
        public string Rating { get; private set; }
    }
}


EDIT :

Sorry, I notice that the title just work fine in this example. In fact, I realize that if I set a title in the <title></title> in the head of a aspx page, this title come over the title of the window setting.  
David
Top achievements
Rank 1
 answered on 19 Jul 2011
2 answers
248 views
Hi all,

I am using GridDateTimeColumn, there is little bit confused about its filters.
In the "EqualTo", it requires user to input exactly date and time.
Are there anyways to ignore the time?
For example, "07/15/11" for the result of that day, no need "07/15/11 3:13"

Thanks.

Andy.
Jayesh Goyani
Top achievements
Rank 2
 answered on 19 Jul 2011
1 answer
115 views
Hi Friends,

Greetings...

I need to do the Rad Window as Po pup Window like attached image. any  suggestions?


thanks and regards,
vinoth xavier
Bozhidar
Telerik team
 answered on 19 Jul 2011
1 answer
96 views
Hello good day

I have this example, my problem is that when loading a show RadWindows pagina.aspx the external from the menu:

Maintenance => maint. personal

should be opaque (black) around the RadWindows but in this case the visible car parks rather RaMenu Ensim of Radwindows

I just want to do the following call RadWindows and only display the rest RadWindows and can not do anything close RadWindows hata

I can not solve this problem and hope you can help me solve this problem

from already thank you very much


==>> Example here to download
Marin Bratanov
Telerik team
 answered on 19 Jul 2011
1 answer
102 views
Hello good day

I have this example, my problem is that when loading a show RadWindows pagina.aspx the external from the menu:

Maintenance => maint. personal

should be opaque (black) around the RadWindows but in this case the visible car parks rather RaMenu Ensim of Radwindows

I just want to do the following call RadWindows and only display the rest RadWindows and can not do anything close RadWindows hata

I can not solve this problem and hope you can help me solve this problem

from already thank you very much


==>> Example here to download
Marin Bratanov
Telerik team
 answered on 19 Jul 2011
2 answers
96 views

Hello,

in my Grid, I set AllowFilteringByColumn=true, so that a User A can filter the Grid. Then i want to disable (or invisible) the Filter Controls, so that a User B can see the Filters of the filtered Grid, but User B should not change the Filters.

Is this possible?

Best Regards

Tom

Thomas
Top achievements
Rank 1
 answered on 19 Jul 2011
1 answer
91 views
Hello,

I'm trying to implement the radtooltip inside a page but once i load the page i get the following javascript error
"Microsoft JScript runtime error: 'map' is null or not an object"

please find below my code:
<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="TripoliActivities.aspx.vb"
    Inherits="BeitElYasmine._TripoliActivities" MasterPageFile="~/MasterPages/FrontEnd.Master" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<asp:Content ID="Content1" runat="server" ContentPlaceHolderID="ContentPlaceHolder2">
    <telerik:RadAjaxPanel ID="AjaxPanel1" runat="server" LoadingPanelID="LoadingPanel1"></telerik:RadAjaxPanel>
      
      
   <div style="text-align: center">
<asp:ImageMap ID="ImageMap1" HotSpotMode="Navigate" ImageUrl="Img/FloorPlan.jpg"
AlternateText="FloorPlan" runat="server">
            <asp:PolygonHotSpot Coordinates="36,221,36,304,134,304,134,278,228,278,228,304,359,304,359,279,349,228,346,205,301,205,301,34,36,34,36,221" />
            <asp:PolygonHotSpot Coordinates="301,34,490,34,490,151,301,149,301,34" />
            <asp:PolygonHotSpot Coordinates="301,149,301,204,347,204,350,225,470,225,470,152,301,149" />
            <asp:PolygonHotSpot Coordinates="350,226,360,289,469,289,469,226,350,226" />
        </asp:ImageMap>
    </div>
    <telerik:RadToolTip ID="tooltip" RelativeTo="Mouse" runat="server" TargetControlID="area0"
        Animation="FlyIn" Position="BottomCenter" IsClientID="true" ShowCallout="false" EnableShadow="true">
        <img src="Img/livingRoom.jpg" alt="LivingRoom" /></telerik:RadToolTip>
    <telerik:RadToolTip ID="RadToolTip1" RelativeTo="Mouse" runat="server" TargetControlID="area1"
        Animation="FlyIn" Position="TopRight" IsClientID="true" ShowCallout="false" EnableShadow="true">
        <img src="Img/kitchen.jpg" alt="Kitchen" /></telerik:RadToolTip>
    <telerik:RadToolTip ID="RadToolTip2" RelativeTo="Mouse" runat="server" TargetControlID="area2"
        Animation="FlyIn" Position="MiddleRight" IsClientID="true" ShowCallout="false" EnableShadow="true">
        <img src="Img/bathroom.jpg" alt="Bathroom" /></telerik:RadToolTip>
    <telerik:RadToolTip ID="RadToolTip3" RelativeTo="Mouse" runat="server" TargetControlID="area3"
        Animation="FlyIn" Position="BottomRight" IsClientID="true" ShowCallout="false" EnableShadow="true">
        <img src="Img/entrance.jpg" alt="Entrance" /></telerik:RadToolTip>
  
    <script type="text/javascript">
        //<![CDATA[
        var map = document.getElementsByName("ImageMapImageMap1")[0];
        var areas = map.getElementsByTagName("AREA");
  
        for (var i = 0; i < areas.length; i++) {
            var area = areas[i];
            area.setAttribute("id", "area" + i);
            //Prevent from postbacking the page 
            area.onclick = function(e) { return false; };
        }
        //]]> 
    </script 
</asp:Content>

Thanks a lot for your help guys,
Mike
Marin Bratanov
Telerik team
 answered on 19 Jul 2011
2 answers
45 views
Is there a way to increase this from 1024? I made the field larger in my database but the string stops accepting input at 1024 still. I figure this must be built into the control but can't find a property to override this.

Also, how do I detect if the "No end date" recurrence radio button is checked? We don't want users to put in unlimitted appointments. If that radio button cannot be disabled I want to cancel the appointment if they select it and it would be good if I could set the default to the "End after" or "End by" radio button.
Dan
Top achievements
Rank 1
 answered on 19 Jul 2011
3 answers
83 views
Hi All,

I have a problem with RadComboBox and setting SelectedIndex value.

My controls structure are next:

<telerik:RadToolTipManager ID="editRecordTooltip" ShowEvent="OnClick" OffsetY="-1" HideEvent="ManualClose" Modal="true"
    Width="470" Height="390" runat="server" EnableShadow="true" OnAjaxUpdate="OnAjaxUpdate" RelativeTo="Element"
    Position="MiddleRight">                                
</telerik:RadToolTipManager>
 
<telerik:RadGrid ID="rgRecords" AutoGenerateColumns="false" runat="server" OnItemDataBound="rgRecords_ItemDataBound">
    <MasterTableView DataKeyNames="ID">
        <Columns>
.....
         </Columns>
    </MasterTableView>
</telerik:RadGrid>


 protected void OnAjaxUpdate(object sender, ToolTipUpdateEventArgs args)
 {
     UpdateToolTip(args.Value, args.UpdatePanel);
 }
private void UpdateToolTip(string elementId, UpdatePanel panel)
{            
   Control ctrl = Page.LoadControl("EditRecord.ascx");
   panel.ContentTemplateContainer.Controls.Add(ctrl);
}

protected void rgRecords_ItemDataBound(object sender, GridItemEventArgs e)
        {
            if (e.Item.ItemType == GridItemType.Item || e.Item.ItemType == GridItemType.AlternatingItem)
            {
                var target = e.Item.FindControl("hlEdit");
                editRecordTooltip.TargetControls.Add(target.ClientID, (e.Item as GridDataItem).GetDataKeyValue("ID").ToString(), true);
            }
        }

EditRecord.ascx contains:

<telerik:RadComboBox runat="server" ID="rcbCompany" Filter="Contains" ZIndex="50001" Width="234px" CssClass="select-text" />
protected override void OnPreRender(EventArgs e)
{
   base.OnPreRender(e);
   
   
   rcbCompany.DataSource = Source;
   rcbCompany.DataValueField = "ID";
   rcbCompany.DataTextField = "Name";
   rcbCompany.DataBind();
rcbCompany.SelectedIndex = 10; // for example
   this.DataBind();
}
When I set rcbCompany.SelectedIndex = 10, it does not worked.
On front-end selectedindex is always -1.

But, standart DropDownList worked perfectly.

How I can set SelectedIndex?

Thanks
Kalina
Telerik team
 answered on 19 Jul 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?