ASP.NET Checkboxes/RadioLists Arrow Keys - asp.net

I have an ASP.NET web application for data entry, and we have big lists of radiobuttons, and long lists of checkboxes, in some sections.
The client wants to be able to be able to navigate and manipulate these controls with their keyboard, like the tab/space/enter/right-left-up-down-arrow-keys. Are there any ASP.NET controls that I can use?

You could use the TabIndex property and AccessKey properties of controls. The TabIndex will allow for in order navigation of controls using the Tab key. The AccessKey property can be used to set a specific keyboard letter to access the input field.
Using Jquery, you could use the .keypress() event to detect if the up/down key was press (See this for some hints). Then when used in conjunction with the TabIndex property, you could set focus to the next/previous input field.

This could be accomplished but it requires a bit of coding. You may have to add a keyup event to the body and handle the keys. I did the same for Jquery UI Tabs (right and left keys). You can use the concept to accomplish your stuff.
http://ctrlshiftb.wordpress.com/2010/02/03/how-to-add-keyboard-navigation-for-jquery-ui-tabs/
Hope this helps.
Thanks,
Raja

I may have misunderstood the question but if you set focus e.g.
RadioButtonList1.Focus();
keyboard shortcuts e.g. arrow-keys/space etc are available as standard behavior?
If you want more complex functionality you could add javascript attributes to you controls. This link is useful link text

Related

Is it possible to have dropdownmenu in place of dropdownlist in asp.net? whenever user moves mouse over that control it should display items in it

i have dropdownlists in my asp.net web site, now i want to switch them into something like menu and its items should look like menu items, at mouseover event items in that control should be displayed, is it possible to achieve? how?
It is very well possible using javascript/jquery and setting the css to give it the placing and affects you feel like. You will many such examples googling it out....one such is: http://www.queness.com/post/1047/easy-to-style-jquery-drop-down-menu-tutorial
If you like to convert an existin dropDownList to a menou like I know the the Linkselect jQuery plug-in but also I know a similar from Yahoo User Interface Library
jQuery or other library is strongly suggested for a complex conversion like that, at least the examples I know use a library.

Do we have functionality in Text Edit control to list cookie values?

I have a Devexpress textEdit control in windows application. Do we have option to list the cokkie values while typing the text in the texteditor
TextEdit does not support the auto complete functionality you are asking about. A possible solution is to use the ComboBoxEdit or LookupEdit controls. Both of them can hold a list of items shown in the dropdown window. Finally, you should write a code which will the editors with values stored in cookies.

asp.net datagrid

I want a asp.net datagrid with client side selection and dockable in pages and custom rightclick support.
cau anyone help me?
You will need to add javascript in case to make the table interactive with user actions
i prefer to use jQuery plugins to able you to do that. just create css classes and assign them in the datagrid columns then use jQuery to add the right click support and dockable rows.
If you have the budget Telerik RadGrid can do what you want and more. (You will also need RadDock for docking - they all are part of RadControls.)

Adding ASP.NET control to page using jQuery

I'm writing an ASP.NET app in which a table of objects is created by the user client-side.
I envisage them clicking "Add item" and a new 'row' is created in the table with textboxes for them to enter their stuff.
I can do this fine by adding HTML with jQuery. The problem is that one of the fields in the row for the user to fill in needs to be a colour picker.
I have an ASP.NET web user control for my colour picker. How do I add an instance of it to the page within my html row? Or am I barking up the wrong tree here - is there a better way of encapsulating the functionality of my colour picker so that it can be put on every row?
No, you can't add a server-side asp.net control to a page that has already been rendered using client-side techniques (aka Javascript)
Two options:
Firstly, switch to using a client-side colour picker. You can then have the data from this included in the post-back by dynamically adding hidden fields to your form.
Secondly, have a single editing panel which includes your colour picker. Users then select a row to edit, which updates the edit panel with current values etc. Values are stored in hidden fields created when you dynamicaly add rows to your table, and included in the post-back
Without seeing your UI, I can't comment as to which would be best. The asp.net control might look nicer, but it might be difficult to work into your design. A pure client-side solution might fit your designer better, but might not look so good. You also need to consider what happens if / when a users adds lots of rows (this might be 10, 50 or 100 depending on your app /code). Lots of dynamically added controls (the first solution) might cripple the performance of the page.
I'm not sure what version of ASP.NET you're using, one approach that would work is to turn your usercontrol into a custom control. You'd then need to implement ICallbackEventHandler (the first way to do Ajax on asp.net); for sure it's a bit more work but it does give you a good level of control.
Alternatively, you could try this
You can't add ASP.NET controls with jQuery (at least not easily). You could, however, perform a postback when you need to add the colour picker to the row.
In the code in front declaratively define a template of what the new row should look like, then hide it using css.
When the user clicks the 'Add new button' select and cloen the contents of your hidden template and write that into your target div. Just make sure to remove the hiding css when you do this.
You will, of course, just be copying the rednered html of your server controls, but htis apporach may give you a quick and easy way of doing what you need

ASP.Net Custom Button List Compound control for touch screen interface

I am developing an ASP.Net web app that needs to run in a Kiosk/Touch screen environment.
The existing ASP.Net web controls are not too touch-screen friendly as they seem better suited for a mouse/touchpad.
The hot potato dropped in my lap when the powers-that-be decided we need some sort of composite control similar to the ASP.Net Radio Button List, but instead of radio buttons I want the items to be displayed as large rubber buttons. The selected item's button needs to be indented for example or depict this graphically somehow.
I still need to have access to a selecteditem/ selectedvalue type property to determine what was selected...
What would be the best approach in achieving this? Creating a custom server control that overrides the radiobutton control or using a .Net control 'skin' file somehow that allows me to graphically alter a standard radio button list via CSS?
Your input is appreciated.
You can do this with the existing control- see here for an example. See if that does what you require before considering extending an existing control or writing a custom one.

Resources