Hi. I have a grid. Which allows me to add to the same data from new row. But when I want to send them to store does not allow me to go through the whole datagrid to extract one by one the data. The truth is I do not know how to read the rows inside the datagrid.
my code is.
<syncfusion:SfDataGrid
Name="Grid_ordenes_compra"
Grid.Row="1"
Grid.Column="0"
AutoGenerateColumns="False"
GroupDropAreaText="Separe por numero Orden de Compra"
ItemsSource="{Binding}"
ShowGroupDropArea="True">
<syncfusion:SfDataGrid.Columns>
<syncfusion:GridTextColumn
HeaderText="id"
IsHidden="True"
MappingName="id_order" />
<syncfusion:GridTextColumn
Width="100"
AllowGrouping="True"
HeaderText="OC"
MappingName="Orden_compra_numero" />
<syncfusion:GridTextColumn
Width="150"
HeaderText="Tipo"
MappingName="tipo_orden_compra" />
<syncfusion:GridTextColumn
Width="150"
HeaderText="Equipo"
MappingName="modelo" />
<syncfusion:GridTextColumn
Width="200"
HeaderText="Cliente"
MappingName="cliente" />
<syncfusion:GridTextColumn
Width="200"
HeaderText="Fecha"
MappingName="fecha" />
<syncfusion:GridTextColumn
Width="200"
HeaderText="Nº Serie"
MappingName="nserie" />
<syncfusion:GridTextColumn
Width="200"
HeaderText="A.W.H"
MappingName="AWH" />
<syncfusion:GridTextColumn
Width="200"
HeaderText="In House"
MappingName="INH" />
</syncfusion:SfDataGrid.Columns>
</syncfusion:SfDataGrid>
and i need save using this code
If tblconfig.Rows.Count > -1 Then
For Each row As Data.DataRow In tblconfig.Rows
mara = id_nuevo_configuracion()
cnn.con.Open()
code = CStr(row("codigo"))
count = CStr(row("cantidad"))
des = CStr(row("descripcion"))
sql = "insert into OC_Configuracion(id, codigo, descripcion, cantidad, id_order) values ('" & mara & "', '" & code & "', '" & des & "', '" & count & "', '" & order & "' )"
Dim cmd As New SqlCommand(sql, cnn.con)
Dim rest As Integer
rest = cmd.ExecuteNonQuery
If rest > 0 Then
counter = counter + 1
rest = 0
End If
cnn.con.Close()
Next
tblconfig.Clear()
but tblconfig is my datatable. But I can not go from the datagrid called configuracionnes to the datatable called tblconfig. every code is in vb.net