checkbox

WPF Checkbox like StackOverflow's "accepted answer" checkbox

I'd like to create a customized checkbox that behaves exactly like StackOverflow's "accept answer" checkbox: That is, I simply want to display a single image when checked, and a single different image when unchecked. I don't care about indeterminate state. I'm a bit of a newbie when it comes to WPF ControlTemplates, so I'm...

Would Like Multiple Checkboxes to Update World PNG Image Using Mogrify to FloodFill Countries With Color

Hi. I'm seeing in another forum if the best way to do this is with Javascript or Ajax but I'm wondering if there is an even easier simpler way. I'm trying to create a web service where users can check which countries they have visited from a list of 175 or so and a World map image would then instantly update with a filled color. There a...

Are there keyboard shortcuts for RadioButton and Checkbox?

I have a lot of data-entryists using my ASP.NET application and we have all been wondering if there are any keyboard keys or shortcuts that you can press to trigger: Check a RadioButton Uncheck a RadioButton Check a Checkbox Uncheck a Checkbox I know that you can write Javascript and do it yourself, but do any keyboard keys/shortcut...

Stacking :last and :checked jQuery selectors together

I'm trying to setup custom validation for a checkbox. I have 7 checkboxes each with the same name and I want to identify if the last one is checked. This is the code I have and I know its wrong, could anyone shed some light on how to properly stack the :last and :checked selectors together? $.validator.addMethod('ObserverOtherBox',funct...

Are there any Dropdown controls with checkboxes in them?

I've seen some for web using javascript, but I am looking for a Windows Form control that is a ComboBox that when opened displays a list of checkboxes and labels, allowing to select one or more, with a "Select All" option. Would like a non-commercial solution. ...

Why won't .attr('checked','checked') set?

I have the following snippet of code (I'm using jQuery 1.4.2): $.post('/Ads/GetAdStatsRow/', { 'ad_id': id }, function(result) { $('#edit_ads_form tbody').prepend(result); $(result).find('td.select-ad input').attr('checked','checked').click(); }); Assume that the post works correctly and returns a correct pre-built <tr> with s...

AS3 CheckBox Wont Work

Hey all, basically i have an empty AS3 fla file with just the following code: import fl.controls.CheckBox; var cb1 = new CheckBox(); cb1.label = "Beets"; cb1.y = 10; addChild(cb1); But when i run it, i keep getting this error: TypeError: Error #1009: Cannot access a property or method of a null object reference. at fl.controls::...

WPF ListView SelectedItem is null

Hi All I have a Listview that has a checkbox as one of the columns. If I click anywhere but the actual checkbox the SelectedItem of the ListView is set to the current selected row, as expected. If, on the other hand I click onto the checkbox (without clicking on the row first) then the SelectedItem is null or the previously clicked row....

CheckBox checked state in a ListView

I'm using a ListView with CheckBox, but as most of you know, when you roll down the scroll, a checked CheckBox gets unchecked as you roll up back the scroll. So i've been reading and i found out that you can pass (using getView) the id of the CB to the position parameter of getView to save the CheckBox state! But i can't use getView wit...

Prototype function to set onclick event observer in checkboxes

Hi, I want to set an observer for each of the following checkboxes: <div id="listr"> <ul id="lr" style="list-style-type: none"> <p class="tir">Text 1</p> <li class="ro"><input type="checkbox" name="r1" id="r1"/>A1</li> <li class="ro"><input type="checkbox" name="r2" />A2</li> <p class="tir">Text 2</p> <li class="ru...

Getting multiple checkboxes from FormCollection element

Given multiple HTML checkboxes: <input type="checkbox" name="catIDs" value="1" /> <input type="checkbox" name="catIDs" value="2" /> ... <input type="checkbox" name="catIDs" value="100" /> How do I retrive an array of integers from a FormCollection in an action: public ActionResult Edit(FormCollection form) { int [] catIDs = (IEnu...

android: CheckedTextView cannot be checked?

Initially I wanted a checkmark where the text is placed on the left of the checkmark. After searching on this site I found out the best workaround is android:CheckedTextView? However, I found out that the checkmark cannot be changed manually by users. Is it by design? <CheckedTextView xmlns:android="http://schemas.android.com/apk/res/an...

Custom Checkbox style for WPF

I would like to skin a wpf default checkbox to something custom. Since it does not really make sense to start off a entirely new control, i'd like to override the Windows Chrome template binding for the Bulletchrome sub component of the checkbox. However I cannot do this like I can with checkboxes for example. tried using something like...

ASP.NET Gridview Checkbox value to DataTable

Hey all, First off, im using a checkbox to highlight a true or false value from a dataset which I want to be able to change it. Unfortunately databinding the DataTable to the GridView checkboxes doesnt work (as you probably know) as it requires it to be in "edit" mode. The way I've gotten round this is having the checkbox reading the d...

Serialize checkbox array, also get checkboxes with off-value

Hi, I was wondering if this is possible. The serialize-string will be inserted in a mySQL-database, so it would be fine if all checkboxes would be inserted and not only the ones that is ticked(on). it's possible to make on column in the database for each of the checkboxes, and use this if/else-statement: if(isset($_GET['checkbox'])) {...

How can I save an entire list of items true or false?

I'm following Ryan Bates, Railscast episode 52 and I've translated relevant parts of the code to work with Rails 3.0.0.beta2. In Ryan's case, he simply marks items incomplete and saves a timestamp. If an Item contains a timestamp the model returns the item in the completed list. I'm attempting to save ALL values true or false, dependin...

How to replicate this screenshot in WebForms?

I need to replicate the following in ASP.NET WebForms using a GridView. But I am not sure where to start. Basically I need 3 columns. The checkbox (which sometimes needs to be disabled), and 2 standard text columns. I've gone through the tutorial and I can see how to basically dump text data into a GridView, but not clear on how ...

Winforms checkbox Databinding problem

Hello everybody! In a winforms application (VB, VS2008 SP1) i bound a checkbox field to a SQL Server 2005 BIT field. The databinding itself seems to work, there is this litte problem: user creates a new record and checks the checkbox, then the user decides to create a new record (without having saved the previous, so there are 2 new ...

Jquery, checkboxes and isChecked

When I bind a function to a checkbox element like: $("#myCheckbox").click( function() { alert($(this).is(":checked")); }); The checkbox changes it checked attribute before the event is triggered, it's it normal behavior, thus giving and inverse result. However, when I do: $("#myCheckbox").click(); The checkbox changes it check...

How to read dynamical added check box?

Hi, I am adding checkboxes dynamically to silverlight stackpanel object as follows: foreach (String userName in e.Result) { CheckBox ch = new CheckBox(); ch.Name = userName; ch.Content = userName; ContentStackPanel.Children.Add(ch); } How do I read back those controls to detect which of them are checked. ...