Wrox Programmer Forums
|
ASP.NET 2.0 Basics If you are new to ASP or ASP.NET programming with version 2.0, this is the forum to begin asking questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 22nd, 2007, 02:15 PM
rlb rlb is offline
Authorized User
 
Join Date: Jan 2007
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
Default gridview sql proc parameters

Hello,

I have a gridview that takes data from three different tables, each with its own key, and uses a custom sql procedure to update the gridview. Code looks like this:
Code:
 <asp:GridView ID="resultsGridview"  Runat="server"
        DataKeyNames="LIC_ID" ... >
        <Columns>
          <asp:BoundField HeaderText="Group" DataField="GROUP_NAME" SortExpression="GROUP_NAME"  />
          <asp:BoundField HeaderText="S_ID" DataField="SOFTWARE_ID" SortExpression="SOFTWARE_ID"  Visible=false />
          <asp:BoundField HeaderText="M_ID" DataField="MAN_ID" SortExpression="MAN_ID"  Visible=false />
          <asp:BoundField HeaderText="Manufacturer" DataField="M_NAME" SortExpression="M_NAME" />
          <asp:BoundField HeaderText="Software Title" DataField="S_NAME" SortExpression="S_NAME" />

             ...


I don't want the user to see (nor edit) the M_ID or S_ID fields. But I need these two parameters to be passed to my sql stored procedure that handles the update.

How do I do it?
 
Old January 24th, 2007, 12:52 PM
rlb rlb is offline
Authorized User
 
Join Date: Jan 2007
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Okay, fixed my problem.
If I remember right, you cant edit fields in your gridview from merged tables and have them update correctly.
Instead, you use a SQL procedure for your update command.





Similar Threads
Thread Thread Starter Forum Replies Last Post
unicode parameters in stored proc CharityPays SQL Server 2000 1 November 12th, 2006 12:02 AM
sql statements and stored proc. HOW????? xristina MySQL 3 October 24th, 2004 07:12 AM
problems with stored proc and output parameters zieg42 VB.NET 2002/2003 Basics 1 June 12th, 2004 07:11 AM
Optional Stored Proc Parameters? VBAHole22 SQL Server 2000 3 August 13th, 2003 11:46 AM
Passing Parameters to Stored Proc mdillard Classic ASP Professional 6 June 10th, 2003 10:35 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.