wyrd Posted February 3, 2003 Posted February 3, 2003 In a DataView you can easily set a column as read only, but I was wondering if there was a way in the DataGrid to set a columns enabled to false. Read only still allows them to edit it, and just changes the value back after they click outside the column. I'm looking for a way so they can't edit what's in side at all (no changing!) or even click inside the column. Better yet, is there a way to filter columns displayed with the DataView? I know there's RowFilter, but nothing that seems to cover column filtering. Quote Gamer extraordinaire. Programmer wannabe.
*Experts* Nerseus Posted February 3, 2003 *Experts* Posted February 3, 2003 If you mean to hide columns (your second question), you have to define a new DataGridTableStyle. Check the help for more info. I believe you can also make columns non-editable this way but I'm not sure if there's an easier way. -nerseus Quote "I want to stand as close to the edge as I can without going over. Out on the edge you see all the kinds of things you can't see from the center." - Kurt Vonnegut
wyrd Posted February 4, 2003 Author Posted February 4, 2003 Aha! So that's where it was hiding. Interesting. :cool: And very nice. :) Thanks. In the future .NET should add column support to the DataView class so I can easily filter them out using that instead. They designed it to filter rows, why not columns too? And just because you can do it with a DataGrid is not the point! :rolleyes: *ponder* Come to think of it, when I become an all mighty guru maybe I'll extend the DataView class so you can do just that. ;) Quote Gamer extraordinaire. Programmer wannabe.
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.