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

Need advice on tech approach: editable list with boolean choices

1 Answer 18 Views
ListView
This is a migrated thread and some comments may be shown as answers.
Tomica
Top achievements
Rank 2
Tomica asked on 26 Oct 2012, 01:33 AM
I am new to ListView and looking for some initial guidance on technical approach for the following:

I hav a list of items displayed from a SQL datasource. The user has only one editing need, namely select yes or no via checkox.

I would like to present this list so that all list items are editable (the checkbox) without any action on the part of the user. I understand I need to build a list of "editindexes" after the dataset is filled. (I have an example picked up here, but it is in C and I only understand VB)

If I get those checkboxes to be editable, what is my next step in being able to respond to the user's selections?

Since the controls are databound, I am thinking that there would be an event on each checkbox selection that might be appropriate, or that all the boxes would be processed if I added a Save button and did something to commit the changes back to the database.

As you can see, this is my first venture into editable datasets and databinding, and just need to pointers on where & how to proceed.

1 Answer, 1 is accepted

Sort by
0
Eyup
Telerik team
answered on 30 Oct 2012, 03:13 PM
Hi Thomas,

You could use the approach demonstrated in the following topic to put all of your items in Edit mode:
( Section Put items in Edit mode )
http://www.telerik.com/help/aspnet-ajax/listview-switch-insert-update-regular-modes.html

Generally, it is up to you whether you will update the items one by one or all of them at once using a button click. Please check out the demo below for editing ListView items binded to a SQL datasource:
http://demos.telerik.com/aspnet-ajax/listview/examples/dataediting/net2automaticdataediting/defaultcs.aspx

I hope this will prove helpful.

Kind regards,
Eyup
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
ListView
Asked by
Tomica
Top achievements
Rank 2
Answers by
Eyup
Telerik team
Share this question
or