473,387 Members | 1,785 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

usage of GridView.OnRowUpdating

hi

asp.net 2.0

I'm having problem updating a GridView. The problems is that the website
complains it don't find the update method. The problem is caused by the
updateparameters. The UpdateMethod take 3 parameters: Id (DataKeyNames),
Kode and Desc.

Here is the markup of both GridView and ObjectDataSource:
<asp:GridView ID="gvwPhoneType"
runat="server" OnRowUpdating="gvwPhoneType_RowUpdating"
OnRowDataBound="gvwPhoneType_DataBound"
OnRowEditing="gvwPhoneType_RowEditing"
OnRowDeleting="gvwPhoneType_RowDeleting"
DataSourceID="odsPhoneType" DataKeyNames="Id"
OnRowCancelingEdit="gvwPhoneType_RowCancelingEdit"
AutoGenerateEditButton="true"
ShowFooter="true"
AutoGenerateColumns="false" >
//columns go here

<asp:ObjectDataSource ID="odsPhoneType"
TypeName="DAL.SqlServer2005.SqlSupportProvider"
SelectMethod="getPhoneTypes" UpdateMethod="updatePhoneType"
InsertMethod="insertPhoneType" runat="server">
<UpdateParameters>
<asp:Parameter Type="Char" Name="type" Direction="Input" />
<asp:Parameter Type="string" Name="desc" Direction="Input" />
</UpdateParameters>
<InsertParameters>
<asp:Parameter Type="Char" Name="Type" />
<asp:Parameter Type="string" Name="Desc" />
</InsertParameters>
</asp:ObjectDataSource>

UpdateMethod:
public override void updatePhoneType(int id, char type, string desc)

So I thought about manually calling the UpdateMethod from the OnRowUpdating
event. Possible? any suggestions?
Oct 28 '08 #1
0 2401

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

Similar topics

1
by: Avanti | last post by:
Hello, I have a gridview wherein I've added functionality for Edit. Now, when I click on the Edit button, and modify a field, and click on the Update button, the new values disappear and the old...
0
by: Dom | last post by:
Hello This should work I know ... but.. with your help perhaps.. Trying to assign a 'selectparameter' to an objectdatasource nested within a gridview EditItemTemplate. When I try to access...
4
by: Tomasz Jastrzebski | last post by:
Hello Everyone, I have a GridView control bound to a plain DataTable object. AutoGenerateEditButton is set to true, Edit button gets displayed, and RowEditing event fires as expected.
1
by: =?Utf-8?B?Q2hyaXM=?= | last post by:
Hi, I have a gridview which I added a <asp:CommandField EditText="E" CancelText="C" UpdateText="U" ButtonType="Link" ShowEditButton="True" /> my gridview looks like this <asp:GridView...
3
by: RobertTheProgrammer | last post by:
Hi folks, I've got another problem. Basically, I'm trying to use a nested GridView, however the nexted GridView displays no values (even though in debug I'm getting valid values into my DataSet. ...
0
by: senglory | last post by:
I have the following ASPX: <asp:GridView ID="ctlAllocations" runat="server" OnRowEditing="ctlAllocations_OnRowEditing" OnRowDeleting="ctlAllocations_OnRowDeleting"...
11
by: Ed Dror | last post by:
Hi there, I'm using ASP.NET 2.0 and SQL Server 2005 with VS 2005 Pro. I have a Price page (my website require login) with GridView with the following columns PriceID, Amount, Approved,...
2
by: doanthithanhnhan | last post by:
I'm working with GridView. But it seems rough. When I add a Command Field (Edit, Update image button type) handly. The OnRowUpdating doesn't fire when I click on Update button. Then I change by...
5
by: sandhyascs | last post by:
Hi everyone I’m using the GridView in asp.net and populating the grid dynamically using c#.net.To edit the rows i i m using GridView1_RowUpdating(object sender, GridViewUpdateEventArgs e)....
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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
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...

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.