Trouble with UpdateParameters and GridView

J

Jeff

hi

asp.net 2.0

I have a GridView which when updating I get this error:
DataBinding: 'System.Web.UI.WebControls.GridView' does not contain a
property with the name 'Type'.

Here is the UpdateParameter collection for this GridView:
<UpdateParameters>
<asp:ControlParameter ControlID="gvwPhoneType" Type="Int32"
PropertyName="Id" Name="Id" />
<asp:ControlParameter ControlID="gvwPhoneType" Type="Char"
PropertyName="Type" Name="Type" />
<asp:ControlParameter ControlID="gvwPhoneType" Type="string"
PropertyName="Desc" Name="Desc" />
</UpdateParameters>

This is the column definition:
<Columns>
<asp:BoundField HeaderText="Kode" DataField="Type" />
<asp:BoundField HeaderText="Beskrivelse" DataField="Desc" />
</Columns>

datasource is an ObjectDataSource

The point is that I'm trying to send in the values in the current row into
UpdateParameters and the UpdateMethod specified in UpdateMethod tag. But
somehow my code doesn't work

any suggestions?
 

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,769
Messages
2,569,576
Members
45,054
Latest member
LucyCarper

Latest Threads

Top