I'm using an ObjectListView and I'm having a heck of a time. Admittedly, I don't have a lot of experience doing things in a Model-View structure, and on top of that, the source forge page for the ObjectListView page is down.
I have a boolean column that is set as a check box in the OLV, and I would like it to behave like a radio button. My problem is that I can't capture the click event for the check boxes in the OLV. My underlying model is a File (class), which holds a list of Fields (class) which has 3 properties. One of the properties of the Fields class is this checkbox. So, presumably, the field knows when it's been clicked, but it doesn't know about the File, which should do the checking to see if it has any other fields with this property set.
Can anyone point me in the right direction?
Thank you.
Here's what I came up with:
private void tlvFields_SubItemChecking(object sender, BrightIdeasSoftware.SubItemCheckingEventArgs e)
{
foreach(var field in f.Fields)
{
if(field.PK)
{
field.PK = false;
}
}
tlvFields.SetObjects(_files);
}
It took me awhile to figure out how to mess with the models under the view. Once I figured that out, this was easier.