473,513 Members | 2,375 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

2.0 : config GridView to use SPs ?

It looks like MS wants you to use config a SQLDataSource , hand coding the
SELECT, INSERT, UPDATE, DELETE SQL , and then assigning
GridView.DataSourceID = SQLDataSource ...

But what if you prefer to encapsulate all your DML in SPs ? Is it possible
to config the SQLDataSource with SPs ? If not, is there an alternative to
MS's preferred method for config'ing a GridView ?
Feb 15 '06 #1
5 1417
I usually write a BLL which calls the sprocs from public methods and then
use the ObjectDataSource pointing to the BLL.

--
Jeff Lynch
"Ramblings From A [Microsoft] Connected Universe"
http://codebetter.com/blogs/jeff.lynch
"John A Grandy" <johnagrandy-at-yahoo-dot-com> wrote in message
news:O4**************@TK2MSFTNGP10.phx.gbl...
It looks like MS wants you to use config a SQLDataSource , hand coding the
SELECT, INSERT, UPDATE, DELETE SQL , and then assigning
GridView.DataSourceID = SQLDataSource ...

But what if you prefer to encapsulate all your DML in SPs ? Is it
possible to config the SQLDataSource with SPs ? If not, is there an
alternative to MS's preferred method for config'ing a GridView ?

Feb 15 '06 #2
Hi Jeff.

I'm too sleepy .... what's a BLL ?

Thanks.
"Jeff Lynch" <je********@newsgroup.nospam> wrote in message
news:On*************@tk2msftngp13.phx.gbl...
I usually write a BLL which calls the sprocs from public methods and then
use the ObjectDataSource pointing to the BLL.

--
Jeff Lynch
"Ramblings From A [Microsoft] Connected Universe"
http://codebetter.com/blogs/jeff.lynch
"John A Grandy" <johnagrandy-at-yahoo-dot-com> wrote in message
news:O4**************@TK2MSFTNGP10.phx.gbl...
It looks like MS wants you to use config a SQLDataSource , hand coding
the SELECT, INSERT, UPDATE, DELETE SQL , and then assigning
GridView.DataSourceID = SQLDataSource ...

But what if you prefer to encapsulate all your DML in SPs ? Is it
possible to config the SQLDataSource with SPs ? If not, is there an
alternative to MS's preferred method for config'ing a GridView ?


Feb 15 '06 #3

The BLL is the "BusinessLogicLayer".

You need to use:
ObjectDataSource

and then create something like a custom collection

MyEmpCollection : CollectionBase

Where.. you will put Emp objects inside of your MyEmpCollection

...
If you don't know how to create CollectionBase ('s), then check
http://spaces.msn.com/sholliday/ 9/21/2005 entry

You can ingore the XmlSerializer stuff, and just get the CollectionBase
stuff.


"John A Grandy" <johnagrandy-at-yahoo-dot-com> wrote in message
news:O4**************@TK2MSFTNGP10.phx.gbl...
It looks like MS wants you to use config a SQLDataSource , hand coding the
SELECT, INSERT, UPDATE, DELETE SQL , and then assigning
GridView.DataSourceID = SQLDataSource ...

But what if you prefer to encapsulate all your DML in SPs ? Is it possible to config the SQLDataSource with SPs ? If not, is there an alternative to
MS's preferred method for config'ing a GridView ?

Feb 15 '06 #4
Normally I'd do that ... because I'm a OO , multi-tier guy ...

..... but I'm just trying to test out this DataView control to see if it's
worth using. The provided wizards should work against simple table with
simple select,insert,update,delete sps .... shouldn't they ?

Or is this another "botched wizard" from MS ?

"sloan" <sl***@ipass.net> wrote in message
news:eK**************@TK2MSFTNGP11.phx.gbl...

The BLL is the "BusinessLogicLayer".

You need to use:
ObjectDataSource

and then create something like a custom collection

MyEmpCollection : CollectionBase

Where.. you will put Emp objects inside of your MyEmpCollection

..
If you don't know how to create CollectionBase ('s), then check
http://spaces.msn.com/sholliday/ 9/21/2005 entry

You can ingore the XmlSerializer stuff, and just get the CollectionBase
stuff.


"John A Grandy" <johnagrandy-at-yahoo-dot-com> wrote in message
news:O4**************@TK2MSFTNGP10.phx.gbl...
It looks like MS wants you to use config a SQLDataSource , hand coding
the
SELECT, INSERT, UPDATE, DELETE SQL , and then assigning
GridView.DataSourceID = SQLDataSource ...

