Jump to content
ferreira12

Listview checkbox

Recommended Posts

ferreira12

Como faço para ir buscar os items com o pisco na checkbox.

por exemplo com este pedaço de codigo vou buscar tudo o que está na listview.

sqlComando.Parameters.Add("@id", SqlDbType.Int).Value = ListView1.Items(i).SubItems(1).Text

O que tinha de mudar para ir buscar apenas o items o pisco da checkbox?

Share this post


Link to post
Share on other sites
ferreira12

Boas entretanto já consegui resolver o problema. mas surgiu-me outra dúvida que é como faço para chekar todos os piscos. A listview possui algum mecanismo já integrado?

Share this post


Link to post
Share on other sites
ferreira12

Boas, sim claro.

sqlComando.Parameters.Add("@id", SqlDbType.Int).Value = ListView1.CheckedItems(i).SubItems(1).Text

e caso tenhas um ciclo também é necessario alterar para CheckedItems

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...

Important Information

By using this site you accept our Terms of Use and Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.