Click here to Skip to main content
16,015,414 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,
I have a datagrid attached to a dataset and an additional column with a checkbox for slecting the rows. when sorting the grid, the additional column is not sorted but cleared. Is it possible to set a property for this column to be attached to the other data ?

What I have tried:

manual sync the "marking column" via a dictionary.
Posted
Comments
0x01AA 20hrs ago    
You can add the column e.g. to the dataset. In the SQL, you write then something like:
SELECT ColA, ColB, CAST(NULL AS INTEGER) AS SELECTED FROM Tbl
KANNE1466 17hrs ago    
well, I already tried this but the new column was shown as field (instead of checkbox).
I changed it to "CAST(0 as BIT) AS SELECTED" and the column is now shown as checkbox.
Thank a lot !

1 solution

added "
CAST(0 as BIT) AS SELECTED
to the SQL-Statement
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900