But what if you prefer to encapsulate all your DML in SPs ? Is it

possible
to config the SQLDataSource with SPs ? If not, is there an alternative
to
MS's preferred method for config'ing a GridView ?


Feb 15 '06 #5
Its another botched component, I have been able to do just about everything
(edit, update and delete) but can not get the insert figured out.

I would like to use the footer to hold the input row, that part is easy, and
use an image button/link to implement the insert. well unless I create a an
onclick postback routine on the insert image, it does not work. When i am
able to get it to work the resulting refresh of data does not reflect the
newlly added row or the deleted row in the event of a delete.

"John A Grandy" <johnagrandy-at-yahoo-dot-com> wrote in message
news:u2**************@TK2MSFTNGP10.phx.gbl...
Normally I'd do that ... because I'm a OO , multi-tier guy ...

.... but I'm just trying to test out this DataView control to see if it's
worth using. The provided wizards should work against simple table with
simple select,insert,update,delete sps .... shouldn't they ?

Or is this another "botched wizard" from MS ?

"sloan" <sl***@ipass.net> wrote in message
news:eK**************@TK2MSFTNGP11.phx.gbl...

The BLL is the "BusinessLogicLayer".

You need to use:
ObjectDataSource

and then create something like a custom collection

MyEmpCollection : CollectionBase

Where.. you will put Emp objects inside of your MyEmpCollection

..
If you don't know how to create CollectionBase ('s), then check
http://spaces.msn.com/sholliday/ 9/21/2005 entry

You can ingore the XmlSerializer stuff, and just get the CollectionBase
stuff.


"John A Grandy" <johnagrandy-at-yahoo-dot-com> wrote in message
news:O4**************@TK2MSFTNGP10.phx.gbl...
It looks like MS wants you to use config a SQLDataSource , hand coding
the
SELECT, INSERT, UPDATE, DELETE SQL , and then assigning
GridView.DataSourceID = SQLDataSource ...

But what if you prefer to encapsulate all your DML in SPs ? Is it

possible
to config the SQLDataSource with SPs ? If not, is there an alternative
to
MS's preferred method for config'ing a GridView ?



Feb 20 '06 #6

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

Similar topics

3
5660
by: theKirk | last post by:
using Visual Studio 2005 C# ASP.NET I know there has to be a simple way to do this....I want to use C# in a code behind for aspx. Populate a GridView from an xml file Add Fields to the...
6
3022
by: Nalaka | last post by:
Hi, I have a gridView (grid1), which as a templateColumn. In the template column, I have put in a gridView (grid2) and a ObjectDataSource (objectDataSource2). Question is... How to I pass the...
0
2550
by: Giorgio | last post by:
It seems that the ASP.NET Microsoft team didn't think about this!! The profilemanager class has the following methods: - DeleteInactiveProfiles. Enables you to delete all profiles older...
5
4825
by: Dick | last post by:
I have a GridView bound to an ObjectDataSource. I have a Button that calls GridView.DataBind. I want the row that is selected before the DataBind to still be selected afterwards. This happens...
1
1752
by: John A Grandy | last post by:
I'm not using SqlDataSource or ObjectDataSource. I'm handling events , similar to approach commonly used in 1.1. DataGrid. My question is : How do I configure a GridView's edit mode row format ?...
3
2313
by: Jim Andersen | last post by:
Hi, I would appreciate if someone could explain this behaviour, and maybe offer a better solution. I have been working with the GridView control. And SqlDataSource. It works great if I do:...
2
13167
by: antonyliu2002 | last post by:
I've been googling for some time, and could not find the solution to this problem. I am testing the paging feature of gridview. I have a very simple web form on which the user can select a few...
0
990
by: =?Utf-8?B?UGhpbGlw?= | last post by:
I am referencing external controls defined in web.config system.web/pages/controls... illustrated as follows... <pages validateRequest="false" enableViewStateMac="true"...
3
5220
by: Peter | last post by:
I have a GridView which is populated by List<ofObjects> Does anyone have example of how to sort the columns of this GridView? I have found examples without DataSourceControl but these use...
0
7267
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
7391
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
7553
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...
0
7542
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5697
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5100
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4754
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3235
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
809
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.