List Info

Thread: New to ASP.NET 2.0 Gridview control issue Number 1




New to ASP.NET 2.0 Gridview control issue Number 1
country flaguser name
United States
2007-10-17 03:33:57

Hi,

I'm a DBA who has to build a website for my company. I'm having trouble
with the built-in GridView control.

Basically, I want to hide Primary and Foreign key columns within the
GridView controls from the user without affecting the control's ability
to update the table.

I tried hiding the columns on the Page_Load event of the page but then
the control couldn't find the ID when updating the data. I don't want
the user to see the ID fields for their data.

I'm using VB.NET as my source code. I'm still learning the Object
Library and so on.

If it helps, I'm not new to programming. I've been a Software Engineer
for 10 years prior to working my way into being a DBA. I'm fluent in the
following languages:

VB, VBScript, VBA
JavaScript
Python
RealBasic
AppleScript
Bash Shell
Transact-SQL
XML, HTML (DHTML blah blah) Even though these aren't languages.
Perl etc etc.

So I can pick through most complicated code snippets if necessary.

Thanks for any help. []

[Non-text portions of this message have been removed]

__._,_.___
.

__,_._,___
Re: New to ASP.NET 2.0 Gridview control issue Number 1
country flaguser name
United States
2007-10-17 08:14:18

Duane:
Look into using the DataKeys collection of the gridview rather than having
the key fields
in the gridview itself....

MSDN -
http://msdn2.microsoft.com/en-us/library/system.web.ui.webcontrols.gridview.datakeys.aspx

Google -
http://www.google.com/search?source=ig&hl=en&rlz=&;q=gridview+datakeys

HTH
--
Brett.Stinson%40gmail.com">Brett.Stinsongmail.com

On 10/17/07, Duane Hennessy < duaneh%40connexus.net.au">duanehconnexus.net.au> wrote:
&gt;
> Hi,
>
> I'm a DBA who has to build a website for my company. I'm having trouble
> with the built-in GridView control.
>
>; Basically, I want to hide Primary and Foreign key columns within the
> GridView controls from the user without affecting the control's ability
> to update the table.
&gt;
> I tried hiding the columns on the Page_Load event of the page but then
>; the control couldn't find the ID when updating the data. I don't want
>; the user to see the ID fields for their data.
&gt;
> I'm using VB.NET <http://vb.net/> as my source code. I'm still learning
> the Object
&gt; Library and so on.
>
> If it helps, I'm not new to programming. I've been a Software Engineer
> for 10 years prior to working my way into being a DBA. I'm fluent in the
> following languages:
>
&gt; VB, VBScript, VBA
> JavaScript
> Python
&gt; RealBasic
> AppleScript
> Bash Shell
&gt; Transact-SQL
> XML, HTML (DHTML blah blah) Even though these aren't languages.
> Perl etc etc.
>;
> So I can pick through most complicated code snippets if necessary.
>
&gt; Thanks for any help. []
>
> [Non-text portions of this message have been removed]
>
>;
>

[Non-text portions of this message have been removed]

__._,_.___
.

__,_._,___
[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )