Portal Engine
Version 3.x > Portal Engine > Displaying data from bizform View modes: 
User avatar
Member
Member
shuyun.cheng-xm-asia - 9/19/2008 7:55:27 AM
   
Displaying data from bizform
Hi,

I have a bizform for editors to input data.

On the frontend, I need to display data from column A as dropdown.
Based on the selected value, data from column B is displayed as dropdown as well.
With these 2 selected values, I have to display data from the other columns.

What is the best approach to solve this?

I currently have a Document Type as a container for the queries & transformation, but have absolutely no idea how to incorporate this into the webpart.

All kinds of help are greatly appreciated.

Thanks,
Shuyun

User avatar
Kentico Support
Kentico Support
kentico_radekm - 9/22/2008 5:31:05 AM
   
RE:Displaying data from bizform
Hello,

At first, please read how to create and add your custom web-part: http://www.kentico.com/docs/devguide/index.html?developing_web_parts.htm

At second, please note that bizform' s data (inserted by editor) are stored in our batabase. Every bizform has its own table, its name you can find in CMSDesk -> Tools -> BizForms -> edit bizform -> General -> Table name. This table contains all fields that you specified.

So, to achieve requested functionality, you can create custom webpart, use two dropdown lists from Toolbox (in your Site Manager) and bind them to appropriate tables in DB (DropDownList tasks -> Configure data source...). Do not forget to set "autopostback = "true";"

Now, if you want to determine displaing data in DropDownList2 in dependace on selected value in DropDownList1, you can use appropriate WHERE condition in SelectedIndexChanged event of DDL1, like this:

protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e)
{
// custom code with your WHERE Condition
}

You can use similar procedure to fill dataset control. To show the result on your page (using custom web-part), you will need to use GridView control and fill it using dataset control (content of dataset control itself you can see only in debug mode).

You can also note how to add custom actions to a BizForm form: http://www.kentico.com/docs/devguide/adding_custom_actions_to_a_biz.htm

Best Regards,
Radek Macalík

User avatar
Member
Member
Shuyun - 9/22/2008 12:28:37 PM
   
RE:Displaying data from bizform
Thanks Radek!

It's finally up and running!