Telerik Forums
UI for ASP.NET AJAX Forum
0 answers
67 views
I have a Rad Menu created in .CS class:-

public

 

static Menu CreateTaskMenu()

 

{

 

Menu tasksMenu = new Menu();

 

 

RadMenuItem headerItem = new RadMenuItem();

 

 

RadMenuItem seperatorItem = new RadMenuItem();

 

seperatorItem.IsSeparator =

true;

 

 

RadMenuItem taskItem1= new RadMenuItem();

 

taskItem1.Text = MARK_AS_COMPLETE;

taskItem1.Value = MARK_AS_COMPLETE;

 

RadMenuItem taskItem2 = new RadMenuItem();

 

taskItem1.Text = EDIT_TASK;

taskItem1.Value = EDIT_TASK;

 

RadMenuItem taskItem3 = new RadMenuItem();

 

taskItem1.Text = DELETE_TASK;

taskItem1.Value = DELETE_TASK;

 

RadMenuItem taskItem4 = new RadMenuItem();

 

taskItem1.Text = EMAIL_TASK;

taskItem1.Value = EMAIL_TASK;

 

tasksMenu.Items.Add(taskItem1);

tasksMenu.Items.Add(taskItem2);

tasksMenu.Items.Add(taskItem3);

tasksMenu.Items.Add(seperatorItem);

tasksMenu.Items.Add(taskItem4);

tasksMenu.ID =

"tasksMenu";

 

 

 

 

 

return tasksMenu;

 

}

I have a grid in which I have an image on click of which i want to display this menu.
The grid and this menu are placed in a user control which is again created in .CS and no .ascx file.

These main user control is to be accessed in a web part. I am not able to acess the client id as it is changing in web part than what it is in user control.

Please help me in this scenario.

ayush mohan
Top achievements
Rank 1
 asked on 15 Oct 2009
2 answers
174 views
Hello,

I have a RadGrid with 500 records per page and am trying to use the GridClientSelectColumn in conjuntion with the SelectedItems property on the server side.  Given the big page size, I have to have ViewState turned off.  This in turn results in 0 for the value of the SelectedItems property.  Can you please point me to a sample that provides a work around?

Thanks,
Chris
Schlurk
Top achievements
Rank 2
 answered on 15 Oct 2009
1 answer
124 views
Hi,

I have an asp:button control and i have it's style set to display:none. 

<asp:Button runat="server" ID="btnExport" style="display:none" OnClick="btnExport_Click" />

here is how it is rendered to the client:

<input type="submit" name="ctl00$m$g_d6cbcf9b_0316_4b3a_a32b_f7551a059317$ctl00$btnExport" value="" id="ctl00_m_g_d6cbcf9b_0316_4b3a_a32b_f7551a059317_ctl00_btnExport" style="display:none" />

BUT...when the page renders, the button is not visible EXCEPT for the very right edge (which the SkinManager adds once the paged is loaded). Attached is an image showing the barely partially rendered button.

How do i correct this? can i have the button register itself to opt out? Also, my SkinManager control is in a master page.

thanks!
bill
Bill Anderson
Top achievements
Rank 1
 answered on 15 Oct 2009
2 answers
178 views
Just as the title states.

I hvae been able to make clicking of the tab force a post back with this code:
<script type="text/javascript">  
        Sys.Application.add_load(function()  
            {  
                currentlySelectedTab = $find("<%= RecipientTabs.ClientID %>").get_selectedTab();  
            });  
        function onClientTabSelecting(sender, args)  
        {  
            var currentlySelectedTab = args.get_tab().get_tabStrip().get_selectedTab();  
            if (currentlySelectedTab.get_index() == 1)  
            {  
                $find("<%= AjaxPanel1.ClientID %>").set_enableAJAX(false);  
            }  
        }  
        </script> 

but that only causes a normal post back when I click on the actual tab.

