How to hide or show grid rows ?

In form i hav a grid with employee details.I updates the employee details ,After update i want hide completed employee rows only by clicking checkbox . Is this possible in axapta X++ ? can any one help me.

Thanks in advance,

syed

go to your design and set AutoDeclaration to Yes to the selected Grid
Then

go to your form and add a new method:

void hideGridRows()
{
TableName tableName; //your table
;
tableName= TableName::find(TableName.Id);

Grid.visible(!tableName.CheckBox); //your checkbox
}

Then

override active method in the form datasource and call the method above------> element.hideGridRows();

OR

call the method above from datasource–>field–>modified

Hi Noob Noobish.

Thanks for reply.

Its hides whole grid view.but i need only selected rows only.

You can do a new field group in your table with your required fields shown in grid, then add the group to the grid in design and the AutoDeclaration to Yes.

Same as above

void hideGridRows()
{
TableName tableName; //your table
;
tableName= TableName::find(TableName.Id);

FieldGroup.visible(!tableName.CheckBox); //your checkbox
}

this is my idea, and it works, but if anyone else got the best solution please let us know [;)]

Hi,

You can do this by writing executeQuery() method…

Hope this will help you

Regards

kranthi

Hi,

You can do this by writing executeQuery() method…

Hope this will help you

Regards

kranthi

Hi karanthi,

Same.it hide whole grid .but i need selected rows only.

Thanks,

syed.

The executeQuery() method will not hide total grid…

refer InventQuarantineOrder form for refernce

in which the only the ended Quarantine orders will be displayed when the view ended check box is selected…

Hope this will help you

Regards

Kranthi