DataGrid View TextMatrix???
Hi,
Can Anyone Tell me how to Access a particular column of a particular row. Same as there is TextMatrix Property in FlexGrid.
For e.g In FlexGrid I use
Val(grd.TextMatrix(R, 8)) to access the value at Rth row and 8th Column.
Can AnyOne tell me how to achieve the same funtionlity using
datagrid view.I am using using VB 2005 Express Edition.
thanks
Re: DataGrid View TextMatrix???
item property of datagridview
Code:
text=DataGridView1.Item(1,2).Value.ToString
Re: DataGrid View TextMatrix???
u can also do this
Code:
Text = DataGridView1.Rows(1).Cells(2).Value.ToString
Re: DataGrid View TextMatrix???
I have tried bot of your suggestion but I am receiving error as below:
I any thing something that I am doing wrong.PLZ Help....
Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
Re: DataGrid View TextMatrix???
the row at index 1 and column at index 2 do not exist in ur datagridview thats why u get this indexOutofRange exception.
Re: DataGrid View TextMatrix???
Quote:
Originally Posted by aniskhan
u can also do this
Code:
Text = DataGridView1.Rows(1).Cells(2).Value.ToString
Still, I am getting the error.
PLZ Help me
Object reference not set to an instance of an object.
1 Attachment(s)
Re: DataGrid View TextMatrix???
Sample
using Access DB "Attendence"
Student (Table)
--------
rno number
name text
sessno number
Can u show how r u using it in ur code so anybody can help u.