Hello everyone,

So im been looking around and i havent been able to find info of this problem that i have, so this is the main thing

I have this datagridview of an inventory, and i added an extra column(unbound) to the dgv, so what i want to be able to do is print only the checked boxes of that dgv, i attached an image of form, i have code for printing all the dgv, but im having trouble with that.

thanks in advance,
CrankyMero

Hi,

You need to iterate through the DataGridView rows and for each row, cast the cell in the column of interest to DataGridViewCheckBoxCell and cast the Value to a bool.

OK, i know what u mean, and i know a little bit how to do that, to check the status, but can you give me a code example of how to print it

Thanks for your time

Hi,

You can find an example, here.

I would even suggest you to create you own report (recommend Crystal Reports) and pass data (checked rows) to the report and show then here.

@Luc001 thanks for that example, im positive that will solve my problem!!

@Mitja Bonca, thanks but im not trying to use CR, but i also though about it, but appreciate the help!!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.