This is a migrated thread and some comments may be shown as answers.

RadTree Combobox with webservice

3 Answers 62 Views
TreeList
This is a migrated thread and some comments may be shown as answers.
Sentil
Top achievements
Rank 1
Sentil asked on 08 Jan 2015, 10:55 AM
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

3 Answers, 1 is accepted

Sort by
0
Angel Petrov
Telerik team
answered on 13 Jan 2015, 07:38 AM
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.

 
0
Sentil
Top achievements
Rank 1
answered on 13 Jan 2015, 11:59 AM
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
0
Accepted
Angel Petrov
Telerik team
answered on 16 Jan 2015, 09:08 AM
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.

 
Tags
TreeList
Asked by
Sentil
Top achievements
Rank 1
Answers by
Angel Petrov
Telerik team
Sentil
Top achievements
Rank 1
Share this question
or