I have a DataGridView in which one of its columns is a DatagridViewCombobox. This column contains values as
1. "ROAMING"
2. "MOBILE"
3. "TELEPHONY"...
I want to select an index from this DatagridViewComboboxCell programmatically, for example 2 ("MOBILE").
Is anyone knows an easy way of doing this.
Thak you
Hi hope this will give you some idea
<asp:DropDownList id="methdselect" runat="server" datasource='<%# Methodlist.items %>' SelectedIndex='<%#GetStateIndex(DataBinder.Eval(Co ntainer, "DataItem.Method")) %>'></asp:DropDownList>
Protected Function GetStateIndex(ByVal Method As String) As Integer
dim i As Integer = Methodlist.Items.IndexOf(Methodlist.Items.FindByTe xt(Method))
Return i
End Function
Where Methodlist is arraylist of all the methods you have included in the comboxbox i used to bind the same arraylist with comobox
Regards