Hi Experts,
Q. i have one matrix with three columns "itemgroup", "itemcode" & "itemname". i have bounded itemgroup & itemname with userdatasource and itemcode with dbdatasource which is @WCHLDITMS (usertable). all columns are bounded in screen painter. i hv added userdatasource as below written code.
beforeform load
form.DataSources.UserDataSources.Add("UDSchldgrp",SAPbouiCOM.BoDataType.dt_SHORT_TEXT, 50);
form.DataSources.UserDataSources.Add("UDSchldnm",SAPbouiCOM.BoDataType.dt_SHORT_TEXT, 50);
after choose from list
DBDataSource oDBDataSource =form.DataSources.DBDataSources.Add("@WCHLDITMS");
SAPbouiCOM.UserDataSource oUserDataSourcegrp = form.DataSources.UserDataSources.Item("UDSchldgrp");
SAPbouiCOM.UserDataSource oUserDataSource = form.DataSources.UserDataSources.Item("UDSchldnm");
oDBDataSource.SetValue("ItemCode",0,oDataTable.GetValue("ItemCode", 0)));
oUserDataSourcegrp.Value = oDataTable.GetValue("ItmsGrpCod", 0)); //itemgroup column
oUserDataSource.Value = oDataTable.GetValue("ItemName", 0)); //(itemname column)
now i add the data. it adds successfully, but when i find that item then the data of itemgroup and itemname column got blank.which i have bound with userdatasource in screen painter.
now please tell me the procedure so that i can store itemgroup & itemname column data to see in find mode.
Q2. what is the right place or event where we should use setbound(). because when we bound matrix column with data source, when control goes first time to setbound() method it executed correctly, but when control goes second time it throws exception matrix line exist. so after or before which event we should use setbound() method.
--
Thanks & Regards
Vishwajit Kumar