Updating a Drop-down list when another drop-down list selected value changes

Yehuda Lando asked on April 3, 2014 15:47

Hi,

I have a document type with two drop-down lists. One is holding the value of the main type, and the second is holding the value of a sub type. The main type is either 1 or 2, and according to that I select the available sub types, like this: select DataID, Name from Ativ_ToolType where [Type] = {?InfoType.Value?}

InfoType is the field that is holding the main type.

When I change the default main type, it loads the correct sub types, but when I change the main type with the drop down, I get a postback, but the values stay the same. I did this with the beta of Kentico 8, and it worked correctly. I have "Has depending fields" and "Has depending fields" setup correctly.

Thanks

Recent Answers


Brenden Kehren answered on April 3, 2014 16:04

Using {?Column?} is a querystring macro. Are you sure you don't mean to use a context macro {%Column%}

0 votesVote for this answer Mark as a Correct answer

Yehuda Lando answered on April 3, 2014 18:16

I thought about it. Before {??} worked, but now I tried both ({??} and {%%}) and neither works. It does load the correct values for the first time, which get's me to believe the marco does work, but when updated the values don't get updated.

0 votesVote for this answer Mark as a Correct answer

Yehuda Lando answered on April 3, 2014 18:26

Actually, I used ?InfoType? when I had the beta version of Kentico 8 (without the {})

0 votesVote for this answer Mark as a Correct answer

Andrew Risbey answered on November 4, 2014 10:35

I've got exactly the same issue (using a context macro). Did this ever get resolved?

0 votesVote for this answer Mark as a Correct answer

Yehuda Lando answered on December 2, 2014 19:16

No, I told my clients they have to press apply before it updates..

0 votesVote for this answer Mark as a Correct answer

Yehuda Lando answered on December 2, 2014 19:17

But there was a bug in one of the latest hot fixes where this didn't work at all.

1 votesVote for this answer Mark as a Correct answer

Juraj Ondrus answered on December 6, 2014 11:18

Hi guys,

Yes, there was a bug. It was fixed in 8.1.12 hotfix.

I am sorry for the troubles.

Best regards,
Juraj Ondrus

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.