ComboBox seleted item

Hi,

I have an comboBox in an editItemTemplate control of an asp.net 4.0 page as follows. how can select the existing item as the selected item when click edit button on the gridView?

                                <asp:TemplateField HeaderText="Type">
                                    <ItemTemplate>
                                        <asp:Label ID="lblwType" runat="server" Text='<%# Bind("Type") %>'></asp:Label>
                                    </ItemTemplate>
                                    <EditItemTemplate>
                                        <asp:ComboBox ID="cboType" runat="server" AppendDataBoundItems="True" AutoCompleteMode="Suggest"
                                            DataSourceID="sdsType" DataTextField="Type" DataValueField="TypeId"
                                            DropDownStyle="DropDownList" MaxLength="0" Style="display: inline;">
                                        </asp:ComboBox>
                                    </EditItemTemplate>
                                </asp:TemplateField>

please help me with c# code?

thanks
LVL 7
ayha1999Asked:
Who is Participating?
 
ayha1999Author Commented:
the links dont provide much info.

pls. provide a sample

thanks
0
 
ayha1999Author Commented:
pls. provide a sample code?

thanks
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.