Hi!
I'm trying to insert a single item in a DataList, but i only get a null point exception (Object reference not set to an instance of an object..) If i "add" the same item first and then "insert" it's working, but not with insert alone...
This is not working:
lvServiceResult.Items.Insert(0, new ListViewDataItem(text + @"..."));
This is working:
lvServiceResult.Items.Add(new ListViewDataItem(text + @"..."));
lvServiceResult.Items.Insert(0, new ListViewDataItem(text + @"..."));
Any ideas?
BR,
Erlend Haukland
I'm trying to insert a single item in a DataList, but i only get a null point exception (Object reference not set to an instance of an object..) If i "add" the same item first and then "insert" it's working, but not with insert alone...
This is not working:
lvServiceResult.Items.Insert(0, new ListViewDataItem(text + @"..."));
This is working:
lvServiceResult.Items.Add(new ListViewDataItem(text + @"..."));
lvServiceResult.Items.Insert(0, new ListViewDataItem(text + @"..."));
Any ideas?
BR,
Erlend Haukland