DropGrid: Fixes related to latest GridCtrl changes

git-svn-id: svn://ultimatepp.org/upp/trunk@2729 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
unodgs 2010-09-29 21:37:23 +00:00
parent 233a79bb72
commit a45f0e4088
2 changed files with 11 additions and 3 deletions

View file

@ -114,6 +114,8 @@ void DropGrid::Drop()
{
if(!IsEditable())
return;
WhenDrop();
GridDisplay &dsp = list.GetDisplay();
if(!header)
@ -478,8 +480,13 @@ int DropGrid::GetCount() const
Value DropGrid::GetData() const
{
return valuekey ? value
: rowid >= 0 ? list.Get(key_col) : notnull ? NotNullError() : Null;
return valuekey
? value
: rowid >= 0
? list.Get(key_col)
: notnull
? NotNullError()
: Null;
}
Value DropGrid::GetValue() const
@ -998,7 +1005,7 @@ Value DropGrid::MakeValue(int r, bool columns) const
Value DropGrid::Format0(const Value& q, int rowid) const
{
int r = rowid >= 0 ? list.FindRow(rowid) : list.Find(q, key_col);
int r = rowid >= 0 ? list.FindRow(rowid + list.GetFixedCount()) : list.Find(q, key_col);
if(r < 0)
return Null;