Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
208 views
Hi
I am trying a really simple ExplandChildNodes example. The code behind is calling ExpandChildNodes in the OnLoad handler. However, it does not seem to expand the children. Have I missed something simple?

<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="WebForm1.aspx.vb" Inherits="IPSCWebClient.WebForm1" %> 
 
<%@ 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>Untitled Page</title> 
</head> 
<body> 
    <form id="form1" runat="server">  
    <div> 
        <asp:ScriptManager runat="server" ID="sss">  
        </asp:ScriptManager> 
        <telerik:RadTreeView ID="RadTreeView1" runat="server" ShowLineImages="true">  
            <Nodes> 
                <telerik:RadTreeNode Text="Web Display Window">  
                    <Nodes> 
                        <telerik:RadTreeNode Text="Display Area (Ribbon Bar)">  
                            <Nodes> 
                                <telerik:RadTreeNode Text="Tile Layout (1 way)"/>  
                            </Nodes> 
                        </telerik:RadTreeNode> 
                    </Nodes> 
                </telerik:RadTreeNode> 
            </Nodes> 
        </telerik:RadTreeView> 
    </div> 
    </form> 
</body> 
</html> 
 

I have this handler

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load  
        Me.RadTreeView1.Nodes(0).ExpandChildNodes()  
    End Sub 
 

Thanks,
Martin
Atanas Korchev
Telerik team
 answered on 20 May 2008
1 answer
194 views
Hey support guys,

     I have cascading dropdowns in the Edit template of a RadGrid. When in edit mode, I populate both dropdowns with data correctly. However, when the first dropdown is changed, I want to repopulate the second. I have tried attaching the SelectedIndexChanged event of dropdown1 in the radgrid_itemcreated event and setting autopostback for dropdown1 to true. When I change dropdown1 the page does a post back but it never hits the ddlOUList_SelectedIndexChanged event handler. My grid is in a dynamically created user control in a content page which is in turn in a Master page. Why is the handler not catching? Any ideas?

Thanks,
Jayvr

<telerik:gridtemplatecolumn headerstyle-horizontalalign="Center" headertext="Operating Units" uniquename="colOperatingUnit">

<itemtemplate>

<asp:label id="lblOpUnit" runat="server" />

</itemtemplate>

<edititemtemplate>

<asp:dropdownlist cssclass="inputControlsNoWidth" id="ddlEditOUs" autopostback="true" runat="server" />

</edititemtemplate>

</telerik:gridtemplatecolumn>

<telerik:gridtemplatecolumn headerstyle-horizontalalign="Center" headertext="Responsibility" uniquename="colResponsibility">

<itemstyle width="30%" horizontalalign="Left" />

<itemtemplate>

<asp:label id="lblResp" runat="server" />

</itemtemplate>

<edititemtemplate>

<asp:dropdownlist cssclass="inputControlsNoWidth" id="ddlEditResp" runat="server" />

</edititemtemplate>

</telerik:gridtemplatecolumn>


void rgOUList_ItemCreated(object sender, GridItemEventArgs e)

{

if((e.Item is GridEditableItem) && (e.Item.IsInEditMode))

{

DropDownList ddlOUList = (e.Item as GridEditableItem).FindControl("ddlEditOUs") as DropDownList;

if(ddlOUList != null)

{

ddlOUList.SelectedIndexChanged +=

new EventHandler(this.ddlOUList_SelectedIndexChanged);

}

}

}

Konstantin Petkov
Telerik team
 answered on 20 May 2008
7 answers
260 views
Hi,

do you plan to release Hungarian dictionary for RadControl spellcheck?

Cheers,
Martin
Martin Havlista
Top achievements
Rank 1
 answered on 20 May 2008
1 answer
219 views
How can i reference the rad scheduler in javascript function. Also Is there a way to set Schedulars Selected Date date in the javascript function?

In the documentation I found two methods that can be called in javascript to reference a control 

Which of the following method should I use?
var

scheduleInfo = $find('RadScheduler1');
var scheduleInfo = $get('RadScheduler1');

I would like to modify this controls selected date property
 scheduleInfo.set_selecteddate =  now;

Can I achive this?
Peter
Telerik team
 answered on 20 May 2008
3 answers
135 views
Hi all,
I see on the video that when you click on the arrow and go to RadGrid Tasks, you'll have the option to "Enable AJAX". But I can't find that option when I place RadGrid on my page. I have to go add the Telerik AJAX Manger and do the adding manually in the Source view (by adding <AjaxSettings> <telerik:AjaxSetting AjaxControlID .. ... ... etc...)

Any help would be greatly appreciated,
Thanks.
Kenny.
Vlad
Telerik team
 answered on 20 May 2008
