how to make a filter that only show the items that checked and unchecked don't show in checklistbox
just change the loop
Do While FileStream.Position < FileStream.Length if BinaryReader.ReadBoolean=True Then CheckedListBox1.Items.Add(BinaryReader.ReadString) CheckedListBox1.SetItemChecked(CheckedListBox1.Items.Count - 1, BinaryReader.ReadBoolean) End If Loop
not compile D:
CheckedListBox1.Items.Clear() Dim FileStream As New System.IO.FileStream("e:\CheckedListBoxData.cld", IO.FileMode.Open) Dim BinaryReader As New System.IO.BinaryReader(FileStream) CheckedListBox1.BeginUpdate() Do While FileStream.Position < FileStream.Length If BinaryReader.ReadBoolean = True Then CheckedListBox1.Items.Add(BinaryReader.ReadString) CheckedListBox1.SetItemChecked(CheckedListBox1.Items.Count - 1, BinaryReader.ReadBoolean) End If Loop CheckedListBox1.EndUpdate() BinaryReader.Close() FileStream.Dispose()
hello gozo !
can you please rephrase your prob , there is not much time to read another thread to understand your prob , please give full description in order to get quick and good solutions of your prob.
simply i want is , checkedlistbox has 20 items 10 of them are checked i want when i click a button then its filter unchecked items and only show the checked items
i hop this will be a good description
thanks again :)
sorry for late reply , i know thread is solved , but here is a code to remove the unchecked items from checklistbox.
Dim i, ii, b As Integer Dim list, list2 As New ArrayList 'in this loop we only select and add those items in our list those are checked For i = 0 To CheckedListBox1.CheckedItems.Count - 1 list.Add(CheckedListBox1.CheckedItems.Item(i).ToString) Next 'here we are adding items in list2 those are not in list , thats mean we are adding all the items those are not checked For ii = 0 To CheckedListBox1.Items.Count - 1 Dim item As String item = CheckedListBox1.Items.Item(ii).ToString 'this condition checks that is list contains the item , if return false then it will add it in list2 If list.Contains(item.ToString) = False Then list2.Add(item.ToString) End If Next 'here i am removing the items of list2 because they are unchecked For b = 0 To list2.Count - 1 CheckedListBox1.Items.Remove(list2.Item(b).ToString) Next
Hi I'm having a problem implementing a mini shopping cart drop down in the header to show the user all the products they have in their shopping cart. It seems the only solution for this is Ajax, and I've looked all over and can't find anything that I could possibly ...
Hello All ...
Iam Getting An Error With try to excecute the stored procedure .
I have Have Sql database , the stored procedure like so :
USE [MPRS] GO /****** Object: StoredProcedure [dbo].[Search_Licenses_By_Number] Script Date: 26-Nov-16 8:06:52 AM ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO ALTER PROCEDURE ...
Help! I want to create a java program that finds the highest even integer among the values entered by the user. Stop asking values when a value less than 1 have been entered. If no even integer is entered, display "No Even Integer"
Here is the sample output that I ...