DataGrid SelectedIndex type problem

J

Jeff Reed

I have this in my coding for a DataGrid:

<EditItemTemplate>
<asp:DropDownList id="eCategoryList" runat="server"
CssClass="selectBoxSmall" SelectedIndex='<%#
DataBinder.Eval(Container.DataItem), "Category_FK"%>'
DataValueField="Category_PK" DataTextField="Category"
DataSource="<%#eCATdv%>">
</asp:DropDownList>
</EditItemTemplate>

I am using Oracle ODP for .NET and the conversion it does
on Category_FK from NUMBER datatype to System.Decimal is
causing a problem in the above line. I get an error
message of "Specified cast is not valid."

How do I convert it so that it has an INT type? Or what
should I add to the above line of code that it converts
the Category_FK value/type to INT?

TIA !!!!!

Jeff
 

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

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,900
Latest member
Nell636132

Latest Threads

Top