C# Corner
Tech
News
Videos
Forums
Trainings
Books
Events
More
Interviews
Jobs
Live
Learn
Career
Members
Blogs
Challenges
Certifications
Bounties
Contribute
Article
Blog
Video
Ebook
Interview Question
Collapse
Feed
Dashboard
Wallet
Learn
Achievements
Network
Refer
Rewards
SharpGPT
Premium
Contribute
Article
Blog
Video
Ebook
Interview Question
Register
Login
.NET
ADO.NET
Android
ASP.NET
C#
Databases & DBA
Design Patterns & Practices
Java
Learn iOS Programming
OOP/OOD
SharePoint
Software Testing
Web Development
WPF
View All
2
Reply
Data Grid and List<>
james
19y
4.3k
0
Reply
Delete Row
Delete Column
Insert Link
×
Insert
Cancel
Embed YouTube Video
×
Width (%)
Height (%)
Insert
Cancel
Table Options
×
Rows
Columns
First row as header
Create Table
Insert Image
×
Selected file:
Alignment
Left
Center
Right
Select an image from your device to upload
Upload to Server
Cancel
Submit
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
19y
0
Can anybody help me, hoow to bind data from list
to a data grid? thanks
james
19y
0
Message