This is a migrated thread and some comments may be shown as answers.

Not to close dropdown when select item.

2 Answers 247 Views
DropDownList
This is a migrated thread and some comments may be shown as answers.
Jose Mejia
Top achievements
Rank 1
Jose Mejia asked on 31 Aug 2011, 05:36 PM
Hello!

Is it possible not to close dropdownlist panel when I select some items?
For example, I have smth like treeview (not true treeview, but imagine):
Master Item:
  item1
  item2
  item3 
and so on.

For now I use the following code:
if (e.Position == 1)//Master item position == 1.
{
  e.Cancel = true;
  return;
}
...

Selected text(index) doesn't change, but it would be more convinient
and elegant if dropdownlist panel won't close  if I select "Master Item:".
Is it possible?

Thanks in advance.

2 Answers, 1 is accepted

Sort by
0
Jose Mejia
Top achievements
Rank 1
answered on 02 Sep 2011, 05:14 PM
up
0
Stefan
Telerik team
answered on 05 Sep 2011, 11:06 AM
Hi Jose,

Thank you for writing.

You can control the drop down closing of RadDropDownList from the PopupClosing event of the control. If you need to cancel the closing, simply set the Cancel property from the event args to true.

I hope that you find this information helpful. Should you have any other questions, do not hesitate to contact us.
 
Kind regards,
Stefan
the Telerik team

Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

Tags
DropDownList
Asked by
Jose Mejia
Top achievements
Rank 1
Answers by
Jose Mejia
Top achievements
Rank 1
Stefan
Telerik team
Share this question
or