NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

DataGridColumn.SetColumnValueAtRow

Sets the value in a specified row with the value from a specified DataView.

[Visual Basic]
Overridable Public Sub SetColumnValueAtRow( _
   ByVal source As ListManager, _
   ByVal rowNum As Integer, _
   ByVal value As Object _
)
[C#]
public virtual void SetColumnValueAtRow(
   ListManager source,
   int rowNum,
   object value
);
[C++]
public: virtual void SetColumnValueAtRow(
   ListManager* source,
   int rowNum,
   Object* value
);
[JScript]
public function SetColumnValueAtRow(
   source : ListManager,
   rowNum : int,
   value : Object
);

Parameters

source
A DataView for associated with the DataGridColumn.
rowNum
The number of the row.
value
The value to set.

Exceptions

Exception Type Condition
ArgumentException The DataView component's postion doesn't match rowNum.

Example [Visual Basic]

The following example sets the value at a specified row using the SetColumnValueAtRow method. The code uses the CurrentCell property to return the current row number, needed as an argument for SetColumnValueAtRow.

[Visual Basic]

Private Sub SetColVal()
   Dim ds As datasource
   Set ds = DataGrid1.DataSource
   Dim intRow As Integer
   introw = DataGrid1.CurrentCell.RowNumber
   Dim sValue As String
   ' This is the new value for the column.
   sValue = "new value"
   Dim dgc As DataGridColumn
   Set dgc = DataGrid1.GridColumns(1)
   dgc.SetColumnValueAtRow ds, intRow, s
End Sub

See Also

DataGridColumn Class | DataGridColumn Members | System.WinForms Namespace | GetColumnValueAtRow