2 answers
276 views
How do I access the hidden field in my grid using JavaScript?  I need to loop thru my grid and check the values the hidden field in all rows.  Value of hidden field will be YES or NO.  Can someone show me the JavaScript function?
Thanks!
 
   <rad:RadGrid ID="StatesGrid" OnNeedDataSource="StatesGrid_NeedDataSource" AllowMultiRowSelection="true"
      ClientSettings-Scrolling-AllowScroll="true" Skin="Outlook2007" runat="server" AllowSorting="True"
      GridLines="None" AutoGenerateColumns="False" Height="250px" TabIndex="4">
      <MasterTableView>
        <RowIndicatorColumn Visible="False">
          <HeaderStyle Width="20px"></HeaderStyle>
        </RowIndicatorColumn>
        <ExpandCollapseColumn Visible="False" Resizable="False">
          <HeaderStyle Width="20px"></HeaderStyle>
        </ExpandCollapseColumn>
        <Columns>
          <rad:GridClientSelectColumn UniqueName="GridClientSelectColumn" />
          <rad:GridTemplateColumn HeaderText="All States" UniqueName="TemplateColumnTotalAmount">
            <ItemTemplate>
              <asp:Label ID="Label1" Text='<%# DisplayStateNames(Container) %>' runat="server"></asp:Label>
              <asp:HiddenField ID="hdnIndicator" Value='<%# Eval("Ind_Active") %>' runat="server" />
            </ItemTemplate>
          </rad:GridTemplateColumn>
        </Columns>
      </MasterTableView>
      <ClientSettings ApplyStylesOnClient="True">
        <Selecting AllowRowSelect="True"></Selecting>
        <Scrolling AllowScroll="True"></Scrolling>
      </ClientSettings>
    </rad:RadGrid>
aks
Top achievements
Rank 1
 answered on 20 May 2008
4 answers
219 views

Hi,

Based on your example.. of dynamically loading UserControls:
 
if (LatestLoadedControlName == "~/Forms/LoginAuth/LoginCS.ascx")

{

//Ajaxify the DropDownList in the UserControl itself

//Get the WebUserControl

UserControl MyControl = (UserControl)Page.FindControl(LatestLoadedControlName);

/Get user control's button and label

DropDownList MyDDL = (DropDownList)MyControl.FindControl("DropDownList1");

Button LoginBtn = (Button)MyControl.FindControl("btnLogin");

//Add the necessary AJAX setting programmatically

RadAjaxManager1.AjaxSettings.AddAjaxSetting(MyDDL, null);

}

My Dynamically loaded UserControl Loads ok, ..but when trying to find it...i.e.  
1)  Page.FindControl("~/Forms/LoginAuth/LoginCS.ascx")
2)  Page.FindControl("~/Forms/LoginAuth/LoginCS")
3) Page.FindControl("LoginCS.ascx")
4)  Page.FindControl("LoginCS")

MyControl =  null  (Your example..makes no use of folders,..guess thats the issue,...???)
I tried dragging the Login uCtl onto the main form,..and still Page.FindControl can't find it.

and the Page.Forms coll when in debug, shows 1 entry, and that being it's form.

TIA
Neal

Neal
Top achievements
Rank 1
 answered on 20 May 2008
5 answers
422 views

Hi

How do I stop the databinding process in my grid when switching to insert mode?

My RadGrid has 1 ItemTemplate column and 1 EditFormSettings FormTemplate column. I therefore only have standard controls in the templates with usual data binding expressions eg <%# Bind(" StoreName") %>

The idea is to use RadGrid similarly to asp:FormView in that I only show/edit/insert 1 record at a time in a Form format as opposed to rows/tabular format.

When the user selects an option (eg store name) from an external dropdownlist it triggers the grid to retrieve  the store details from a datasource. 

When the user clicks Edit command button, the grid switches to Edit form.

I have an Insert LinkButton that sits outside of the grid which turns the form to an empty data entry form for insertion. Its event handler below:

protected void imgAddStore_Clicked(object sender, EventArgs e) {
    gridDetailsStore.MasterTableView.IsItemInserted = true;
    gridDetailsStore.DataBind();
}

After messing around, I found that I had to call DataBind() (per above) on the grid to make the Insert form appears in place of the View form.

However, this also goes through  the Select Command and reloads the record.

Because I hide the item template column to only show the Insert form when in Insert mode, I do not want the Select Command to execute because it's redundant when I am inserting a new record.

How do i stop the Select Command to execute?

Thanks for your help.

Buffet
Top achievements
Rank 1
 answered on 20 May 2008
1 answer
122 views
How to change grid from the insert mode to the view (ToolBar in the CommandItemTemplate).
For editing works :  EditSelected -> UpdateEdited.
For insert not works : InitInsert  -> PerformInsert .
Mervil
Top achievements
Rank 1
 answered on 20 May 2008
5 answers
158 views
I'm experiencing a problem with drag and drop on a few machines that have Vista and IE7. Specifically I can do the drag and drop but the dragged element does not appear to follow the mouse during the drag. The problem does not appear to be with speed as the dragged element does not follow the mouse no matter how slowly I move it. If I press any key on the keyboard while dragging, the element jumps to the mouse and then it follows it smoothly.

I can reproduce the problem on the Telerik portal demo page. Anyone else seen this?
Sophy
Telerik team
 answered on 20 May 2008
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?