Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
135 views

We have a radgrid that gets bound in 2 different ways. This depends on what action has been performed on the page..e.g

1. select comboboxA - will bind radgrid via server side binding using NeedDataSource event
2. select comboboxB - will bind radgrid via page method + client side binding . Below are are the the main 2 javascript functions in use .

function GetDataForGrid() {     PageMethods.GetDataForGrid(GetDataForGridBy_Result, GetDataForGridByHeader_Failed);}

  

function GetDataForGrid_Result(result) { 

    var tableView = $find("<%=RadGrid.ClientID %>").get_masterTableView(); 

    tableView.set_dataSource(result.Value);

    tableView.dataBind();

}

 

The problem is, after the client side binding, if the user clicks on a certain row we need to do some processing in a server side event -  RadGrid_ItemCommand(object sender, GridCommandEventArgs e) ...
However when we obtain the datakey within this server side event, it is  always wrong....  

 

 

 

 

Tsvetoslav
Telerik team
 answered on 19 Jul 2011
3 answers
198 views
I am looking to replace a Standard Asp.net Listbox with a telerik RadListBox but there is inconsistent behavior between the two that is stopping me from achieving this.

I have an existing asp.net Listbox with AutoPostBack Set to true, which is used for navigation.  Focus is set on this control on page load and users can use the keyboard up and down arrow keys to navigate up and down this Listbox.  Because autopostback is set on this Listbox this causes a postback and the page is refreshed....

I swapped this control out for a RadListBox control and it works find Apart from:
Pressing up and down arrows on the keyboard doesnt cause a postback when autopostback is set.

This means I cant swap the control out as it doesn't match the functionality of the old fashioned listbox control.

Two Questions:
1. Am I doing anything wrong, can autopostback be set and can the RADListbox postback on keyboard arrow up and arrow down
2. If not can this bug be fixed to match standard functionality of the standard Listbox control

Thanks
Genady Sergeev
Telerik team
 answered on 19 Jul 2011
10 answers
185 views
Hi,

Do we have Property Grid Control for Windows Forms?

Thanks,
Albert
Nikolay
Telerik team
 answered on 19 Jul 2011
4 answers
155 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
257 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
128 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
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
1 answer
114 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
112 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
96 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
Narrow your results
Selected tags
Tags
+? more
Top users last month
Top achievements
Rank 1
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ivory
Top achievements
Rank 1
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
YF
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Top achievements
Rank 1
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ivory
Top achievements
Rank 1
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
YF
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?