I've created a DataGridView, then binded it to the List as follows:
public struct singleFieldFrame
{
//text and URL frames
private string id;
private string text;
public string id_p { get { return id; } }
public string text_p { get { return text; } set { text = value; } }
public singleFieldFrame(string frameID, string data): this()
{
id = frameID;
text = data.Replace('\0', ';');
}
}
...
public static List<singleFieldFrame> singleFieldFrames;
...
// this struct and singleFieldFrames which is a List of singleFieldFrame reside in the public class
// dataGridView definition is inside another public class (namespace is the same)
var bindingList1 = new BindingList<ID3v2tag.singleFieldFrame>(ID3v2tag.singleFieldFrames);
source1= new BindingSource(bindingList1, null);
dataGridView1.DataSource = source1;
My problem is that I'm unable to change any cells in the dataGridView1. When I leave editing mode,the cell value automatically resets back to previous one.