Great Ideas. Always Flowing.

We are not happy until you are happy. Client satisfaction guaranteed. Whatever your needs and requirements, we have the skills and resources for the job!

Quick login...


Or... now make it easy with Facebook Integration
Connect via Facebook



Top Sellers

Frustrated over the lack of customization for your user's registration fields? Dynamically setup your DNN Portal with custom registration fields, layout, questions, and other core integration options......

Ultra Video Gallery is a brother product of Ultra Media Gallery, UVG allows you to upload videos in various format and automatically encode them to flv or H264 format, you also can add videos from internet or record live videos from your webcam.

Build high performance, completely customizable data-entry forms and views driven by your DNN and external databases. New built-in tools make it a snap to quickly create data entry forms, data views, and even database tables. Plus, add your own HTML, CSS, Javascript, SQL commands, stored procedures,

The most advanced DotNetNuke shopping cart on the planet. Easy to use e-Commerce, Secure Shopping Cart Software and SEO friendly. B2C / B2B Ecommerce Sites.

One stop solution for events calendar and events registration! FREE DOWNLOAD is available now!

Listbox in Dynamic Forms
Last Post 04-30-2010 05:01 AM by Shabbir Jadliwala. 9 Replies.
AddThis - Bookmarking and Sharing Button Printer Friendly
  •  
  •  
  •  
  •  
  •  
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
Shabbir JadliwalaUser is Offline
Posts:25
Avatar

