Search
Search titles only
By:
Search titles only
By:
Log in
Register
Search
Search titles only
By:
Search titles only
By:
Menu
Install the app
Install
Forums
New posts
All threads
Latest threads
New posts
Trending threads
Trending
Search forums
What's new
New posts
New ads
New profile posts
Latest activity
Free Ads
Latest reviews
Search ads
Members
Current visitors
New profile posts
Search profile posts
Contact us
Latest ads
Pure VPN - Up to 27 Months
vgp
Updated:
Today at 8:10 AM
එක පැකේජ් එකයි මාසෙටම Unlimited Internet. තාමත් DATA CARD දාන්න සල්ලි වියදම් කරනවද? අඩුම මිලට අපෙන්.
sayuru bandara
Updated:
Tuesday at 12:30 PM
Ad icon
ඉන්ටර්නෙට් එකෙන් හරියටම සල්ලි හොයන්න සහ Success වෙන්න කැමතිද? 🚀 (E-Money & Success Stories)
siri sumana
Updated:
Saturday at 11:44 PM
Gemini AI PRO 18 months Offer
Hawaka
Updated:
May 27, 2026
Ad icon
koko account
DasunEranga
Updated:
May 27, 2026
Electronics
Vehicles
Property
Search
Reply to thread
Forums
General
ElaKiri Talk!
C#
Get the App
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Message
<blockquote data-quote="BoraluGoda" data-source="post: 16699665" data-attributes="member: 332053"><p><strong><span style="font-size: 15px">can anyone tell me how use bubble sorting algorithm to sort data dataGridView.</span></strong></p><p></p><p>below shown my code which i use to add data to grid.<img src="/styles/default/xenforo/smilies/default/happy.gif" class="smilie" loading="lazy" alt=":)" title="Happy :)" data-shortname=":)" /></p><p></p><p>[CODE]List<STUDENT> student_list = new List<STUDENT>(); </p><p> private void btnAddToGroup_Click(object sender, EventArgs e)</p><p> {</p><p> if (dataGridView1.SelectedRows.Count > 4 || dataGridView1.SelectedRows.Count < 2)</p><p> {</p><p> MessageBox.Show( "The Selected row count should be < 4 or > 2,\n Please try again");</p><p> }</p><p> else</p><p> {</p><p> //gridDesignGroup();</p><p> for (int i = 0; i < dataGridView1.SelectedRows.Count; i++)</p><p> {</p><p> STUDENT stuObj = new STUDENT();</p><p> stuObj.groupID = txtGID.Text;</p><p> stuObj.stuId = dataGridView1.SelectedRows[i].Cells[0].Value.ToString();</p><p> stuObj.stuFirstName = dataGridView1.SelectedRows[i].Cells[1].Value.ToString();</p><p> stuObj.stuLastName = dataGridView1.SelectedRows[i].Cells[2].Value.ToString();</p><p> stuObj.stuEmail = dataGridView1.SelectedRows[i].Cells[3].Value.ToString();</p><p> student_list.Add(stuObj);</p><p> BindingSource bind = new BindingSource();</p><p> bind.DataSource = student_list;</p><p> dataGridView2.DataSource = bind;</p><p></p><p> }</p><p></p><p> foreach (DataGridViewRow r in dataGridView1.SelectedRows)</p><p> {</p><p> dataGridView1.Rows.Remove(r);</p><p> }</p><p> </p><p> }</p><p> }[/CODE]</p></blockquote><p></p>
[QUOTE="BoraluGoda, post: 16699665, member: 332053"] [B][SIZE="4"]can anyone tell me how use bubble sorting algorithm to sort data dataGridView.[/SIZE][/B] below shown my code which i use to add data to grid.:) [CODE]List<STUDENT> student_list = new List<STUDENT>(); private void btnAddToGroup_Click(object sender, EventArgs e) { if (dataGridView1.SelectedRows.Count > 4 || dataGridView1.SelectedRows.Count < 2) { MessageBox.Show( "The Selected row count should be < 4 or > 2,\n Please try again"); } else { //gridDesignGroup(); for (int i = 0; i < dataGridView1.SelectedRows.Count; i++) { STUDENT stuObj = new STUDENT(); stuObj.groupID = txtGID.Text; stuObj.stuId = dataGridView1.SelectedRows[i].Cells[0].Value.ToString(); stuObj.stuFirstName = dataGridView1.SelectedRows[i].Cells[1].Value.ToString(); stuObj.stuLastName = dataGridView1.SelectedRows[i].Cells[2].Value.ToString(); stuObj.stuEmail = dataGridView1.SelectedRows[i].Cells[3].Value.ToString(); student_list.Add(stuObj); BindingSource bind = new BindingSource(); bind.DataSource = student_list; dataGridView2.DataSource = bind; } foreach (DataGridViewRow r in dataGridView1.SelectedRows) { dataGridView1.Rows.Remove(r); } } }[/CODE] [/QUOTE]
Insert quotes…
Verification
Hata thunen beduwama keeyada? (60 bedeema thuna)
Post reply
Top
Bottom