Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0GridView & Details View - DNN BLL & DALGridView & Details View - DNN BLL & DAL
Previous
 
Next
New Post
10/25/2006 7:03 PM
 

HI All

I am building a module which displays a GridView and and a Detailsview when a row on the gridview is selected.

I have created a module with the standard data access layers as defined by the module creation steps.

  1. I have binded the Gridview to an object datasource succesfully which displays data as per select method. I have set the datakeyname accordingly. >> The GridView works fine without the steps below.
  2. I have specified the Gridview control's datakey column as a parameter on a new object datasource with a different select method created in the BLL which accepts the datakeyname as a parameter from the GridView.
  3. I have binded the Detailsview to the new object datasource and have also set the datakeyname the same on the detailsview.

I then get a Exception has been thrown by the target of an invocation error.

Any ideas what might be wrong. Am i completely doing this wrong?

Do i have to do this differently using custom business objects as per DNN module template ?

Thanks for any help, pointers or comments.

 
New Post
10/26/2006 12:32 PM
 

Hi Again.

Should i rather try and use the dataset when using the GridView and DetailsView together? I will give this a go but I would prefer making use of the business object to potentially port the module to a different datasource should there be a need to.

If you have any suggestions or think you know where i might go wrong it will be much appreciated.

Thanks

 
New Post
10/26/2006 8:38 PM
 

Have a look at:

Super-Fast Super-Easy Module (DAL+)

I have a GridView connected to a Details View. I am using pure OO design using Generics and Object Data Sources. This is not exactly what you're looking for but It is the closest thing I can find. What you want to do is possible. If you look in my tutorial you will see I have code such as this:

Protected Sub SetModuleId(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.ObjectDataSourceSelectingEventArgs) Handles ObjectDataSource_ThingsForSale.Selecting

e.InputParameters("ModuleId") = ModuleId.ToString

End Sub

This is the sort of code needed to inject the proper parameters ijnto the Object Data Source controls to make it work.



Michael Washington
http://ADefWebserver.com
www.ADefHelpDesk.com
A Free Open Source DotNetNuke Help Desk Module
 
New Post
10/27/2006 5:15 AM
 

Hi and thanks for the response.

I have worked through the samples on both DAL+ and DAL on your site. Thanks, they are both great tutorials indeed.

My module has to pull through data which can be captured or displayed by 1 or more modules of the same type. So the same module on one page will be able to see data captured from the same module on a different page.

So data will not be specific to any module in my case.

So there would be no need to look at the ModuleID if I am not mistaken?

So do i therefore still need to use the code below to make my GridView and DetailsView work together?

Protected Sub SetModuleId(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.ObjectDataSourceSelectingEventArgs) Handles ObjectDataSource_ThingsForSale.Selecting

e.InputParameters("ModuleId") = ModuleId.ToString

End Sub

 
New Post
10/27/2006 9:17 PM
 
No the Details view and the GridView should work together using the standard code.


Michael Washington
http://ADefWebserver.com
www.ADefHelpDesk.com
A Free Open Source DotNetNuke Help Desk Module
 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0GridView & Details View - DNN BLL & DALGridView & Details View - DNN BLL & DAL


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out