Thanks Trent. ( and please see other question re datetime searchfields being checked by default )
This column does not currently exist, so I see where I need to add it. I am not pulling any data initailly but letting the bd handle it. i had thought of creating a fill method on the BO
Select *, space(24) as mykey from Symbology where 1 = 2
and call it in parentformloading just to get the structure. I did try it at one point but I may have had something else screwed up.
Listview is working fine. and I see mykey there.
Currently, since I don't have the column, I'm doing this which isn't working out so well as it does not seem to be refreshing the controls on the form.
I would much prefer seek, so I will try again to add the column to the BO. I guess my confusion is that the BD is creating the SQL select, so I'm not seeing how to use an SP or other fill method to change the structure of datatable of the BO. I have done it directly, but I am not veyr good an manipulating the BD.
private void lvSymbology_SelectedIndexChanged(object sender, EventArgs e)
{
ListView lv = (ListView)sender;
if (!(lv.FocusedItem == null) && lv.Items.Count > 0)
{
string _mykey = lv.FocusedItem.SubItems[13].Text.Trim();
string _name = lv.FocusedItem.SubItems[2].Text;
//boiSource100Symbology1.CurrentView.Sort = "mykey";
//boiSource100Symbology1.CurrentView.Find(_mykey);
foreach (boiSource100Symbology bo in boiSource100Symbology1.GetEnumerable())
{
if (bo.mykey == _mykey)
{
string myname = bo.Name;
int idx = boiSource100Symbology1.CurrentRowIndex;
this.Refresh();
return;
}
}
}