cancel
Showing results for 
Search instead for 
Did you mean: 

Check box column in matrix

Former Member
0 Kudos
1,215

Dear All,

I created a matrix with check box columns through XML. I want to check the check box column through vb.net coding.

I used the following coding:

objMatrix.Columns.Item("5").Cells.Item( 1).Specific.checked = True

and

objMatrix.Columns.Item("5").check(1, True)

My xml code for check box column

<column uid="5" type="121" title="Confirm" description="" visible="1" AffectsFormMode="1" width="67" disp_desc="0" editable="1" right_just="0" val_on="Y" val_off="N" backcolor="-1" forecolor="-1" text_style="0" font_size="-1">
			<databind databound="1" table="@SS_RCATR" alias="U_inprc"/>
			<ExtendedObject/>
	</column>

If run the above vb..net coding i am getting error messages

System.MissingMemberException: Public member 'Checked' on type 'IEditText' not found

and

System.MissingMemberException: Public member 'Check' on type 'ColumnClass' not found

respectively.

Can anyone help me to solve this problem?

Regards,

Tamizh.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

CheckBox oChk = (CheckBox)mtx_0.Columns.Item("col_1").Cells.Item(1).Specific;
oChk.Checked = true;

Edited by: Danilo Kasparian on Sep 4, 2009 4:54 PM

Former Member
0 Kudos

Dear Danilo Kasparian,

Thanks for your reply.

Type casting is not possible in vb.net in the way, you gave it in the C# coding.

Regards,

Tamizh.

Former Member
0 Kudos

HI Tamizharasi Sub...

Dim objMatrixColumn As SAPbouiCOM.CheckBoxColumn

objMatrixColumn = objMatrix.Columns.Item("1").Cells.Item(pVal.Row).Specific

If objMatrixColumn.IsChecked(pVal.Row) = True Then

End If

Former Member
0 Kudos

Hi

You can do the following also.......

Dim oChk as SApbouicom.checkbox

ochk=omatrix.Cloumns.Item("1").cells.item(pval.row).specific

ochk.checked=true

hope it helps

Former Member
0 Kudos

Hi Pari Minhas,

Thanks for your reply.

I tried your codin. I got this error message.

system.invalidcastexception: unable to cast COM object for type 'System._ComObject' to interfact type 'SAPbouiCOM.CheckBoxColumn ' 

Regards,

Tamizh.

Former Member
0 Kudos

Hi Micheal Wills,

I tried your coding. I got this error messeage


 system.invalidcastexception: unable to cast COM object for type 'System._ComObject' to interfact type 'SAPbouiCOM.CheckBoxColumn

Regards,

Tamizh.

Former Member
0 Kudos

Hi

Can you please make sure the type of this column.......is it checkbox or not?/

Thanks

Former Member
0 Kudos

Hi Pari,

I gave the xml coding in my question.