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.
 
Inline Record Editor With AJAX
Last Post 01 Jan 1900 05:00 AM by . 4 Replies.
Printer Friendly
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages Informative
pauldesUser is Offline
Veteran Member
Veteran Member
Posts:1392

--
02 Sep 2006 03:40 PM  
This sample ListX application will show you how to add, edit and delete records in a grid WITH NO page refresh. It is a very cool implementation of AJAX and ListX allowing most record manipulation and display without any redirection or post backs(very FAST)

**WARNING** - this module is doing a LOT of stuff and, as such, is an INCREDIBLE source of frustration getting it right, IMHO. Once you do though, it adds great functionality to your site.

Files in InlineEditor.zip
CreateCarsTable.SQL - USE ONLY IF YOU HAVE NOT INSTALLED THE MyFirstListX sample in this forum. Run this script with a query tool or from HOST>SQL, to install the application table to your DNN database.

PopulateCars.SQL - USE ONLY IF YOU HAVE NOT INSTALLED THE MyFirstListX sample in this forum. Follow same procedure as CreateCarsTable.SQL

InlineEdit.XML - the ListX module. Add a new page to your site. Add a ListX module. From the module menu choose View Options. Click the XML icon. Replace ALL text in the XML text field with the contents of this file. Click the LOAD link. Click the SAVE CONFIGURATION link.

Lessons To Be Learned:
-how to return data in a grid
-how to use a header/footer in your grid, including column sorting
-how to utilize the footer to implement an insert form
-how to display an insert form on the grid if no results are returned
-how to use the ListX {IIF} statement to display HTML conditionally
-how to use double quoting "", and escaping \\, to display HTML within a ListX {IIF} statement
-how to implement AJAX in ListX utilizing the lxFetch client utility function
-converting form fields to variables
-debugging using the AJAX section in the debug results
-how to lookup a field value using SubQuery
-how to use SubQuery in a dropdown list in a form

Enjoy......

Attachment: InlineEditor.zip

ListX....makes you look brilliant, even though you're not.
mlarsenUser is Offline
New Member
New Member
Posts:49

--
28 Sep 2006 10:48 PM  
I have installed the InlineEditor as well as the other samples. The others work fine. The editor deletes & adds but nothing happens when I click on Edit. I see that clicking on edit assigns a session variable but I don't see what action is taken when that vDoEdit variable is set.

What am I missing?


pauldesUser is Offline
Veteran Member
Veteran Member
Posts:1392

--
28 Sep 2006 11:26 PM  
Do you have debugging turned on? See that the session variable gets set in AJAX ACTIONS. If it does, then in the LIST section of the Listx, either the inline edit form or just the data row are displayed based on IFF vDoEdit meets the If condition. When you click edit, your debug should look something like this:
* If '[Editcar,Q]' <> ''
o '42' <> '' = True
o Passed: Handling child actions.
o Executing
# Assignment: Assign <Session> variable 'vDoEdit' to '[Editcar,Q]'.
* Executing
* Assignment: Session[vDoEdit] = '42'


you can see it in action here:
http://test3.evolutiondnn.com/CarList/CarInlineEdit/tabid/63/Default.aspx


ListX....makes you look brilliant, even though you're not.
mlarsenUser is Offline
New Member
New Member
Posts:49

--
28 Sep 2006 11:41 PM  
I do have the debugging on ..

Actions:
Initiating the Message Action Handler
Handling 5 messages.
Evaluating Action Condition-If (0) ==> If '[Editcar,Q]' <> ''.
Conditional Failed Condition-If.

Ajax Actions:
Initiating the Message Action Handler
Handling 5 messages.
Evaluating Action Condition-If (0) ==> If '[Editcar,Q]' <> ''.
Conditional Passed Condition-If.
Executing Action Condition-If (0) ==> If '[Editcar,Q]' <> ''.
Handling 1 messages.
Executing Action Action-Assignment (1) ==> Assignment: Assign <Session> variable 'vDoEdit' to '[Editcar,Q]'..

I looked at the module on your site.. My module is definitely not seeing the action and showing the conditional HTML.

Could it be a listX version issue? I'm on v1.7.6.21587




mlarsenUser is Offline
New Member
New Member
Posts:49

--
29 Sep 2006 12:00 AM  
Ah that was it.. I upgraded to v1.8.0b and it works fine now!


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