473,569 Members | 2,542 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Trouble with UpdateParameter s and GridView

hi

asp.net 2.0

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

Here is the UpdateParameter collection for this GridView:
<UpdateParamete rs>
<asp:ControlPar ameter ControlID="gvwP honeType" Type="Int32"
PropertyName="I d" Name="Id" />
<asp:ControlPar ameter ControlID="gvwP honeType" Type="Char"
PropertyName="T ype" Name="Type" />
<asp:ControlPar ameter ControlID="gvwP honeType" Type="string"
PropertyName="D esc" Name="Desc" />
</UpdateParameter s>

This is the column definition:
<Columns>
<asp:BoundFie ld HeaderText="Kod e" DataField="Type " />
<asp:BoundFie ld HeaderText="Bes krivelse" DataField="Desc " />
</Columns>

datasource is an ObjectDataSourc e

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

any suggestions?
Oct 21 '08 #1
0 1080

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

Similar topics

3
8944
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> <asp:Parameter Name="MerchID" Type="Int32" /> <asp:Parameter Name="Merchant" Type="String" /> <asp:Parameter Name="ModifiedBy" Type="String" />...
4
6309
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 rendered in a templatefield 's <itemtemplate> on the detailsview. In the <edititemtemplate> i have a fileupload control . leting users upload a new...
1
2692
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"> <SelectParameters> <asp:QueryStringParameter Name="which" QueryStringField="lookup" /> </SelectParameters> <UpdateParameters>
3
8747
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 particular parameter. Here is my code : < asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$...
1
2630
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="<%$ ConnectionStrings:stellentConnectionString %>" SelectCommand="spWC_Adjusters" SelectCommandType="StoredProcedure" InsertCommand="spWC_Adjusters_Insert "...
0
1586
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. When I click the update button I get this error : Parameterized Query '(@TmprValue float,@TmprRemark nvarchar(4000),@TmprLocationID int' expects...
7
5054
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 System.Web.UI.WebControls.GridViewUpdateEventArgs) Handles GridView1.RowUpdating Dim vlgn As Int16
2
1057
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: <asp:SqlDataSource ID="SqlDataSource3" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionStringTraining %>" ProviderName="<%$...
1
1216
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 or GridView.OnRowUpdating any suggestions?
0
7700
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7614
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8125
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
6284
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5513
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3653
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3642
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2114
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 we have to send another system
0
938
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.