locked
how to enable a grid view item selection throw mouse click

    Question

  • how to enable a grid view item selection throw mouse click
    Thursday, September 6, 2012 9:39 AM

Answers

  • How do you set the default selection? I use this code and it work fine.

    mygrid->SelectedIndex=0;

    Best regards,
    Jesse


    Jesse Jiang [MSFT]
    MSDN Community Support | Feedback to us

    • Marked as answer by Jesse Jiang Thursday, September 13, 2012 3:09 AM
    Monday, September 10, 2012 9:56 AM

All replies

  • Hi,

    First, please add selectionChange event and use safe_case.

     ite^ b = safe_cast<ite^>(e->ClickedItem);

    For more information, please follow this sample code
    http://code.msdn.microsoft.com/windowsapps/ListViewSimple-d5fc27dd

    Best regards,
    Jesse


    Jesse Jiang [MSFT]
    MSDN Community Support | Feedback to us

    Friday, September 7, 2012 7:03 AM
  • hi jesse,

    I am trying to enable the default selection on the gridview throw code . Any idea about this..?

    Regards,

    Sarath s

    Friday, September 7, 2012 9:11 AM
  • How do you set the default selection? I use this code and it work fine.

    mygrid->SelectedIndex=0;

    Best regards,
    Jesse


    Jesse Jiang [MSFT]
    MSDN Community Support | Feedback to us

    • Marked as answer by Jesse Jiang Thursday, September 13, 2012 3:09 AM
    Monday, September 10, 2012 9:56 AM
  • hi jesse,

    I have a gridview with number of Grids. I am trying to drop an image into this grid and the dropping method works properly . But the problem is I can't get the index of the grid where I am dropping images.

    If I get the default selection on the gridview item. I can easily find out the index .Any idea about this?

    thank you for your reply.

    Regards,

    Sarath s

    Monday, September 10, 2012 10:43 AM