RadTree Combobox with webservice

4 posts, 1 answers
  1. Sentil
    Sentil avatar
    23 posts
    Member since:
    Jul 2011

    Posted 08 Jan 2015 Link to this post

    Hi

    below is my code

     <telerik:RadAjaxManagerProxy ID="proxyManager" runat="server">
                <AjaxSettings>                
                    <telerik:AjaxSetting AjaxControlID="treeList">
                        <UpdatedControls>
                            <telerik:AjaxUpdatedControl ControlID="treeList" LoadingPanelID="loadingPanel" />
                        </UpdatedControls>
                    </telerik:AjaxSetting>                
                </AjaxSettings>
            </telerik:RadAjaxManagerProxy>

     <telerik:RadTreeList ID="treeList" runat="server" ParentDataKeyNames="ParentD"
                OnItemCreated="treeList_ItemCreated" DataKeyNames="WorkID" AutoGenerateColumns="false"
                OnNeedDataSource="taskTreeList_OnNeedDataSource" OnItemDataBound="taskTreeList_OnItemDataBound"
                OnItemCommand="taskTreeList_ItemCommand" OnUpdateCommand="treeList_UpdateCommand"
                OnItemDrop="taskTreeList_ItemDrop" BorderStyle="None" AllowSorting="true" AllowPaging="false"
                EditMode="InPlace" ShowFooter="true" ShowTreeLines="false" Font-Names="Arial"
                Font-Size="8">
                <HeaderStyle Height="30" Wrap="true" Font-Names="Arial" Font-Size="8" />
                <ItemStyle Font-Names="Arial" Font-Size="8" />
                <ClientSettings AllowItemsDragDrop="true">
                    <Selecting AllowItemSelection="true" />
                    <ClientEvents OnItemDragStarted="OnItemDragStarted" OnItemDragging="OnItemDragging"
                        OnItemDropping="itemDropping" OnTreeListCreated="function(sender) { treeList1 = sender; }" />
                </ClientSettings>
                <Columns>
     <telerik:TreeListEditCommandColumn UniqueName="EditCommandColumn" ShowAddButton="false"
                        ButtonType="ImageButton" HeaderStyle-Width="50px" >
    <telerik:TreeListTemplateColumn UniqueName="TaskColumn" ItemStyle-Width="20px"
                        ItemStyle-HorizontalAlign="Left" >
                        <ItemTemplate>
                            <asp:Label ID="LableID" runat="server" Text='<%#Eval("DisplayData") %>'></asp:Label>
                        </ItemTemplate>
                        <EditItemTemplate>
                            <ComboSelector EmptyMessage="{:Select.Owner}" EnableLoadOnDemand="true"
                                DataTextField="Name" DataValueField="MyID" Property="MyID" SelectedText='<%#Eval("DisplayData") %>'
                                ID="selector" runat="server" Width="20px">
                                <WebServiceSettings Path="~/Services/myService.asmx" Method="GetDetails" />
                            </ComboSelector>
                        </EditItemTemplate>
                    </telerik:TreeListTemplateColumn>
           </Columns>
            </telerik:RadTreeList>

    I have rad tree with edit to be "in place ", when i click on Edit icon to edit combobox, webservice is not picking data, meaning if i remove the bold line in RadAjaxManagerProxy  it is working but when i have ajax control it is not working

    Thanks
    Senthil
  2. Angel Petrov
    Admin
    Angel Petrov avatar
    1007 posts

    Posted 13 Jan 2015 Link to this post

    Hello Senthil,

    Please ensure that a JavaScript error is not thrown that is breaking the client-side logic. Additionally please elaborate more on the type of drop down in the EditItemTemplate. Is the ComboSelector a RadComboBox control?

    Regards,
    Angel Petrov
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Sentil
    Sentil avatar
    23 posts
    Member since:
    Jul 2011

    Posted 13 Jan 2015 in reply to Angel Petrov Link to this post

    Hi
    There is no javascript error throwing .
    I used RadComboBox, you know the SelectedText (which is in code) does not point correctly either (i know that is a webservice but still can i display the DisplayData initially? and when i click on dropdown let it fetch from WebService).

    Please let me know if this is possible as this is my clients requirement

    Senthil
  5. Answer
    Angel Petrov
    Admin
    Angel Petrov avatar
    1007 posts

    Posted 16 Jan 2015 Link to this post

    Hi Sentil,

    If you are using a RadComboBox you can change the Eval expression so that a value is provided for the Text property of the control.

    ASPX:
    Text='<%#Eval("DisplayData") %>'
    By modifying the code as suggested above you should not experience any problems when firing a call to the web service to request the data.

    If the above suggestion does not prove helpful please open a formal support ticket and attach a project in which the problem can be reproduced. That way we will be able to debug the code locally and further research the matter.

    Regards,
    Angel Petrov
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
Back to Top