protected void RadGridHierarchy_ItemCreated(object sender, GridItemEventArgs e) {... TextBox tbVolumeTarget = ((TextBox)item["VolumeTarget"].Controls[0]); NumericSetting.TargetControls.Add(new TargetInput(tbVolumeTarget.UniqueID, true));...ButtonClick ...RadAjaxManager.GetCurrent(Page).ResponseScripts.Add(@"OpenProfitabilitySimulation();"); JavaScript: function OpenProfitabilitySimulation() { var a = setTimeout('doOpenProfitabilitySimulation()', 500); } //Open RadWindow for profitability simulation function doOpenProfitabilitySimulation() { var oWnd = $find("<%=RadWindow_Create_Contract_ProfitabilitySimulation.ClientID %>"); oWnd.show(); }"eval.code":$find('ContentPlaceHolderDefault_ContentPlaceHolderMain_ctl00_CreateContractWorkflow_3_ucCreateContract_ucContractHierarchy_RadInputManager1_NumericBehavior').dispose();
|
<
telerik:RadGrid ID="RadGrid1" GridLines="None" AutoGenerateColumns="False" runat="server"
AllowPaging="True" AllowSorting="True"
OnNeedDataSource="RadGrid1_NeedDataSource"
OnItemDataBound="OnItemDataBoundHandler"
AllowAutomaticUpdates="True" AllowAutomaticInserts="True"
ShowStatusBar="True" AllowFilteringByColumn="True" CellSpacing="0" EnableAJAX="True">
<MasterTableView ShowFooter="false" DataKeyNames="ResultsID" EditMode="InPlace" CommandItemDisplay="TopAndBottom">
<CommandItemSettings ExportToPdfText="Export to PDF"></CommandItemSettings>
<RowIndicatorColumn FilterControlAltText="Filter RowIndicator column"></RowIndicatorColumn>
<ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column"></ExpandCollapseColumn>
<Columns>
<telerik:GridEditCommandColumn FooterText="EditCommand footer" UniqueName="EditCommandColumn"
HeaderText="Edit" HeaderStyle-Width="25px" UpdateText="Update">
<HeaderStyle Width="25px" HorizontalAlign="Center" VerticalAlign="Middle"></HeaderStyle>
<ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" />
</telerik:GridEditCommandColumn>
<telerik:GridButtonColumn FilterControlAltText="Filter Delete column"
HeaderText="Delete" HeaderStyle-Width="25px" Text="Delete" UniqueName="DeleteColumn">
<HeaderStyle Width="25px" HorizontalAlign="Center" VerticalAlign="Middle"></HeaderStyle>
</telerik:GridButtonColumn>
<telerik:GridTemplateColumn UniqueName="AreaName" HeaderText="Area"
SortExpression="AreaName" ItemStyle-Width="150px">
<FooterTemplate>
Template footer
</FooterTemplate>
<FooterStyle VerticalAlign="Middle" HorizontalAlign="Center" />
<ItemTemplate>
<%
#DataBinder.Eval(Container.DataItem, "AreaName")%>
</ItemTemplate>
<EditItemTemplate>
<telerik:RadComboBox runat="server" ID="RadComboBox1" EnableLoadOnDemand="True" DataTextField="AreaName"
OnItemsRequested="RadComboBox1_ItemsRequested" DataValueField="ID" AutoPostBack="true"
HighlightTemplatedItems="true" Height="140px" Width="100px" DropDownWidth="120px"
OnSelectedIndexChanged="ComboBox1_OnSelectedIndexChangedHandler">
<ItemTemplate>
<%# DataBinder.Eval(Container, "Text")%>
</ItemTemplate>
</telerik:RadComboBox>
</EditItemTemplate>
<HeaderStyle Width="100px" />
<ItemStyle Width="100px"></ItemStyle>
</telerik:GridTemplateColumn>
This is the first part of my C# code private void RadGrid1_NeedDataSource(object source, Telerik.Web.UI.GridNeedDataSourceEventArgs e)
{
I am trying to make it that on page load in the code behind, I disable a button in the radmenu using javascript
the error is : cant find object - $find('myRadMenu') and the name is correct, so it has something todo with when the radmenu is rendered so I tried a wrap my script in a document.ready but that also won't work
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
ClientScript.RegisterStartupScript(Me.GetType(), "test", "<script type='text/javascript'> $find('myRadMenu').findItemByText('MyButton').disable(); </script>")
End Sub
Do you know how to disable a radmenu button from javascript that is called from the vb.net page load function.
It must be done this way as I have other javascript that needs to fire