cancel
Showing results for 
Search instead for 
Did you mean: 

UserDataSource within a matrix

Former Member
0 Kudos

Hello everyone.

I'm using the following code to set a value within a matrix columns specific row:

oMatrix.SetLineData(RowNum);
oForm.DataSources.UserDataSources.Item("CheckBox").ValueEx = "Y";

the problem is that whenever that happens, and that new value is being set, all the rest of the columns (which are set to diffrent userdatasources) in that chosen row are being deleted. is there any way to prevent that happening?

Thanks & Regards

Moshe

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hello Moshe,

Based on your case: rest of the columns (which are set to different user datasources) will be no way to stay since they are not by the same data source. You may need to try to use only one data source.

Thanks,

Gordon

Former Member
0 Kudos

Hello Gordon, Thanks for the quick replay.

What i'm usually doing (might be a mistake) is setting each column within the matrix to a diffrent UserDataSource.

Was i suppose to assign all of them to the same UserDataSource? Will the Data be kept in that way for each column? If do, how do i suppose to access a specific column in order to set a value within a specific row?

Thank you,

Moshe

former_member201110
Active Contributor
0 Kudos

Hi Moshe,

For UserDataSources, you should create a datasource for each column in your matrix and bind each column to a separate datasource (reading your posts, I believe this is what you have already done).

When setting a value to a datasource, you need to call the GetLineData method of the matrix, set the value to the datasource you want to change and then call SetLineData to save the value in the row selected. You don't have to change any other values.


oMatrix.GetLineData(RowNum);
oForm.DataSources.UserDataSources.Item("CheckBox").ValueEx = "Y";
oMatrix.SetLineData(RowNum);

Kind Regards,

Owen

Former Member
0 Kudos

Thank you very much, problem solved.

Answers (0)