DataRowView

D

Dinky

Hi all,

I have got this error when using "DataRowView". Do we
need to put reference to this class somewhere? Or Could
you please point out What is wrong with this HTML?
Thanks

----------------------------------------------------------

Compiler Error Message: CS0246: The type or namespace
name 'DataRowView' could not be found (are you missing a
using directive or an assembly reference?)

Source Error:



Line 78:
</ItemTemplate>
Line 79:
<EditItemTemplate>
Line 80:
<asp:DropDownList runat="server"
SelectedIndex='<%# StateIndex[(String)((DataRowView)
Container.DataItem)["state"]] %>' id="edit_State">
Line 81:

<asp:ListItem>CA</asp:ListItem>
Line 82:

<asp:ListItem>IN</asp:ListItem>
----------------------------------------------------------
It is a dropdown list using in the datagrid control as
follows:


<EditItemTemplate>

<asp:DropDownList runat="server"
SelectedIndex='<%# StateIndex[(String)((DataRowView)
Container.DataItem)["state"]] %>' id="edit_State">

<asp:ListItem>CA</asp:ListItem>

<asp:ListItem>IN</asp:ListItem>

<asp:ListItem>KS</asp:ListItem>

<asp:ListItem>MD</asp:ListItem>

<asp:ListItem>MI</asp:ListItem>

<asp:ListItem>OR</asp:ListItem>

<asp:ListItem>TN</asp:ListItem>

<asp:ListItem>UT</asp:ListItem>

</asp:DropDownList>

</EditItemTemplate>
---------------------------------------------------------
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,020
Latest member
GenesisGai

Latest Threads

Top