Enable disable textbox on checkbox click event in mvc4 razor view engine - asp.net-mvc-4

this may sound silly but need to know how i could enable and disable textbox on checkbox click event in mvc. I am populating few items in a list and need to fill quantity in a textbox after corresponding checkbox is checked..

I would suggest using jQuery to pull this one off.
Your code would look something like this if you use jQuery:
$("#yourCheckBox").click(function () {
$('#yourTextBox').attr("disabled", $(this).is(':checked'));
});

Related

Button click inside repeater UpdatePanel problem

I have button inside of repeater in a contentpage.
How can I use update panel with that?
I want to make that,
Button click inside a repeater triggers itemcommand function and after that not posstback refresh.
Best regards
Do you want this result?
Microsoft officially gave some good cases, you can refer to the following:
Specify and code handlers for the ItemCommand event of the Repeater control

displayfield and textfield change

I have created a window which has a grid and a form that displays values in plain displayfields of the records in the grid when clicked on.
There is an "New" button for the form and once clicked by the user, the displayfields should switch to textfields which should allow you to enter a new record into a database.
Can anybody point me towards a certain direction in order to do this? I am a complete newbie to ExtJS and only just started learning ExtJS4.
Thank you in advance.
I would suggest looking into the row editing plugin.
http://docs.sencha.com/ext-js/4-1/#!/api/Ext.grid.plugin.RowEditing
You will need to add that to the plugins config item on the grid, then add editor configs to each of the columns that you want to edit. The editor config is generally just a xtype and config options for one of the components found in Ext.form.field.*.

Extjs 4 grid customization after clicking on a row add a panel with a textfield

I am new to extjs 4 and I have got a problem to customize the grid panel. My application have JSON data to render in a grid. After populate the data when user click on a particular row he need to get an panel (Just like row editing plugin) of a textfield and a button to send the entered text to server through the controller. This data that user entered is not the data of grid column.
I need to know is it possible? And if it is, then how can I make it.
Thanks in advance.
Sure it is possible. First look at the following example from the Extjs 4.1 docs
All you need is to add your listener to itemclick grid event. Within this listener function you can create panel you need.

How can I make a Wicket form save radio button state?

I want to have a repeater like DataView or ListView. The first column of each row (named User ID) should be read from a List, and for each user ID, the program should dynamically create three radio buttons like these:
Requirements:
The user must able to change selection of radio buttons.
When the user clicks the submit button, radio values be displayed using the info("") method.
I've already done this by using this example, but when I click the submit button, old selections are shown, and the form gets reset to those old selections.
This example code might be helpful.
ListView doesn't play very well with form components, but it may work if you call ListView.setReuseItems(true);.

How does the tooltip control enhance all controls on the form with a new property?

When answering another question I started to wonder how I could Add new properties to all controls in a form just like the ToolTip-control does.
For example I could use that to Add a "IsDirty"-flag to all textboxes just by adding the component to the form and it would handle this for every textbox.
When adding the tooltip-control to the form all controls magically gets a new property "Tooltip on tooltip1" that can be set both programatically and in design view.
I want to be able to do my own enhancer like that.
It's an Extender Provider.