Hi,
I have the following code which I am using to bind an object to the
Window Forms dataGridView control:
def bind_customes_to_grid(customer)
$gvCustomers.DataSource = customer
end
Now, I need to convert the customer into a collection so it can be
binding to the DataGridview control. How can I do that?
Here is one possible solution:
def bind_customes_to_grid(customer)
list = Array.new
list[0] = customer
$gvCustomers.DataSource = list
end
Here is another version:
def bind_customes_to_grid(customer)
$gvCustomers.DataSource = Array.new.push(customer)
end
Did you take a look at how the example I sent you worked?
~js