1 Replies - 231 Views - Last Post: 02 February 2013 - 07:13 AM Rate Topic: -----

#1 TejashreeGanesh  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 02-February 13

About Listview Control

Posted 02 February 2013 - 05:42 AM

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.

Is This A Good Question/Topic? 0
  • +

Replies To: About Listview Control

#2 lar3ry  Icon User is offline

  • Coding Geezer
  • member icon

Reputation: 310
  • View blog
  • Posts: 1,290
  • Joined: 12-September 12

Re: About Listview Control

Posted 02 February 2013 - 07:13 AM

View PostTejashreeGanesh, 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.

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.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1