|
-
May 1st, 2003, 10:49 AM
#1
Thread Starter
New Member
-
May 1st, 2003, 11:34 AM
#2
Addicted Member
I believe datagridName.Items.Count will give you the record count you are looking for.
Have you tried:
checkboxlist1.DataSource = datagridName.DataSource
-Daryl
"Two More Rolls of Duct tape, and the world is mine!"
VB.NET Guru
-
May 1st, 2003, 12:11 PM
#3
Thread Starter
New Member
in a round-a-bout way, that fully worked!!
setting the datasource of the check box gives me the right number of rows... so, I set a variable to the number of rows in the checkbox, then set the datasource of it to nothing, clear it and use the rowCount variable I had to loop through the datagrid!!
CHEERS!!
total kludge way to do it, but I've spent 'bout 25 hours on it and I'm sick of looking at that piece of code 
thank you!!
-
May 1st, 2003, 12:20 PM
#4
Frenzied Member
Y seting the datasource of checkedlistbox and then clearing it and looping through datagrid and repopulating the checkedlistbox?????
'Heading for the automatic overload'
Marillion, Brave, The Great Escape, 1994
'How will WE stand the FIRE TOMORROW?'
Eloy, Silent Cries and Mighty Echoes, The Vision - Burning, 1979
-
May 2nd, 2003, 12:45 PM
#5
Thread Starter
New Member
I have to get the count of the datagrid... setting the datasource of the checkedboxlist to the datagrid gives me the total rows in the datagrid (checkedboxlist.items.count)... I then have a number to use as the maximum row value so I can loop through my datagrid and populate the checkedlistbox with the actual VALUES from the datagrid.
Like I said, super round-a-bout way to do it, but it works.
-
May 2nd, 2003, 12:47 PM
#6
Addicted Member
You should be able to get the count from the datagrid.
datagridName.Items.Count
-Daryl
"Two More Rolls of Duct tape, and the world is mine!"
VB.NET Guru
-
May 2nd, 2003, 02:01 PM
#7
Frenzied Member
and populate the checkedlistbox with the actual VALUES from the datagrid.
So you mean that the checkedlistbox items comes from a column in datagrid, right?
If so then you may set the checkedlistbox datasource to that of datagrid and its dispaly memeber to the coulmn you want to show.
'Heading for the automatic overload'
Marillion, Brave, The Great Escape, 1994
'How will WE stand the FIRE TOMORROW?'
Eloy, Silent Cries and Mighty Echoes, The Vision - Burning, 1979
-
May 3rd, 2003, 12:02 AM
#8
Thread Starter
New Member
Originally posted by Dmyze
You should be able to get the count from the datagrid.
datagridName.Items.Count
Unfortunately, no... no items.count on a datagrid
-
May 3rd, 2003, 12:04 AM
#9
Thread Starter
New Member
Originally posted by Lunatic3
So you mean that the checkedlistbox items comes from a column in datagrid, right?
If so then you may set the checkedlistbox datasource to that of datagrid and its dispaly memeber to the coulmn you want to show.
Except, setting the datasource of the checkedlistbox to the datagrid source displayed ServerFunction.Property instead of the actual columns within the datagrid.
checkedlistbox.datasource = datagrid.datasource is how I came to that.
-
May 3rd, 2003, 12:59 AM
#10
Frenzied Member
Thats the way it should be unless you define its dispaly member property.
'Heading for the automatic overload'
Marillion, Brave, The Great Escape, 1994
'How will WE stand the FIRE TOMORROW?'
Eloy, Silent Cries and Mighty Echoes, The Vision - Burning, 1979
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|