or
Hi,
I have an ascx that basiocally is just a tree.
this ascx is included on aspx file.
by clicking a button I want to change the tree datasource.
i see difference using ajaxmanager and triggers. First does not work the second does.
Unfortunally i need the first case
Here is a sample
(ajax)
<%@ Register TagPrefix="qsf" TagName="RTV" Src="~/Admin/CategoriesManagement/TreeCategories.ascx" %>..... <form id="form1" runat="server"> <telerik:RadScriptManager ID="RadScriptManager1" runat="server"> </telerik:RadScriptManager> <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"> <AjaxSettings> <telerik:AjaxSetting AjaxControlID="Button1"> <UpdatedControls> <telerik:AjaxUpdatedControl ControlID="CatTree1" /> </UpdatedControls> </telerik:AjaxSetting> </AjaxSettings> </telerik:RadAjaxManager> <table style="width: 100%; text-align: left; background-color:#2e2e2e;" cellspacing="0" cellpadding="0"> <tr> <td> <qsf:rtv runat="server" ID="CatTree1" ></qsf:rtv> </td> </tr> </table> <asp:Button ID="Button1" runat="server" Text="Button" Width="500px" /> </form>...code
Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click 'change its datasource CatTree1.setInitialPath(PathOfThreeCategory) End Sub
second case (triggers)
<table style="width: 100%; text-align: left; background-color:#2e2e2e;" cellspacing="0" cellpadding="0"> <tr> <td> <telerik:RadScriptManager ID="RadScriptManager1" runat="server"> </telerik:RadScriptManager> <asp:UpdatePanel ID="UpdatePanel2" runat="server" UpdateMode="Conditional"> <ContentTemplate> <qsf:rtv runat="server" ID="CatTree1" ></qsf:rtv> </ContentTemplate> <Triggers> <asp:AsyncPostBackTrigger ControlID="Button1" /> </Triggers> </asp:UpdatePanel> </td> </tr></table><asp:Button ID="Button1" runat="server" Text="Button" Width="500px" />same code behind..
Please May you tell me where i'm going wrong? Thank you
<Telerik:RadGrid runat="server" ID="statusesGrid" OnNeedDataSource="NeedStatusesDataSource"OnDeleteCommand="HandleDelete" OnInsertCommand="HandleInsert" OnUpdateCommand="HandleUpdate"OnItemCommand="HandleMakeDefault"AutoGenerateColumns="false" Width="100%"> <MasterTableView Name="StatusesGrid" EditMode="InPlace" CommandItemDisplay="Top" DataKeyNames="UnitTypeStatusId" ClientDataKeyNames="UnitTypeStatusId" > <CommandItemSettings ShowAddNewRecordButton="true" AddNewRecordText="Add new status" ShowRefreshButton="false" /> <Columns> <Telerik:GridEditCommandColumn UniqueName="Edit" UpdateText="Save" InsertText="Save" CancelText="Cancel" ButtonType="LinkButton" /> <Telerik:GridBoundColumn DataField="UnitTypeStatusId" UniqueName="UnitTypeStatusId" Display="false" /> <Telerik:GridTemplateColumn UniqueName="NameWithValidator" DataField="UnitTypeStatusName" HeaderText="Name"> <InsertItemTemplate> <Telerik:RadTextBox runat="server" ID="newNameBox" Text='<%# Bind("UnitTypeStatusName") %>' /> <DL:UnitTypeStatusNameValidator runat="server" ID="nameVaidator" ForeColor="Red" UnitTypeIsCurrentObject="true" ThisStatusID="0" ControlToValidate="newNameBox" ValidateEmptyText="true" Display="Static" /> </InsertItemTemplate> <EditItemTemplate> <Telerik:RadTextBox runat="server" ID="nameEditBox" Text='<%# Bind("UnitTypeStatusName") %>' /> <DL:UnitTypeStatusNameValidator runat="server" ID="nameVaidator" ForeColor="Red" UnitTypeIsCurrentObject="true" ThisStatusID='<%# Bind("UnitTypeStatusID") %>' ControlToValidate="nameEditBox" ValidateEmptyText="true" Display="Static" /> </EditItemTemplate> <ItemTemplate> <asp:Literal runat="server" Mode="Encode" Text='<%# Eval("UnitTypeStatusName") %>' /> </ItemTemplate> </Telerik:GridTemplateColumn> <Telerik:GridTemplateColumn DataField="UnitTypeStatusColor" UniqueName="UnitTypeStatusColor" HeaderText="Color"> <ItemTemplate> <DL:ColorValueDisplay runat="server" Value='<%# Eval("StatusColor") %>' /> </ItemTemplate> <EditItemTemplate> <DL:ColorValueEditor runat="server" ID="colPicker" HtmlColor='<%# Bind("UnitTypeStatusColor") %>' /> </EditItemTemplate> <InsertItemTemplate> <DL:ColorValueEditor runat="server" ID="colPicker" HtmlColor='<%# Bind("UnitTypeStatusColor") %>' /> </InsertItemTemplate> </Telerik:GridTemplateColumn> <Telerik:GridCheckBoxColumn UniqueName="AllowUnitReshedule" DataField="AllowUnitReshedule" DataType="System.Boolean" HeaderText="Moveable" /> <Telerik:GridButtonColumn ButtonType="LinkButton" Text="Make default" UniqueName="MakeDefault" CommandName="MakeDefault" HeaderText="" /> <Telerik:GridCheckBoxColumn DataField="DefaultStatus" UniqueName="DefaultStatus" HeaderText="Default" ReadOnly="true" /> <Telerik:GridTemplateColumn UniqueName="Delete" HeaderText=""> <ItemTemplate> <asp:MultiView runat="server" ID="view" ActiveViewIndex="<%# GetViewIndexByDeletability(Container.DataItem) %>"> <asp:View runat="server" ID="nonDelete"> <span title="This status can't be deleted">Protected</span> </asp:View> <asp:View runat="server" ID="delete"> <a href='javascript:OpenDeleteDialogForUnitTypeStatus(<%# Eval("UnitTypeStatusId") %>)'>Delete</a> </asp:View> </asp:MultiView> </ItemTemplate> <EditItemTemplate> <!-- --> </EditItemTemplate> <InsertItemTemplate> <!-- --> </InsertItemTemplate> </Telerik:GridTemplateColumn> </Columns> <NoRecordsTemplate> No statuses defined for this unit type </NoRecordsTemplate> </MasterTableView></Telerik:RadGrid>
at Telerik.Web.UI.RadColorPicker.LoadClientState(Dictionary`2 clientState)<telerik:RadPageView ID="RadPageView2" runat="server"> <telerik:RadEditor ID="RadEditor2" runat="server" Content='<%# Bind("habitat") %>' NewLineMode="P" ToolsFile="EditorTools.xml" Width="750" Height="472px"> <ImageManager ViewPaths="~/upload" UploadPaths="~/upload" DeletePaths="~/upload" /> </telerik:RadEditor></telerik:RadPageView><?xml version="1.0" encoding="utf-8" ?><root> <cssFiles> <item name="~/_n/css/EditorContentAreaStyles.css" /> </cssFiles> <tools> <tool name="PastePlainText" /> <tool name="PasteFromWord" /> <tool name="ConvertToLower" /> </tools> <tools> <tool name="ApplyClass" /> <tool name="FormatBlock" /> <tool separator="true" /> <tool name="Bold" /> <tool name="Italic" /> <tool name="Underline" /> <tool name="Superscript" /> <tool name="Subscript" /> <tool name="BackColor" /> <tool name="ForeColor" /> <tool name="InsertSymbol" /> </tools> <tools> <tool name="JustifyLeft" /> <tool name="JustifyCenter" /> <tool name="JustifyRight" /> <tool name="JustifyFull" /> <tool separator="true" /> <tool name="Indent" /> <tool name="Outdent" /> <tool separator="true" /> <tool name="InsertUnorderedList" /> <tool name="InsertOrderedList" /> </tools> <tools> <tool name="ImageManager" /> <tool name="LinkManager" /> <tool name="Unlink" /> </tools> <tools name="Tables" tab="Insert"> <tool name="InsertTableLight" size="large" /> <tool name="InsertTable" /> </tools> <tools name="Proofing" tab="Review"> <tool name="XhtmlValidator" size="large" /> <tool name="FindAndReplace" /> </tools></root>body{font-family:arial,helvetica,"helvetica neue",sans-serif !important;font-size:82% !important;color:#4d3345 !important;line-height:1.6em !important;}h1{color:#0085cf !important;font-weight:normal !important;font-size:1.8em !important;margin:25px 0 15px 30px !important;line-height:1.4em !important;text-shadow:2px 2px 2px #ccc !important;}h2{color:#000 !important;font-weight:normal !important;font-size:1.5em !important;margin:25px 0 15px 30px !important;line-height:1.4em !important;text-shadow:2px 2px 2px #ccc !important;}h3{color:#0085cf !important;font-weight:normal !important;font-style:italic !important;font-size:1.3em !important;margin:25px 0 15px 30px !important;line-height:1.4em !important;text-shadow:2px 2px 2px #ccc !important;}h4{color:#0085cf !important;font-weight:bold !important;font-size:1.3em !important;margin:25px 0 15px 30px !important;line-height:1.4em;text-shadow:2px 2px 2px #ccc !important;}h5{color:#000 !important;font-weight:normal !important;font-size:1.4em !important;margin:25px 0 15px 0 !important;line-height:1.4em !important;text-align:center !important;text-shadow:2px 2px 2px #ccc !important;}h6{color:#0085cf !important;font-style:italic !important;font-size:1.15em !important;margin:25px 0 15px 30px !important;line-height:1.4em !important;text-shadow:2px 2px 2px #ccc !important;}a{color:#0085cf !important;text-decoration:none !important;outline:none !important;}a:hover{color:#00F !important;text-decoration:underline !important;}a:visited{color:#006daa !important;}a[href^="mailto:"]{display:inline-block !important;padding-right:15px !important;background:transparent url(/_n/i/icons/mailto.png) right no-repeat !important;}.nav1 {font-size:11px !important;line-height:14px !important;}.i-r{float:right !important;margin:20px 10px 20px 20px !important;}.i-l{float:left !important;margin:20px 20px 20px 10px !important;}.i-c{display:block !important;margin-left:auto !important;margin-right:auto !important;padding:10px 10px 10px 10px !important;}.news{color:#0085cf !important;font-size:1.7em !important;line-height:1.1em !important;}.bk{background:#0085cf !important;}.input{color:#fff !important;font-size:10px !important;background-color:#006daa !important;padding:1px !important;}.input2{color:#006daa !important;background-color:#fff !important;padding:1px !important;}div.RadComboBox .rcbArrowCell td,div.RadComboBox .rcbArrowCell a{ width: 23px !important;}