i have a datagridview , i need to change the col(6) to combobox and filling it with data , how i can do this ??
my DGV not bounded with data , its read from sqltable

can anyone give the idea of how to start , i use this code but in run time it gives me an erorr Unable to cast object of type 'System.Windows.Forms.DataGridViewTextBoxCell' to type 'System.Windows.Forms.DataGridViewComboBoxCell'.


  Dim Units() As String = {"M", "M2", "three", "four", "five"}
        DirectCast(BOQDetailEntryDGV(6, 0), DataGridViewComboBoxCell).Items.AddRange(Units)

hello , anybody can help me by any idea ???

thanx

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.