0

I have table called Account like this,

ID   Code   X-Ref
1    1.1    NULL
2    1.2    NULL
3    1.3    NULL
...

I have binded Code values to dropdownlist, when i select code value in dropdown the gridview will display rest of the code values(i.e.,Except the one which i have selected in dropdownlist).

I have a checkbox in gridview when i select some of the row and click ok it will update the table with respect to code ID like as shown below,

ID   Code   X-Ref
1    1.1    1.2,1.3
2    1.2    1.1,1.3,1.4
3    1.3    1.2,1.4
...

Now the question is how to populate from database with checkbox enabled in gridview.. example.., if i select 1.1 in drop down list the checkboxes of both row 1.2 and 1.3 should be checked in gridview. How to do that please help..

Praveen kumar
  • 11
  • 1
  • 5

1 Answers1

0

Here's a quick simple example, modify to your needs...

Option Strict On
Option Explicit On
Option Infer Off
Public Class Form1
    Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
        Dim list As String = "1, 2, 3, 4, 5"
        list = list.Replace(" "c, String.Empty)
        Dim items As List(Of String) = list.Split({","c}, StringSplitOptions.RemoveEmptyEntries).ToList
        For Each i As String In items
            ComboBox1.Items.Add(i)
        Next
    End Sub
End Class
Paul Ishak
  • 1,093
  • 14
  • 19