Hi,
Try to set ActiveView to newly added GridView, or set ActiveViewIndex to 0.
Please tell me if it works.
That works now, the columns and rows are added. Maybe add this to the User guide that comes with the component or to the developer page? I looked before I asked and couldn't it documented anywhere.
Now what happens is once the data is in the grid if I click on any of the cells in the grid I get an exception.
---------------------------
Debugger Exception Notification
---------------------------
Project Text.exe raised exception class EOleException with message 'Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another'. Process stopped. Use Step or Run to continue.
---------------------------
OK Help
---------------------------
This occurs in ADODB:3936
procedure TCustomADODataSet.InternalGotoBookmark(Bookmark: Pointer);
begin
Recordset.Bookmark := POleVariant(Bookmark)^;
end;
Once I click OK to close the error dialog the grid fields are broken.
http://i.imgur.com/CyYaiMi.png
I tried setting the following for grid...
NextDBGrid61.Editing := false;
for i := 0 to NextDBGrid61.ColCount -1 do
ShowMessage(BoolToStr(NextDBGrid61.Columns[i].Editing));
end;
They're all set to Editing false. That doesn't seem to do anything though. If I set them as
NextDBGrid61.Columns[i].Enabled := false;
or
NextDBGrid61.Columns[i].Selectable := false;
there's no exception, but then they can't be selected.
Also, when double clicking a spinColumn it allows the spinbox to be inc/decremented even though...
NextDBGrid61.Columns[i].Selectable = false
NextDBGrid61.Columns[i].Editing = false
NextDBGrid61.Editing = false
NextDBGrid61.SecondClickEditing = false
I'm thinking this grid may not be ready to use with D6. Do you know if it functions better in D7, I can move our main project to that, possibly.