Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Datagrid Control > Is it possible to 'alias' a Datafield Name so I can update with my business layer

Reply
Thread Tools

Is it possible to 'alias' a Datafield Name so I can update with my business layer

 
 
AAJ
Guest
Posts: n/a
 
      10-13-2006
Hi all

this is a question out of curiosity rather then necessity, and I wonder if
anyone out there can help

I use a model in which a GridView binds to an ObjectDataSource which in turn
binds to my business layer using System.ComponentModel

if my gridview has the following property,

<asp:BoundField DataField="tbl_invoice_date" HeaderText="tbl_invoice_date"
SortExpression="tbl_invoice_date" />

when I update from the datagrid, my ObjectDataSource and hence my BLL method
both have to have a parameter called "tbl_invoice_date" i.e. the names have
to follow all the way through.

So my question is...

If my BLL and hence the update had a generic parameter called testdate i.e.

<asp:ObjectDataSource ID="ObjectDataSource1" ......

<UpdateParameters>
<asparameter Name="original_pk_" Type="Int32" />
<asparameter Name="testdate" Type="DateTime" />
</UpdateParameters>

how can I make my gridview interface with my generic ObjectDataSource is
there something I could use perhaps use some kind of Alias technique i.e.

<asp:BoundField DataField="tbl_invoice_date" Alias = "testdate"
HeaderText="tbl_invoice_date" SortExpression="tbl_invoice_date" />

if anyone knows it would be really useful

thanks

Andy


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
business layer, data access layer , presentation layer for asp.net using C#.net Dhananjay ASP .Net 1 12-18-2006 11:35 PM
The business layer and data access layer java-john Java 0 03-23-2006 07:10 PM
Business Layer, Data Layer, Speed Issues, Classes, and all that et ASP .Net 2 03-06-2006 02:46 PM
Exposing Business Layer Objects to Presentation Layer dan Java 25 10-28-2003 01:52 AM
Re: Exposing Business Layer Objects to Presentation Layer Universe Java 1 10-24-2003 09:40 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57