I have a regular asp.net button that I want to have that force a post back (it's also inside the RadTabStrip and RadMultiPage AJAX container.

Please let me know if there is a way I can have the regular button itself force the postback and cause the upload to happen.  I've tried several methods including the forcepostback javascript etc, but none of it works.

Thanks
Saqib
Top achievements
Rank 1
 answered on 15 Oct 2009
4 answers
245 views
Hi. I am looking into how to display an image or data in a grid cell based on the value returned from the database.

For instance, if value > 0, display image...if value = 0, display 0

Any insight would be beneficial to me for I am a new member to the Telerik suite.
Steve Napurano
Top achievements
Rank 1
 answered on 15 Oct 2009
3 answers
170 views
I have a masterpage with a RadWindowManger on it and a window defined within it.

I have a page (WebForm1), based on that master page that opens a modal window using a locally defined RadWindowManager.

The window that opens from WebForm1.aspx uses another page, WebForm2.aspx for its content.

WenForm2 includes some JavaScript that finds the browser window and calls JavaScript on the master page that opens a 2nd window.

Both the 1st and 2nd windows are opened modally.

When I run the code and open the 2nd window it opens below the 1st window and whilst the modal screen appears.

I want to be able to invoke the 2nd window and have the modal screen cover the 1st screen as well as the base page. I don't want the user to be able to interact with the first window whilst the 2nd is open.

Is this possible?

Below is the code I'm using...
Site1.master
<%@ Master Language="C#" AutoEventWireup="true" CodeBehind="Site1.master.cs" Inherits="TestBed.Site1" %> 
 
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> 
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
 
<html xmlns="http://www.w3.org/1999/xhtml" > 
<head runat="server"> 
    <title></title> 
    <asp:ContentPlaceHolder ID="head" runat="server"> 
    </asp:ContentPlaceHolder> 
</head> 
<body> 
    <form id="form1" runat="server"> 
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server"> 
    </telerik:RadScriptManager> 
    <telerik:RadScriptBlock ID="RadScriptBlock1" runat="server"> 
      <script type="text/javascript"> 
        function OpenPopup() { 
          var wnd = $find("<%=Popup.ClientID %>"); 
          wnd.show(); 
        } 
      </script> 
    </telerik:RadScriptBlock> 
     
     
    <div> 
        <asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server"> 
         
        </asp:ContentPlaceHolder> 
    </div> 
    <telerik:RadWindowManager ID="RadWindowManager1" runat="server" Skin="WebBlue"> 
      <Windows> 
       <telerik:RadWindow ID="Popup" runat="server"  
        Animation="None"  
        Width="400px" 
        Height="400px" 
        VisibleStatusbar="false" 
        NavigateUrl="http://www.google.com" 
        KeepInScreenBounds="true" 
        Modal="true"></telerik:RadWindow> 
      </Windows> 
    </telerik:RadWindowManager> 
    </form> 
</body> 
</html> 

WebForm1.aspx
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm2.aspx.cs" Inherits="TestBed.WebForm2" %> 
 
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> 
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
 
<html xmlns="http://www.w3.org/1999/xhtml" > 
<head runat="server"> 
    <title></title> 
</head> 
<body> 
    <form id="form1" runat="server"> 
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server"> 
    </telerik:RadScriptManager> 
    <telerik:RadScriptBlock ID="RadScriptBlock1" runat="server"> 
      <script type="text/javascript"> 
        function GetRadWindow() { 
          var oWindow = null; 
          if (window.radWindow) 
            oWindow = window.radWindow; 
          else if (window.frameElement.radWindow) 
            oWindow = window.frameElement.radWindow; 
          return oWindow; 
        } 
        function OpenPopup() { 
          var wnd = GetRadWindow().BrowserWindow; 
          wnd.OpenPopup(); 
        } 
      </script> 
     
    </telerik:RadScriptBlock> 
      <asp:Button runat="server" ID="btn2" Text="Click" OnClientClick="OpenPopup(); return false;" /> 
     
    </form> 
</body> 
</html> 
 

WebForm2.aspx
<%@ Page Title="" Language="C#" MasterPageFile="~/Site1.Master" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="TestBed.WebForm1" %> 
 
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> 
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server"> 
</asp:Content> 
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server"> 
  <telerik:RadScriptBlock ID="RadScriptBlock1" runat="server"> 
    <script type="text/javascript"> 
      function Click() { 
        radopen(null, 'RadWindow1'); 
      } 
    </script> 
   
  </telerik:RadScriptBlock> 
 
 
  <asp:Button ID="btn" runat="server" Text="Click" OnClientClick="Click(); return false;" /> 
 
  <telerik:RadWindowManager ID="RadWindowManager1" runat="server" Skin="WebBlue"> 
    <Windows> 
      <telerik:RadWindow ID="RadWindow1" runat="server"  
        Animation="None"  
        Width="600px" 
        Height="100px" 
        VisibleStatusbar="false" 
        Left="50px"  
        Top="50px" 
        NavigateUrl="WebForm2.aspx" 
        KeepInScreenBounds="true" 
        Modal="true"> 
  </telerik:RadWindow> 
 
 
    </Windows> 
  </telerik:RadWindowManager> 
</asp:Content> 

I'd be grateful for any clues.

Thanks in advance.

--
Stuart


Stuart Hemming
Top achievements
Rank 2
 answered on 15 Oct 2009
1 answer
146 views
Is it possible to hide the document manager icon in the hyperlink manager?

I'm trying to disable this feature any way that I can figure out, but nothing seems to be working.  I don't want to use the basic link editor provided by the browser.

Which CSS file does the dialog box use?  I thought I might be able to override the CSS and set visibility to none for a#DocumentManager

any ideas? help?

thanks,
Brian Garson
Top achievements
Rank 2
 answered on 15 Oct 2009
2 answers
121 views

Hello I have a little issue here.  I am trying to link an item in my grid via its id but at the same time displaying its name instead.  Basiclay I have items in my sql table with names like IBM, NRC, and so on, each one has its unique id.  While I did manage to get this querystring to work I have to use an additional hyerlinked column.  I want to use just the name to link to the next page.   Thank you,

 

<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:harwoodConnectionString %>"
            SelectCommand="SELECT  top 3 [NewsArticleID], [NewsArticleName] FROM [NewsArticles]
order by enddate desc"></asp:SqlDataSource>
        <telerik:RadGrid ID="RadGrid1" runat="server" Skin="" DataSourceID="SqlDataSource1" GridLines="None" ShowHeader="false">
            <HeaderContextMenu EnableTheming="True">
                <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation>
            </HeaderContextMenu>
            <MasterTableView AutoGenerateColumns="False" DataSourceID="SqlDataSource1">
                <RowIndicatorColumn>
                    <HeaderStyle Width="20px"></HeaderStyle>
                </RowIndicatorColumn>
                <ExpandCollapseColumn>
                    <HeaderStyle Width="20px"></HeaderStyle>
                </ExpandCollapseColumn>
                <Columns>
                <telerik:GridBoundColumn  DataField="NewsArticleName" 
                        HeaderText="NewsArticleName" SortExpression="NewsArticleName" 
                        UniqueName="NewsArticleName">
                    </telerik:GridBoundColumn>
                    <telerik:GridHyperLinkColumn ItemStyle-HorizontalAlign="Right" DataTextFormatString="   read more..." DataNavigateUrlFields="NewsArticleID"
                        UniqueName="NewsArticleID" DataNavigateUrlFormatString="~/NewsArticle.aspx?NewsArticleID={0}"
                        DataTextField="NewsArticleID">
                    </telerik:GridHyperLinkColumn>
                </Columns>
Bryan Davis
Top achievements
Rank 1
 answered on 15 Oct 2009
2 answers
145 views
Hi all,
I have one problem when use RadAjax for control Ajax action in my webpage

My example project have home.aspx page and userControl, and userControl will be load on home page.
In my home page i added RadScriptManager, RadAjaxManager, and usercotrol I added RadAjaxManagerProxy
I done follow an example demo Ajax / User Controls/Master pages,
But When I load home page I get an error - You can see it in image that I attach below :(
I don't know that wrong in here
Please help me, I'm thnks so much :D

Code in Home.aspx

<%@ Import Namespace ="iHRPCore.Com"%>
<%@ Import Namespace ="System.Data" %>
<%@ Import Namespace ="System.Data.SqlClient" %>
<%@ Register TagPrefix="uc1" TagName="Table1_bottom" Src="Include/Table1_bottom.ascx" %>
<%@ Register TagPrefix="uc1" TagName="Table1_top" Src="Include/Table1_top.ascx" %>
<%@ Register TagPrefix="uc1" TagName="HeaderText_bottom" Src="Include/HeaderText_bottom.ascx" %>
<%@ Register TagPrefix="uc1" TagName="HeaderText_top" Src="Include/HeaderText_top.ascx" %>
<%@ Page language="c#" Codebehind="Editpage.aspx.cs" AutoEventWireup="false" Inherits="iHRPCore.Editpage" validateRequest="false" %>

<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<%@ Register TagPrefix="uc1" TagName="Top" Src="Include/Top1.ascx" %>
<%@ Register TagPrefix="uc1" TagName="LeftMenu" Src="Include/LeftMenu.ascx" %>
<%@ Register TagPrefix="uc1" TagName="Bottom" Src="Include/Bottom.ascx" %>
<%@ Register TagPrefix="uc1" TagName="Bottom_LS" Src="Include/Bottom_LS.ascx" %>
<%@ Register TagPrefix="cc1" Namespace="EeekSoft.Web" Assembly="EeekSoft.Web.PopupWin" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<html>
    <head>
        <title>Human resource and Payroll - fpt.iHRPCore</title>
        
        <meta content="Microsoft Visual Studio .NET 7.1" name="GENERATOR" />
        <meta content="C#" name="CODE_LANGUAGE" />
        <meta content="JavaScript" name="vs_defaultClientScript" />
        <meta content="http://schemas.microsoft.com/intellisense/ie8" name="vs_targetSchema" />
        <link href="Include/myStyles.css" type="text/css" rel="stylesheet" />
    </head>
    <body bottomMargin="0px" leftMargin="0px" topMargin="0px" onload="ShowForm(<%=blnShowForm%>)" rightMargin="0px">
        <form id="Form1" method="post" runat="server">
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
        </telerik:RadScriptManager>
                    
        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
        </telerik:RadAjaxManager>
....................................


And userControl.ascx code:

<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="HS_TiepNhan.ascx.cs" Inherits="FPT.DNN.Modules.PML.HS_TiepNhan" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<%@ Register Assembly="jQueryDatePicker" Namespace="Westwind.Web.Controls" TagPrefix="ww" %>
<link href="../../../INC/PML.css" type="text/css" rel="stylesheet" />
<telerik:RadAjaxManagerProxy ID="RadAjaxManagerProxy1" runat="server">
    <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="ddlLoaiHoSo">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="grdHSKT" />
            </UpdatedControls>
        </telerik:AjaxSetting>
        <telerik:AjaxSetting AjaxControlID="grdHSKT">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="grdHSKT" />
            </UpdatedControls>
        </telerik:AjaxSetting>
    </AjaxSettings>
</telerik:RadAjaxManagerProxy>

<input id="msg_hidden" type="hidden" name="msg_hidden" runat="server" />


<script type="text/javascript" src="../../../INC/Common.js"></script>


<script type="text/javascript">
    var sPath = '<%= Request.ApplicationPath + "/DESKTOPMODULES/PML/Images/" %>'
    function soNgayLeave() {
        UseCallback(document.getElementById('<%= txtSoNgayGiaiQuyet.ClientID %>').value,'');
    }
    
    function OnCallback(result, context) {
        document.getElementById('<%= txtNgayHenTra.ClientID %>').value = result;alert(result);
    }
</script>

<asp:DropDownList ID="ddlLoaiHoSo" runat="server" Width="300px"
                        AutoPostBack="True"
                        onselectedindexchanged="ddlLoaiHoSo_SelectedIndexChanged"></asp:DropDownList>






<telerik:RadGrid ID="grdHSKT" runat="server" ></telerik:RadGrid>

.......................................

hongnguyenx
Top achievements
Rank 1
 answered on 15 Oct 2009
2 answers
208 views
Hi

I have a page with tabs and pageviews and all is OK. All pageviews are rendered dynamically and have userControls added to them.
One of these Pageviews has another Tab based page (UserControl), and if I apply the same dynamic rendering method there, a funny thing happens. All is OK in Firefox, but in IE 8 my pageviews, or better yet, the usercontrol I'm adding to them, show upp all over the place.

The parent page with the tabs is a customer page, and one of the tabs is "customer addresses". When that tab is clicked my pageview with customer shipping,- home,- billing adresses etc. are displayed, one in each tab. In Firefox all is OK but in IE 8 the first with "home address" is ok, but the next Tab has both "home address" and "billing address". And the even more peculiar thing is that my address ageview shows up in my parent page tabs, - almost all of them (except if my first address-tab is selected, then all is ok).

The code I'm using to add the tabs/Pageviews/ and usercontrols looks like this...

private void PopulateAddressTabs()  
        {  
            string tmpTabName = "";  
              
 
            AddressMultiPage.PageViews.Clear();  
            
            if (partyID > 0)  
            {  
                var db = new PartyDataContext();  
 
                var addresses = db.PartyAddressesGet(partyID);  
 
                foreach (var address in addresses)  
                {  
                    if (address.AddressType != null)  
                        tmpTabName = (string)GetLocalResourceObject("AddressType" + address.AddressType.id.ToString());  
                    else  
                        tmpTabName = (string)GetLocalResourceObject("AddressType0");  
 
                    AddTab(tmpTabName, "EditAddress" + address.id.ToString(), address.id, false);  
                }  
            }  
 
            AddTab((string)GetLocalResourceObject("NewAddress"), "NewAddress", -1, true);  
 
 
        }  
        private void AddTab(string tabName, string tabID, int addrID, bool isInsert)  
        {  
            RadTab tab = new RadTab();  
            tab.Text = tabName;  
            AddressTabStrip.Tabs.Add(tab);  
 
            PartyAddress userControl = (PartyAddress)LoadControl("~/Party/UserControls/PartyAddress.ascx");  
            userControl.AddressID = addrID;  
            userControl.IsInsert = isInsert;  
            userControl.PartyID = partyID;  
            userControl.ID = tabID + "_userControl";  
 
            RadPageView pageView = new RadPageView();  
            pageView.ID = tabID;  
            pageView.Controls.Add(userControl);  
            AddressMultiPage.PageViews.Add(pageView);  
 
        }  
 


Thanks for any help
Axel
Axel
Top achievements
Rank 2
 answered on 15 Oct 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?