--
04-13-2010 12:00 AM

    Morning David,

    Would it be possible to actually save the each selected items in a different row?

    I want to create a table like with columns: ProductID & CategoryID. So for each Category selected from the Listbox, it will save the related Product & Category ID on the matching table.

    And then based on that, would it be possible to have the listbox select the items when I go to the Edit page using the link: http://www.yourwebsite.com/default....DSParam1=2

    Thanks & Best Regards,

    Shabbir

    Shabbir JadliwalaUser is Offline
    Posts:25
    Avatar

    --
    04-13-2010 01:06 AM
    Hi David,

    I managed to get the data out of the Array you create when submitting the data using the following Stored Proc on SQL:

    ALTER PROC [dbo].[InsertTradeList]
    (
    @PropertyID int,
    @TradeName varchar(500)
    )
    AS
    BEGIN
    SET NOCOUNT ON

    DECLARE @TradeID varchar(10), @Pos int

    SET @TradeName = LTRIM(RTRIM(@TradeName))+ ';'
    SET @Pos = CHARINDEX(';', @TradeName, 1)

    IF REPLACE(@TradeName, ';', '') <> ''
    BEGIN
    WHILE @Pos > 0
    BEGIN
    SET @TradeID = LTRIM(RTRIM(LEFT(@TradeName, @Pos - 1)))
    IF @TradeID <> ''
    BEGIN
    INSERT INTO PBTrade (PropertyID, TradeName) VALUES (CAST(@PropertyID AS int), @TradeID) --Use Appropriate conversion
    END
    SET @TradeName = RIGHT(@TradeName, LEN(@TradeName) - @Pos)
    SET @Pos = CHARINDEX(';', @TradeName, 1)

    END
    END

    END

    Now my problem is to set them as "SELECTED" on the list box based on what I have in here. So I probably need a way to write a Javasrcipt which checked both the table extracts and if they are in both, then have the Listbox Item set as "SELECTED".

    Thanks & Best Regards,

    Shabbir
    David ToUser is Offline
    river guide
    river guide
    Posts:2719
    Avatar

    --
    04-13-2010 07:11 AM
    HI, well you could try javascript or use SQL default, whichever way is more easier to accomplish I think. -- David
    Shabbir JadliwalaUser is Offline
    Posts:25
    Avatar

    --
    04-14-2010 02:04 AM
    Thanks David for the reply.

    Not sure what you mean by javascript or SQL default?

    When I extract the data for Listbox using SQL, I get QuestionOptionValue and QuestionOption to be assigned to the field. Is there a property which I can get from the SQL to assign to maybe QuestionOptionSelected = "True" or "False"?

    Thanks & Regards,

    Shabbir
    David ToUser is Offline
    river guide
    river guide
    Posts:2719
    Avatar

    --
    04-14-2010 06:39 AM
    HI, no we don't have a QuestionOptionSelected parameter. If you really need it, it will have to fall into our custom premium support and Chad Nash can rewrite the VB.NET code to include that parameter in the listbox,etc. You can check out our premium support policy here:
    http://www.datasprings.com/Premium-Support
    --David
    Shabbir JadliwalaUser is Offline
    Posts:25
    Avatar

    --
    04-14-2010 06:42 AM

    Hi David,

    Thanks for the reply. So there is no direct way to use Dyanmic Forms to edit existing list boxes.

    Also, I want to pass the DSParam1 value in the setup completion event to go to a URL http://www.mywebsite.com/mypage.asp...Param1=$ID or something like that. But that doesn't work and it passes the values for DSParam1 = $ID and not the value i retreived in the form.

    Regards,

    Shabbir

    Chad NashUser is Offline
    Posts:5260
    Avatar

    --
    04-21-2010 10:26 AM
    Hi Shabbir,

    There is if you use our Edit Link token or Editing under 'View Results'. If you are trying to bind the data directly though there is not a build in feature. The only way to do it without having us modify the code would be to:

    1. Bring in the field data in a separated list of some sort (such as comma seperated). You would need to bring it in using a SQL Default to a 'hidden field'. So the hidden field would pull in 'Red,Blue,Green'

    2. Under Module Configuration/Initial JavaScript you would have to write a custom javascript function which would loop through the items in your listbox and mark those as selected if they existed within the hidden field.


    Again, our module handles this directly if you use the build in edit features, but for binding I believe it won't work if the listbox is multi selection, only single selection currently.

    Thanks,

    Chad

    Shabbir JadliwalaUser is Offline
    Posts:25
    Avatar

    --
    04-21-2010 11:13 PM
    Morning Chad,

    Thanks for the reply. What I might do is create a link to a standard aspx page where the user can edit the listbox items and submit from there. On the main page, I will probably only display the selected items.

    And can you please answer my other question about Redirecting to a page in the Completion Task and pass the $(ID) field as a Query String.

    http://www.mywebsite.com/mypage.asp...Param1=$ID

    Thanks & Best Regards,

    Shabbir
    Chad NashUser is Offline
    Posts:5260
    Avatar

    --
    04-27-2010 12:44 PM
    Hi Shabbir,

    In order for you to do this you would have to setup a hidden field with the short field name of 'DSParam1' to retrieve the value. You need to select the advanced field option on the field to 'Retrieve value from querystring variable'. You wouldn't really have to name it DSParam1 that is only when you are using it in SQL.

    From there what you would need to do is use a client side event and put that client side event under the module configuration, custom javascript file, Initial JavaScript. You would need to use JavaScript to basically set the value...

    Something like...
    $(YourListBoxField) = $(DSParam1)

    That would make the listbox field set initially.


    Hope this helps... writing client side events is not part of our standard support but if you need help and want us to write the JavaScript for you we can do this via Premium Support. You can pick up hours and find out more at http://www.datasprings.com/Premium-Support.

    Thanks!

    -Chad
    Shabbir JadliwalaUser is Offline
    Posts:25
    Avatar

    --
    04-30-2010 05:01 AM
    Hi Chad,

    Thanks for all the replies and support.

    Best Regards,

    Shabbir
    You are not authorized to post a reply.


     
     

    Join our mailing list...

    Get current news and events the easy way
    Subscribe Me

    Recent Blogs...

     
    Copyright 2005 - 2011 by Data Springs, Inc.
     
  • film izle
  • 720 izle
  • film
  • sinema izle
  • film makinesi
  • T�rk�e dublaj film
  • film izle
  • film izle
  • baglan film izle
  • sinema izle
  • 1080 film izle
  • film mercegi