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 );
Exception Type | Condition |
---|---|
ArgumentException | The DataView component's postion doesn't match rowNum. |
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
DataGridColumn Class | DataGridColumn Members | System.WinForms Namespace | GetColumnValueAtRow