Portal Engine Questions on portal engine and web parts.
Version 4.x > Portal Engine > getting custom table fields to be dynamic (ajaxy) View modes: 
User avatar
Member
Member
eagleag - 6/2/2010 9:11:13 AM
   
getting custom table fields to be dynamic (ajaxy)
hi,
I have a doc type with 3 fields.
name
city
number

name and city have 2 separate custom table to update them.
I want to have that when u create item in NUMBER custom table,
you will choose name + city from dropDown,

When you select an option from name dropdown the city dropdown shoudl update to have only cities under that name.
I wrote this sql, but doesn't work. does page need to be refreshed?
have can I get this to work?


SELECT TEMP_Cities.City, TEMP_Cities.City
FROM TEMP_Cities
JOIN
TEMP_Neighborhood
ON TEMP_Neighborhood.Name = TEMP_Cities.Name


User avatar
Kentico Developer
Kentico Developer
kentico_ondrejv - 6/7/2010 7:27:06 AM
   
RE:getting custom table fields to be dynamic (ajaxy)
Hello,

In this case, you will need to create custom form control: devnet.kentico.com/docs/devguide/developing_form_controls.htm, which will be used for dynamic populating of the dropdowns: devnet.kentico.com/Knowledge-Base/Web-parts---Controls/How-to-create-a-dynamically-filled-drop-down-menus.aspx. In this KB article, there is shown, how to take advantage of SelectedIndexChanged event and fill one dropdown according the value in another one.

Please note, you can use our API to retrieve the data from your custom tables: devnet.kentico.com/docs/devguide/custom_tables_api_examples.htm

Best regards
Ondrej Vasil

User avatar
Member
Member
eagleag - 6/9/2010 9:20:13 AM
   
RE:getting custom table fields to be dynamic (ajaxy)
Thanks.

the form control i'm using represents two fields.
the form control has two dropdownlists, that data goes to two fields in custom table.
question in image:
User image


User avatar
Kentico Developer
Kentico Developer
kentico_ondrejv - 6/11/2010 8:45:11 AM
   
RE:getting custom table fields to be dynamic (ajaxy)
Hello,

The best way is using our button. You can either save your input values in the SaveDocument method in following file:

~\CMSModules\Content\CMSDesk\Edit\Edit.aspx.cs

or create new handling file in Site Manager -> Development -> Document types -> Edit -> General -> New page/Editing page and manage your code there.

Another option would be custom tree node handler: http://devnet.kentico.com/docs/devguide/event_handling_overview.htm, http://devnet.kentico.com/docs/devguide/treenode_handler.htm

Best regards
Ondrej Vasil

User avatar
Member
Member
eagleag - 6/13/2010 4:43:02 AM
   
RE:getting custom table fields to be dynamic (ajaxy)
Thanks.
I'm using 4.1.
I couldnt find ~\CMSModules\Content\CMSDesk\Edit\Edit.aspx.cs
or
Site Manager -> Development -> Document types -> Edit -> General -> New page/Editing page

why am I missing that doctype?

User avatar
Member
Member
eagleag - 6/13/2010 9:39:16 AM
   
RE:getting custom table fields to be dynamic (ajaxy)
How to SAVE the value from custom form?????

User avatar
Kentico Developer
Kentico Developer
kentico_ondrejv - 6/14/2010 4:57:31 AM
   
RE:getting custom table fields to be dynamic (ajaxy)
Hello,

I'm sorry, I overlooked the forum section is for 4.x versions. In your 4.1 version the location is here: ~\CMSDesk\Content\edit.aspx.cs. At any rate, the solution for managing data is still the same as in my previous post. You will use our API to save data in e.g. SaveDocument method.

Best regards
Ondrej Vasil