Telerik MVC Combobox - Change background of an item - asp.net-mvc-2

I tried to change the hightlight of an item, it worked using:
var combobox = $('#ComboBox').data('tComboBox');
combobox.highlight(2);
The problem is I can only highlight on item!! Is there another way to change the background or font (bold) so the user can remember which item they have selected.
Thanks in advance.

Basically to mark an item as selected all you need is to add the 't-state-selected' class to it.
So for example to make all the items in the dropdown area selected, you can get a reference like this to them and append the class:
$('#ComboID').data().tComboBox.dropDown.$items.addClass('t-state-selected');

Related

Swift todo List change labeltext

I'm making a todolist app in swift 3. So far I have this result :
I can add a row, delete a row and when I click on a row it gives me this :
The details is displayed in a Label, I'd like to be able to edit it when cliked on the label, like in a note app. Keeping the whole existing text and enable the user to add or erase things in it. I red that it is not possible to edit a label so I was wondering how is it possible to do that ?
A UILabel is used for content that you don't want to be editable. Try using a UITextView here.

show and hide tabs dynamically in touch ui -AEM

I have a requirement, where I need to show few tabs on selection of a value from a drop down.
I have done this in classic UI. But not sure how to proceed for Touch UI. I know that we can use JQuery, Can anyone let me know the approach I can use.
Its fairly simple, look at the OOTB List Component /libs/foundation/components/list. The selection dropdown is defined - /libs/foundation/components/list/cq:dialog/content/items/column/items/listFrom, look at property class and cq-dialog-dropdown-showhide-target these are used to manage hide and show.
Now from here look at the dropdown values under - /libs/foundation/components/list/cq:dialog/content/items/column/items/listFrom/items these values trigger the hide and show mapping to property showhidetargetvalue as in /libs/foundation/components/list/cq:dialog/content/items/column/items/setDescendants

SmartGWT : ListGrid Dragging customizing

I need to put an HTML code on dragging event. Like there is some HTML text that gets dragged with Cursor.
By default first column of ListGrid goes with Cursor. But I want to generate separate Text for it.
So, is it possible to do that?
Or Is there any other option to do that?
Please help me in this.
Thanks.
Whats displayed (by default) during a drag event in ListGrid is defined by ListGrid.dragTrackerMode and ListGrid.titleField.
ListGrid will default to first field to obtain the description to be shown during a drag, based on titleField.
If you already have another field in the grid from which you can obtain the text, use listGrid.setTitleField("other-field-name");
A custom title can be defined by overriding ListGrid.getDragTrackerTitle
If multiple records are selected, and dragged, drag tracker/title/etc. will be based on first selected record.
Check other ListGrid methods that allow drag tracker customizations as well.

How to create Dynamic Control in Dynamic form Module in DNN?

Actually I have a DropDownList, Which have values 1,2,3,4,5,6.And Under this some controls 2 RadioButtons,3 CheckBox Group and 4 TextBoxes. When i select value 1 from DropDown These controls display once,when i select value 2 from dropDown , these controls display twice and so on. So how can i do this? Please help anyone . Thanks in Advance.
you can do that with jquery, somthing like this:
jQuery('<div/>').appentTo('#body')
you can achive this in two (or more) way:
add 6 "multiview" controls each of it has an empty view in it and filled view with the desired controls.
If you switch your dropdownlist you can call:
mvMymultiView1.SetActiveView(vShowControls);
mvMymultiView1.SetActiveView(vEmptyView);`
you can place 6 Controls of <asp:placeholder> on your page and fill them dynamically with new Controls at runtime.
I would prefer my first way to achive your target. This is pretty easy cause you can show or hide your controls rly easy and fast without deleting or creating any control at runtime.

jquery hide show

I have a table generated from database ( basically in MVC view). I want to make it editable. I want to use jquery to hide the row when edit button infront of row is clicked and show the row in edit format which is by default hidden. how can I do this using jquery?
Please suggest solution
Thanks
I was able to accomplish this by tagging the table row with a fake class name, then in the button click events I used jquery's Hide/Show. Like this:
In your edit button click event call this:
$('.trMyRowIWantToHide').hide();
And tag your table row with a fake class like this:
<tr class="trMyRowIWantToHide">
JQuery Show
http://api.jquery.com/show/
JQuery Hide
http://api.jquery.com/hide/
You also may want to make use of div tables for this project instead of actual tables. You selectors such as $("#idofcolumn").toggle(); to hide and show the div or in your case you would probably want to show a text field. You could even .html() to replace the text in a column with a text box. There are several ways to go about this. Check out the JQuery documentation.
http://docs.jquery.com/Main_Page
How exactly is the HTML set up for your rows? Normally you could do $('SELECTOR').toggle() on each of them.