Subject Re: [IBO] IndexFieldNames with IP4 Grid
Author Daniel Rail
At 07/03/2002 07:11 PM, you wrote:
>procedure TForm1.wwDBGrid1TitleButtonClick(Sender: TObject;
> AFieldName: String);
>begin
>ib_contact.IndexFieldNames:= AFieldName;
>end;
>
>I am copying a IP4 example that allows you order a column by clicking
>on the title of the Grid. I am using IBO components (version G and
>Ga), but the Grid just stops showing any information when you click
>on it. The Grid is a detail grid in a Master-Detail relationship.
>
>Any suggestions would be helpful.

What is the state of the dataset after the event is fired? Is it closed or
opened?

Add these lines of codes to find out:

>procedure TForm1.wwDBGrid1TitleButtonClick(Sender: TObject;
> AFieldName: String);
>begin
>ib_contact.IndexFieldNames:= AFieldName;

if not ib_contact.Active then
ib_contact.Open; {or simply show a message saying that ib_contact is
closed}

>end;


Daniel Rail
Senior System Engineer
ACCRA Group Inc. (www.accra.ca)
ACCRA Med Software Inc. (www.accramed.ca)