Groups | Blog | Home
all groups > asp.net datagrid control > march 2006 >

asp.net datagrid control : datagrid and checkbox inasp.net


Jason
3/29/2006 6:22:26 PM
Hi, all,

I have an asp.net web page, which has a datagrid to present data to users, also
has checkbox in each row in the datagrid. Here is my question: when user checked
a checkbox, or several checkboxes in the datagrid, then they click 'save'
button. the page refreshed, and they want selected checkbox listed on the top of
the datagrid. see below:

before:
Item1 desc-1
Item2 desc-2
Item3 desc-3
Item4 desc-4

after:
X Item1 desc-1
X Item3 desc-3
Item2 desc-2
Item4 desc-4

Eliyahu Goldin
3/30/2006 12:00:00 AM
You do it in the datasource, not in the grid. Order the datasource by
"checked" value and the item.

Eliyahu

[quoted text, click to view]

AddThis Social Bookmark Button