A
AAJ
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
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