Telerik Forums
UI for ASP.NET AJAX Forum
0 answers
80 views
I have several TreeViews on a page and I would like to have a single JavaScript function called by all of them (when a user checks an item).  For example, I'll have a <div> tag on top of each TreeView.  When the user clicks a checkbox in any of the TreeViews, the TreeView will fire an AfterClientCheck event to call the single function.  This function would then figure out what the div ID is for that TreeView and update the div text with the checkbox change. 

When I create all these TreeViews, I'll somehow attach the ID of the <div> tag that lives above it.  I've looked at attributes.  But, I want to attach a single attribute (that holds the div's ID) to the whole TreeView.  This attribute would hold the ID of the div tag.  

Can I make an attribute for the entire TreeView?  If not, how can I attach a custom value to the TreeView that can be read in its events?
   
Thanks
James
Top achievements
Rank 1
 asked on 26 Jan 2009
3 answers
298 views

Im using a RadWindow as an edit form for an ajax grid.
AjaxRequest isnt being fired when I insert data, which means the grid isnt updating on the parent form

In the Radwindow I have a button that calls the data insert function and closes the window

 InsertBandMember();  
            ClientScript.RegisterStartupScript(Page.GetType(), "mykey", "CloseAndRebind('navigateToInserted');", true); 

this calls the javascript function in the RadWindow edit form

function CloseAndRebind(args) {  
                GetRadWindow().Close();  
                GetRadWindow().BrowserWindow.refreshGrid(args);  
            } 

this then calls the javascript function in the parent form (where the grid lives)

function refreshGrid(arg) {  
            debugger;  
            if (!arg) {  
                $find("<%= Telerik.Web.UI.RadAjaxManager.GetCurrent(Page).ClientID %>").ajaxRequest("Rebind");  
 
            }  
            else {  
                $find("<%= Telerik.Web.UI.RadAjaxManager.GetCurrent(Page).ClientID %>").ajaxRequest("RebindAndNavigate");  
 
            }  
        } 

and finally heres the Ajax Request event handler in the code behind

protected void RadAjaxManager1_AjaxRequest(object sender, AjaxRequestEventArgs e)  
        {  
            if (e.Argument == "Rebind")  
            {  
                RadGrid1.MasterTableView.SortExpressions.Clear();  
                RadGrid1.MasterTableView.GroupByExpressions.Clear();  
                RadGrid1.Rebind();  
            }  
            else if (e.Argument == "RebindAndNavigate")  
            {  
                RadGrid1.MasterTableView.SortExpressions.Clear();  
                RadGrid1.MasterTableView.GroupByExpressions.Clear();  
                RadGrid1RadGrid1.MasterTableView.CurrentPageIndex = RadGrid1.MasterTableView.PageCount - 1;  
                RadGrid1.Rebind();  
            }  
        } 

This never gets called, but in the javascript, this line does

$find("<%= Telerik.Web.UI.RadAjaxManager.GetCurrent(Page).ClientID %>").ajaxRequest("RebindAndNavigate");   

Im using an ajax manager on a master page, so ive put an ajaxproxymanager on the grid page
<telerik:RadAjaxManagerProxy ID="RadAjaxManagerProxy1" runat="server">  
        <AjaxSettings> 
            <telerik:AjaxSetting AjaxControlID="RadAjaxManager1">  
                        <UpdatedControls> 
                            <telerik:AjaxUpdatedControl ControlID="RadGrid1" /> 
                        </UpdatedControls> 
                    </telerik:AjaxSetting>   
            <telerik:AjaxSetting AjaxControlID="RadGrid1">  
                <UpdatedControls> 
                    <telerik:AjaxUpdatedControl ControlID="RadGrid1"   
                        LoadingPanelID="RadAjaxLoadingPanel1" /> 
                </UpdatedControls> 
            </telerik:AjaxSetting> 
        </AjaxSettings> 
    </telerik:RadAjaxManagerProxy> 

Yet still the grid wont update.  The data is being committed to the database, so how can I get the grid to do an ajax refresh ?
kyle goodfriend
Top achievements
Rank 2
 answered on 26 Jan 2009
0 answers
89 views
Hi.
i want to use tabstrip by these details:
1- i want to load just the selected tab , for fast loading
2- i want to  put 3 grid in 3 tab , grids data are update every secend , then i want when click to tab or select the other tab the contect wil refress

i use tabstrip , multipageview , pageview : my grids are in difrent page view but for exmpl when i sort my grids then change my tab and back to the grid , its still in sorted mode ! ( not refresh or postback)
sadeghhp
Top achievements
Rank 1
 asked on 25 Jan 2009
2 answers
175 views
Hi,
I've got an error in my application. I have a TextBox in my user control that every time I want to read from it i'll get error and I can't even watch the value and debug it, for example when I try to add the TextBox to Watch Variables it shows following message:

 "Cannot evaluate expression because a thread is stopped at a point where garbage collection is impossible, possibly because the code is optimized. "

I would be happy if i have any answer from you
Best Regards
Nima
k f
Top achievements
Rank 1
 answered on 24 Jan 2009
0 answers
70 views
Hi,

We are using Q3 release of Asp.Net Ajax controls. We modified some style sheet/ Skin and applied it to our controls grid, Scheduler. Something went wrong and we roll back the changes. The old Style sheet is not getting applied.

Do Rad controls keep a cache of Skins and Style sheets
Siddharth
Top achievements
Rank 1
 asked on 24 Jan 2009
4 answers
264 views
I am adding a radcombobox dynamically when certain parameters are met. This is happening inside an ajaxpanel in a user control. The code to add the combobox is as follows:
Dim dropDownList As New RadComboBox  
dropDownList.ID = associatedAttribute.Name  
dropDownList.CssClass = "attributeDropdownList" 
dropDownList.DataSource = associatedAttribute.AttributeItemCollection  
dropDownList.DataTextField = "FormattedAmount" 
dropDownList.DataValueField = "fldSkuSuffix" 
dropDownList.DataBind()  
dropDownList.Skin = "SkyBlue" 
AddHandler dropDownList.SelectedIndexChanged, AddressOf dropDownList_SelectedIndexChanged  
dropDownList.AutoPostBack = True 
dropDownList.Items.Insert(0, New RadComboBoxItem("--Select--"String.Empty))  
If associatedAttribute.IsRequired Then 
    Dim rfv As New RequiredFieldValidator()  
    rfv.ControlToValidate = dropDownList.ID  
    rfv.Display = ValidatorDisplay.None  
    rfv.ErrorMessage = String.Format("Please Select", associatedAttribute.Name)  
    pnlProductAttributes.Controls.Add(rfv)  
End If 
pnlProductAttributes.Controls.Add(dropDownList) 

When the page is rendered, it is rendered correctly. So this all seems ok, except that the AddHandler is not firing. The code for the handler event is:
Private Sub dropDownList_SelectedIndexChanged(ByVal sender As ObjectByVal e As Telerik.Web.UI.RadComboBoxSelectedIndexChangedEventArgs)  
        Dim dropDownList As RadComboBox = TryCast(sender, RadComboBox)  
        If dropDownList IsNot Nothing Then 
            Dim myLabel As Label = TryCast(ThisPage.cartUpdatePanel.FindControl(dropDownList.ID), Label)  
            If myLabel IsNot Nothing Then 
                myLabel.Text = String.Format("<strong>{0}:</strong>&nbsp;{1}<br/>", dropDownList.ID, dropDownList.SelectedItem.Text)  
            End If 
        End If 
        Dim skuId As String = GetSku()  
        GetInventory(skuId)  
    End Sub 

The code in the event handler works as i have tested this with just a regular asp dropdownlist. Why will it not work for radcombobox?

Walter Burditt
AMS
Top achievements
Rank 1
 answered on 24 Jan 2009
6 answers
134 views
My grid is databound with no edit or delete column.  I have scrolling enabled with UseStaticHeaders = True.  I am using the Default2006 skin, but this problem still occurs regardless of the selected skin.
Steve Fletcher
Top achievements
Rank 1
 answered on 23 Jan 2009
3 answers
152 views
Hello,
I am having trouble displaying the splitter without borders with scroll bars to fit within the browser window. I want the pane to size with the window size. Can anyone look at my code and see where I am going wrong?
I have tried everything that I have found on these forums.
IE6 shows the panes and text but the browser has both scroll bars.
FF3 display the splitter bar only at about 40px high and the text in the paragraphs disappears right after the page has loaded.

Thanks
MasterPage
<%@ Master Language="C#" AutoEventWireup="true" CodeFile="Main.master.cs" Inherits="MasterPages_Main" %> 
<!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
     <style type="text/css"
     #mainpage { position:relative; z-index:100000; } 
     #headersection { width: 99%; } 
        </style> 
    <asp:ContentPlaceHolder id="head" runat="server"
    </asp:ContentPlaceHolder> 
</head> 
<body> 
    <form id="form1" runat="server"
    <asp:ScriptManager ID="ScriptManager1" runat="server" EnablePartialRendering="true" /> 
    <div id="mainpage"
    <div id="headersection"
    Page Header 
    </div> 
        <asp:ContentPlaceHolder id="ContentPlaceHolder1" runat="server">         
        </asp:ContentPlaceHolder> 
    </div> 
    </form> 
</body> 
</html> 
 

Splitter.aspx
<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPages/Main.master" AutoEventWireup="true" CodeFile="Splitter.aspx.cs" Inherits="Splitter" %> 
<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server"
</asp:Content> 
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server"
<div style="border: solid 1px #00ff00; height:100%; margin: 0px; padding: 0px;  
overflow: hidden;"> 
<telerik:RadSplitter ID="RadSplitter1" runat="server" Skin="Outlook" height="100%" width="100%" 
BorderSize="0" BorderWidth="0" OnClientLoaded=""
<telerik:RadPane ID="Pane1" runat="server" Scrolling="Y" MinHeight="85" width="225px"
<div> 
<p>hh</p> 
<p>hh</p> 
<p>hh</p> 
<p>hh</p> 
<p>hh</p> 
<p>hh</p> 
<p>hh</p> 
<p>hh</p> 
<p>hh</p> 
<p>hh</p> 
<p>hh</p> 
<p>hh</p> 
<p>hh</p> 
<p>hh</p> 
<p>hh</p> 
<p>hh</p> 
<p>hh</p> 
<p>hh</p> 
<p>hh</p> 
<p>hh</p> 
<p>hh</p> 
<p>hh</p> 
<p>hh</p> 
<p>hh</p> 
<p>hhgggggggg</p> 
<p>hh</p> 
<p>hh</p> 
<p>hh</p> 
</div>dee 
</telerik:RadPane> 
<telerik:RadSplitBar ID="Splitter1" runat="server" CollapseMode="Forward"  
CollapseExpandPaneText="Collapse/Expand Summary and Alerts" /> 
<telerik:RadPane ID="Pane2" runat="server" >sd 
</telerik:RadPane>                     
</telerik:RadSplitter> 
</div> 
</asp:Content> 
 
 
Officialboss
Top achievements
Rank 1
 answered on 23 Jan 2009
5 answers
295 views
I have a normal, horizontal-looking menu with about 5 different main menu items -- I'd like to add a Combobox as the content for another menu item, and have this particular menu item aligned to the right of the whole menu. So, regardless of the width of the menu, the combobox menu item would always be on the far right. I've attempted to do this with little luck -- also, when adding a combobox, or any custom template to a menu item, the background is just white. I'm using the Black skin and would like to keep the background the same as all of the other menu items with just plain text... thank you for any help.
Bill TenBroeck
Top achievements
Rank 1
 answered on 23 Jan 2009
6 answers
177 views
Hello,

I am using Forms Authentication and ASP.NET roles for my website. For most of my menu links I will be able to use the NavigateUrl to open the proper pages. However, I need to be able to redirect users based upon their role for a few of the child items. For example, when an employee is in the parent branch named Employee and navigates to and clicks on the Forms child menu, I need all the users in the 'Doctors' role to be directed to ~/employee_login/doctors_area/forms.aspx and users in the 'Office_Staff' role to be directed to ~/employee_login/office_staff_area/forms.aspx page. I am able to accomplish this with the onclick event using a standard asp:LinkButton for example (see code below) but am unable to find a way of doing it using the RadMenu. Please help.

<

 

form id="form1" runat="server">

 

 

<div>

 

 

 

<asp:LinkButton ID="LinkButton1" runat="server" onclick="redirectDocStaff">LinkButton</asp:LinkButton><script runat="server"> protected void redirectDocStaff(object sender, EventArgs e)

 

{

 

if (Roles.IsUserInRole("Doctors"))

 

Response.Redirect(

"~/Employee_Login/Doctors_Area/forms.aspx");

 

 

else if (Roles.IsUserInRole("Office_Staff"))

 

Response.Redirect(

"~/Employee_Login/Office_Staff_Area/forms.aspx");

 

}

</

 

script>

 

stuart
Top achievements
Rank 1
 answered on 23 Jan 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?