P
Patrick.O.Ige
If i use (How would i declare SetIndex or would i have to declare
DopDownList or TemplateColumn in Visual
Studio .Net) :-
Thx for the help in advance!!!
Function SetIndex(TheItem As String)
Dim i As Integer
For i = 0 To ItemTypes.Count - 1
If TheItem = ItemTypes(i) Then
Return i
End If
Next
End Function
And in Html i use it here as:-
------------------------------
<asp:TemplateColumn>
<HeaderTemplate>
Type<br>
<aspropDownList id="ItemType" runat="server"
DataSource='<%# ItemTypes %>'/>
</HeaderTemplate>
<ItemTemplate>
<aspropDownList id="ItemType" runat="server"
DataSource='<%# ItemTypes %>'
SelectedIndex='<%# SetIndex(Container.DataItem("ItemType")) %>'/>
</ItemTemplate>
</asp:TemplateColumn>
DopDownList or TemplateColumn in Visual
Studio .Net) :-
Thx for the help in advance!!!
Function SetIndex(TheItem As String)
Dim i As Integer
For i = 0 To ItemTypes.Count - 1
If TheItem = ItemTypes(i) Then
Return i
End If
Next
End Function
And in Html i use it here as:-
------------------------------
<asp:TemplateColumn>
<HeaderTemplate>
Type<br>
<aspropDownList id="ItemType" runat="server"
DataSource='<%# ItemTypes %>'/>
</HeaderTemplate>
<ItemTemplate>
<aspropDownList id="ItemType" runat="server"
DataSource='<%# ItemTypes %>'
SelectedIndex='<%# SetIndex(Container.DataItem("ItemType")) %>'/>
</ItemTemplate>
</asp:TemplateColumn>