| <%@ 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> |
| Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load |
| Me.RadTreeView1.Nodes(0).ExpandChildNodes() |
| End Sub |
<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);
}
}
}
Which of the following method should I use?
var
scheduleInfo = $find('RadScheduler1');
var scheduleInfo = $get('RadScheduler1');

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
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.