cancel
Showing results for 
Search instead for 
Did you mean: 

Double Click Event

former_member218051
Active Contributor
0 Kudos

Hello Experts,

I've a  matrix in a user defined form. on clicking OK button i'm able to copy the matrix contents into the sales order form of SAP B1.

But, i want to copy the contents of a single row clicked by the user.

Please help me doing this.

Thanking You

Malhaar

Accepted Solutions (1)

Accepted Solutions (1)

ANKIT_CHAUHAN
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Pradnya,

What problem you are facing in this ?

Try this :

for (int j = 1; j <= oMatrix.VisualRowCount; j++)

                {

                    if (oMatrix.IsRowSelected(j) == true)

                    {

                         //Put your logic here...

                    }

Hope it helps..

Thanks

former_member218051
Active Contributor
0 Kudos

Hello Ankit,

On clicking or double clicking row of the matrix is not getting selected.

so I'm not able to use isselectedrow property of the matrix.

Thanks

ANKIT_CHAUHAN
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Pradnya,

I think you will have to set the SelectionMode Property of the matrix to Single or Automatic.

This will allow you to select the matrix row.

Hope it helps

Thanks & Regards

Ankit Chauhan

former_member218051
Active Contributor
0 Kudos

Hello Ankit,

I set the property to

            oMatrix1.SelectionMode = ms_Single

and i am using pval.row to identify the currently selected row but it is giving me False.

            If oMatrix1.IsRowSelected(pVal.row) = True Then

What is wrong in this ?

Thanks

ANKIT_CHAUHAN
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Pradnya,

If you have set the oMatrix1.SelectionMode = ms_Single

Then try this :

for (int j = 1; j <= oMatrix.VisualRowCount; j++)

                {

                    if (oMatrix.IsRowSelected(j) == true)

                    {

                         //Put your logic here...

                    }

Hope this should give you the desired result.

Thanks


former_member218051
Active Contributor
0 Kudos

Hello Ankit,

Thank you very much for your help.

I tried this and it worked. also I'm able to copy the selected row's contents to sale order screen.

But this matrix is placed in a user defined form and it stays on the screen.

After updating the sale order screen, i tried to hide and close this form but system is giving invalid form sometimes or form already exists message.

Thanks

ANKIT_CHAUHAN
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Pradnya,

For closing the form , you can use oForm.Close()

But you cannot reference the form, if it is already closed.

If your problem is solved, please close the thread.

Hope it helps..

Thanks

pvsbprasad
Active Contributor
0 Kudos

Hi,

Try this,

For Closing the form

  objForm.Items.Item("2").Click(SAPbouiCOM.BoCellClickType.ct_Regular)

Reagrds,

Prasad

Answers (2)

Answers (2)

pvsbprasad
Active Contributor
0 Kudos

Hi,

Try this,

Matrix Row Selectionmode=single

And When you double Click on the row open the form.

Regards,

Prasad

Former Member
0 Kudos

Hi ,

Yes you have to check if a row is selected , then only copy it to Sales order form. Moreover if you want to allow user to select only one row at a time then make MultiSelection property of Matrix = false.

Hope it helps.

Regards