how can a visibility of a particular column can set to false in a listview..that is the column should exists in the client site but in hidden form... what is the option other than setting the width to 0. im working in c#.net VS2008
i think i have said that i want the other option...
zoya
2010-03-04 08:41:05
Why you want to avoid this option?
Kangkan
2010-03-04 08:52:06
because...at run time anyone can drag the control and enlarge it...and set its width>0; i have done it but not a good option..
zoya
2010-03-08 05:06:14
A:
Use ObjectListView. This was specifically designed with the idea of getting away from hidden columns to hold data.
With an ObjectListView, each row knows which model object was used to construct it. So, if you want to find the FilePath for the object that the user has selected you say:
MyDataModel model = this.objectListView.SelectedModel as MyDataModel;
if (model != null) {
DoSomething(model.FilePath);
}
Also, you might want to look at this other question which talks about the same problem from a higher point of view.
ObjectListView also adds lots of nice UI candy, which always impresses the users :)
BTW: ObjectListView is Windows Forms only.
Grammarian
2010-03-04 22:23:34
i just want to hide an existing column not to work with the idea of making that column not to hold a data....i want that it should hold a data because i have to use that data...for backend purpose..is there any way to do that for which users cannot see that information..
zoya
2010-03-08 05:21:53