473,504 Members | 13,830 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Trouble with UpdateParameters and GridView

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?
Oct 21 '08 #1
0 1076

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
8939
by: jkayne | last post by:
Can someone offer some insight of why parameters outside of those contained in a SqlDataSource <UpdateParameters> section would show up in a profiler trace? I'm using: <UpdateParameters>...
4
6307
by: jens Jensen | last post by:
Hello, I have an image file name in a table that a let users modify via a GridView/DetailView pair. * The actual image file is saved in the image folder of the application. But the image is...
1
2676
by: Phillip Ian | last post by:
I've got the following: <asp:ObjectDataSource ID="lu" runat="server" TypeName="cFactory" SelectMethod="GetLookup" UpdateMethod="UpdateLookup" DataObjectTypeName="cLookupItem">...
3
8737
by: Mike P | last post by:
I must be missing something regarding update parameters. I have tried using <asp:Parameter> to specify my update parameters, and <asp:ControlParameter> when <asp:Parameter> didn't work for a...
1
2623
by: jkeel | last post by:
If I try to Update a record with the following code using a stored procedure I get an error: <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$...
0
1584
by: BenCoo | last post by:
Hello colleagues, I have a ObjectDataSource wich is linked to a SQL Server 2005 database I a gridview I have data and on each row a "Edit button" wich wil show the selected record in editmode....
7
5053
by: Justin | last post by:
Hi, this code updates a table with the new values with the event RowUpdating of a gridview. Protected Sub GridView1_RowUpdating(ByVal sender As Object, ByVal e As...
2
1054
by: RobertTheProgrammer | last post by:
Hi all, I'm really stuck here. I've got a GridView on my page and I want to use the update features to-- well, update. Here is my block of code in the SqlDataSource section: ...
1
1212
by: Jeff | last post by:
hi asp.net 2.0 I have a GridView based on a ObjectDataSource. I want to programatically set the UpdateParameters. I wonder in what event should I specify them. In ObjectDataSource.OnUpdating...
0
7098
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7298
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7366
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7017
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7471
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
5026
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3187
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3176
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1526
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.