We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

DataGrid Cell navigaton error

Dim i as int32 Dim j as int32 For i=0 to rows For j=0 to cols DataGrid(i)(j).someproperty="something" Next Next This doesn't work in VB.NET. I'm getting an error saying: "Can't convert integer into System.Windows.Forms.DataGridCell" Anyone help?? I'm trying to go through each cell of the grid. Thank you.

5 Replies

CB Clay Burch Syncfusion Team July 2, 2002 12:32 PM UTC

Try DataGrid(i,j).someproperty = "something" provided 'someproperty' takes a string...


PE Peter July 3, 2002 09:18 AM UTC

Hi Clay, thank you. It works, meaning I'm not getting this error any more. But now the only property I can reach is DataGrid(1,1).GetType Please help. I'm trying to reach Text property. Is there any sample I can look at. Thank you SO very much.


CB Clay Burch Syncfusion Team July 3, 2002 05:29 PM UTC

If the cell value is a string, you can get it just by dim cellValue as String = datagrid1(i,j)


AD Administrator Syncfusion Team July 4, 2002 04:56 AM UTC

> If the cell value is a string, you can get it just by > > dim cellValue as String = datagrid1(i,j) Hi peter. if the datagrid cellvalue accepts string then Just say(type) DataGrid(i,j) = "Vipul" Hope this helps


VB Vipul Bhatt July 4, 2002 04:56 AM UTC

> If the cell value is a string, you can get it just by > > dim cellValue as String = datagrid1(i,j) Hi peter. if the datagrid cellvalue accepts string then Just say(type) DataGrid(i,j) = "Vipul" Hope this helps

Loader.
Live Chat Icon For mobile
Up arrow icon