BPC-Components

Home > Products > BPC PowerForms - Silverlight > Knowledge Base > Controls > Taking advantage of the ListDataGrid ValueChange event

Taking advantage of the ListDataGrid ValueChange event

The ListDataGrid control is very useful for presenting data coming from other/related lists.

Apart from displaying the results, the control does not provide a value to be used from other controls or formula expressions.

The control however raises the ValueChange event and can be used from python script during run-time.

The ListDataGrid control, has a special method called GetGridItemValue(string) which can be used from script to get the attribute of the selected row in the grid.

In order to use the method, users should apply some code in the ValueChange script of the control.

In order to access the internal methods of the ListDataGrid, users have to use something like the following code :

Code

control.InputControl.GetGridItemValue("Title") 

The parameter provided should be the attribute name (column name) of the bound list query. 

Note : The InputControl property provides access to the methods of the actual control.