0

I have a CheckedListBox in my GUI that displays each one of the roles I need to present to the user, as pictured below:

Each one of these roles is tied to specific number in the database, as pictured here:enter image description here

As you can see, the role AUDIT is assigned to the number 10. I need to reflect this in my GUI somehow. What I need is for the value of each of these check boxes in the CheckedListBox to equal one of these ROLESID numbers.

My dilemma is that I want to continue to use the CheckedListBox because of how easy they are to use. I could very well give each one of them their own individual checkbox and assign the values from there, but that's just a lot of bloated code. Is there a way to do this?

Matt
  • 379
  • 7
  • 18
  • 1
    Please post the code for this. –  Aug 16 '17 at 15:44
  • I actually don't have any sort of code for those checkboxes, as it was all created through the GUI editor. My hope is to avoid creating a checkbox for each one of the roles. I could very well do that and it would work, but I feel that there's a better way and I was hoping to see if anyone knew of one. – Matt Aug 16 '17 at 16:35
  • I have limited experience with graphical controls. But I'm sure that each checkbox has its own value. And you could always use a hash table to translate if it came down to it. Without code, I have no way to research this and provide an answer. Even if you are using a GUI designer, there is code somewhere. –  Aug 16 '17 at 16:44

0 Answers0