Hi,
How do I modify the code below to only display the first 5 records in a table and also from the to the 12th record. i need to display records in a combobox depending on which categories chosen.
Private Sub Button8_Click(sender As System.Object, e As System.EventArgs) Handles Button8.Click
Dim xmlPath1 As String
Dim dtsetcol1 As New DataSet
xmlPath1 = System.IO.Path.Combine(Application.StartupPath + "\MainTest.xml") 'grid1
dtsetcol1.Clear()
dtsetcol1.ReadXml(xmlPath1)
Me.ComboBox3.DataSource = dtsetcol1.Tables(0).Columns(0).ColumnName
End Sub
Thanks,
Victor
To part of your question, "How do I modify the code below to only display the first 5 records ", The way you are loading the records does not allow for filtering the rows during the load. You can try removing the rows from the XML before loading or you can try removing/deleting the rows after the rows have been added.
To this part of the question, "also from the to the 12th record. i need to display records in a combobox depending on which categories chosen", do you mean "from the X to the 12th record." where X is a number from 0 to 11 and is determine at run time or something else?