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

[Solved] Binding a grid's child radcombobox with an async result.

3 Answers 164 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Burak
Top achievements
Rank 1
Burak asked on 09 Apr 2013, 07:59 AM
I want to bind an async function result to grid's child raddropdownlist while editing but there is no datasource property to bind. How could i do this .Thanks for your help from now.

my result serviceresult func is

void Sclient_ListRolCompleted(object sender, HzgKullaniciService.ListRolCompletedEventArgs e)
       {
           roller = e.Result.ToList<HzgKullaniciService.Kullanici_rol>();
       
       }

i want to bind roller that result of webservice to ddlistroller dropdownlist data source.

<telerik:RadGrid runat="server"
            ID="rgv_yetkiler"
            CellSpacing="0"
            Culture="tr-TR"
            GridLines="None"
            Skin="Metro"
            AutoGenerateColumns="False"
            AllowPaging="True"
            AllowSorting="True"
            AllowAutomaticUpdates="True"
            AllowAutomaticInserts="True"
            ShowStatusBar="True">
 
            <MasterTableView ShowFooter="false" DataKeyNames="ID" EditMode="InPlace" CommandItemDisplay="TopAndBottom">
                <CommandItemSettings ExportToPdfText="Export to PDF"></CommandItemSettings>
                <RowIndicatorColumn Visible="True" FilterControlAltText="Filter RowIndicator column"></RowIndicatorColumn>
                <ExpandCollapseColumn Visible="True" FilterControlAltText="Filter ExpandColumn column"></ExpandCollapseColumn>
                <Columns>
                    <telerik:GridBoundColumn DataField="yetkiadi" HeaderText="Yetki Adı" HeaderStyle-Width="300px" ItemStyle-Width="300px">
                        <ColumnValidationSettings>
                            <ModelErrorMessage Text=""></ModelErrorMessage>
                        </ColumnValidationSettings>
 
                        <HeaderStyle Width="300px"></HeaderStyle>
 
                        <ItemStyle Width="300px"></ItemStyle>
 
 
 
 
                    </telerik:GridBoundColumn>
                    <telerik:GridTemplateColumn HeaderText="Rol" UniqueName="rol" ItemStyle-Width="240px">
                        <ItemTemplate>
                            <%#roller.Where(r=>r.ID==new System.Guid(DataBinder.Eval(Container.DataItem, "rolID").ToString())).First<HzgMainWebApp.HzgKullaniciService.Kullanici_rol>().roladi%>
                        </ItemTemplate>
                        <EditItemTemplate>
                            <telerik:RadDropDownList
                                runat="server"
                                ID="ddlistroller"
                                DataTextField="roladi"
                                DataValueField="ID"
                                SelectedValue='<%#Bind("rolID")%>'
                                 
                                >
                            </telerik:RadDropDownList>
                        </EditItemTemplate>
                        <ItemStyle Width="240px"></ItemStyle>
                    </telerik:GridTemplateColumn>
                    <telerik:GridEditCommandColumn
                        FooterText="EditCommand footer"
                        UniqueName="EditCommandColumn"
                        HeaderText="Düzenle" HeaderStyle-Width="100px"
                        CancelText="İptal"
                        UpdateText="Güncelle">
                        <HeaderStyle Width="100px"></HeaderStyle>
                    </telerik:GridEditCommandColumn>
                </Columns>
                <EditFormSettings>
                    <EditColumn UniqueName="EditCommandColumn1" FilterControlAltText="Filter EditCommandColumn1 column"></EditColumn>
                </EditFormSettings>
                <PagerStyle PageSizeControlType="RadComboBox"></PagerStyle>
            </MasterTableView>
            <PagerStyle PageSizeControlType="RadComboBox"></PagerStyle>
            <FilterMenu EnableImageSprites="False"></FilterMenu>
 
 
 
        </telerik:RadGrid>

3 Answers, 1 is accepted

Sort by
0
Angel Petrov
Telerik team
answered on 12 Apr 2013, 06:53 AM
Hello Burak,

Actually RadDropDownList has a DataSource property. Is it not appearing in the intellisense? Could you please tell us the exact version of the controls?

All the best,
Angel Petrov
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Burak
Top achievements
Rank 1
answered on 12 Apr 2013, 08:01 AM

Yes datasource property doesn't appear in intellisense when combobox in a grid'a edit item tamplate. Rad Contols Version is v.2013.1.403.45 


0
Angel Petrov
Telerik team
answered on 17 Apr 2013, 07:50 AM
Hello Burak,

Please try rebuilding your application. You can set the property although it is not visible in the intellisense. Note that this Visual Studio feature is not controlled by us.

All the best,
Angel Petrov
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
Grid
Asked by
Burak
Top achievements
Rank 1
Answers by
Angel Petrov
Telerik team
Burak
Top achievements
Rank 1
Share this question
or