2
Reply

Data Grid and List<>

james

james

Nov 14, 2006
3.9k
0

    Say for example your arr adding a text from textbox to Listbox that can be displayed from listbox to datagrid. private void Button1_Click(object sender, System.EventArgs e) { ListBox1.Items.Add(TextBox1.Text); ArrayList arr = new ArrayList(); foreach(ListItem item in ListBox1.Items) { arr.Add(item.ToString()); } if(ListBox1.Items.Count>0) { DataGrid1.DataSource = arr; DataGrid1.DataBind(); } }

    manikanta
    November 22, 2006
    0

    Can anybody help me, hoow to bind data from list to a data grid? thanks

    james
    November 14, 2006
    0