R2i DotNetNuke® Forum

R2i wants you to have the opportunity to ask questions, post reviews, help others or just rant and rave about DotNetNuke® or any of the R2i Modules and Skins. Our team spends hour upon hour, day after day, working on custom DotNetNuke® modules and services; please feel free to ask us anything.
 
Using the ListX module to create a database-driven master-detail interface on a single web page
Last Post 01 Jan 1900 05:00 AM by . 5 Replies.
Printer Friendly
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages Informative
sfilipUser is Offline
New Member
New Member
Posts:9

--
29 Sep 2007 06:31 PM  
I've just published an article on my blog (http://dnnuke.blogspot.com) with the title "Using the ListX module to create a database-driven master-detail interface on a single web page". It's a simple tutorial on how to add master/detail functionality when querying a database table on a single DNN page. Please have a look, I would like to hear your opinions.

URL: http://dnnuke.blogspot.com/2007/09/using-listx-component-to-create.html
robert_chumleyUser is Offline
Advanced Member
Advanced Member
Posts:592

--
01 Oct 2007 02:17 PM  
Hello sfilip,
Very nice article demonstrating what ListX can really do. Your article really combines some of the core to what ListX is all about. One recomendation is that we do not hard code the ModuleID for the destination of the lxFetch call. We typically set a javascript variable to the '[MODULEID, SYSTEM]' in the "detail" wherever we need to refer to one of the "detail" modules. Therefore we can refer to that module in the "master" by that javascript var. This makes switching the "detail" modules in and out easier and allows for future extensibility. This also allows you to use your pattern on another page.

In the future you may be able to write something on the fourth parameter to the lxFetch. This parameter is the destination id so you can use AJAX to insert at a specific point on the page.

Thanks,
robert_chumley
Robert Chumley<br>r2integrated (formally bi4ce)
miamirayUser is Offline
New Member
New Member
Posts:45

--
27 Feb 2008 03:08 PM  
Uh,

When you have a couple minutes, could someone do me a favor and give a little example of that? (setting module id to a javascript variable)?

Where do I put javascript inside the module? And then just a quick sample of the javascript that would go in the module, and a sample of the lxFetch with it in there.

Thanks in advance,

Ray
pauldesUser is Offline
Veteran Member
Veteran Member
Posts:1392

--
27 Feb 2008 08:11 PM  
In the master grid module, to link to the detail module, your A tag would look like:
<a href="lxFetch(myDetailMod,0,'DetailRecordId=[yourrecordidfieldname]');">View Detail>

In the detail DNN Module Settings, go to the Header and insert:
<script language="javascript">
var myDetailMod = [ModuleId,System]
</script>
Then in the Query section of your detail module, it would read something like:
select * from mytable where mytableid = [DetailRecordId,Querystring]
ListX....makes you look brilliant, even though you're not.
robert_chumleyUser is Offline
Advanced Member
Advanced Member
Posts:592

--
27 Feb 2008 09:40 PM  
Thanks pauldes,
Let us know if this solves the problem miamiray.
Thanks,
Robert Chumley<br>r2integrated (formally bi4ce)
miamirayUser is Offline
New Member
New Member
Posts:45

--
01 Mar 2008 05:10 AM  
YES!
Works great!

Thanks.

You are not authorized to post a reply.

Active Forums 4.1
 

New York, NY • Baltimore, MD • Vienna, VA • St. Louis, MO • Seatle, WA • 410.327.0007 • info@R2Integrated.com

Bookmark & Share Bookmark and Share