TreeViewPersons.FindRow C# (CSharp) Method

FindRow() public method

public FindRow ( int uniqueID ) : int
uniqueID int
return int
    public int FindRow(int uniqueID)
    {
        TreeIter iter;
        int found = -1;
        bool iterOk = store.GetIterFirst(out iter);
        if(iterOk) {
            int count = 0;
            do {
                if(Convert.ToInt32 ((string) treeview.Model.GetValue (iter, 0)) == uniqueID) {
                    found = count;
                }
                count ++;
            } while (store.IterNext (ref iter) && found == -1);
        }
        return found;
    }