Hi!
I have 1 listbox control on my form and it has 2 columns those are Sr.No.,Item Name , when I click on Add button data been added in listbox serially (1,2,3,4,..), but when I deleted any row and then again adding the record then it takes previous number to that record.
Ex. I deleted 3rd record, now there is 1,2,4 record. but when I add another one it takes 4th no. instate 5 (1,2,4,4).
so please tell me how can I sort these fields (Sr.No.)?
NOTE:- I have create database connectivity with listview control.
Thank You.
About Listview Control
Page 1 of 11 Replies - 97 Views - Last Post: 02 February 2013 - 07:13 AM
Replies To: About Listview Control
#2
Re: About Listview Control
Posted 02 February 2013 - 07:13 AM
TejashreeGanesh, on 02 February 2013 - 06:42 AM, said:
I have 1 listbox control on my form and it has 2 columns those are Sr.No.,Item Name , when I click on Add button data been added in listbox serially (1,2,3,4,..), but when I deleted any row and then again adding the record then it takes previous number to that record.
Ex. I deleted 3rd record, now there is 1,2,4 record. but when I add another one it takes 4th no. instate 5 (1,2,4,4).
so please tell me how can I sort these fields (Sr.No.)?
NOTE:- I have create database connectivity with listview control.
Thank You.
Ex. I deleted 3rd record, now there is 1,2,4 record. but when I add another one it takes 4th no. instate 5 (1,2,4,4).
so please tell me how can I sort these fields (Sr.No.)?
NOTE:- I have create database connectivity with listview control.
Thank You.
I'm not sure exactly what you need, but you could have a look at ListBox.Items.Insert() or ListBox.Sort()
If it's actually a ListView, there are equivalent methods.
Page 1 of 1
|
|

New Topic/Question
Reply



MultiQuote




|