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(); } }
Can anybody help me, hoow to bind data from list to a data grid? thanks