Ask about GridView


  • By the event ItemsCliked of GridView, I can receive the object e->ClickedItem, but there is a error when I convert it to GridViewItem, such as

    GridViewItem^ gvItem=dynamic_cast<GridViewItem^>(e->ClickedItem>. I cannot do like this.

    Additionally, when I try to get the index of the clicked Item,

    unsigned int* index = new unsigned int;

    itemGridView -> Items -> IndexOf(e->ClickedItem,index);

    it is compiled successfully but it doesn't return the index of the object in the GridView, it always return -1

    Please help

    Wednesday, May 16, 2012 3:49 AM

All replies

  • Hello,

    I cannot reproduce this issue on my side, and I think your codes has some error on other codes.

    Would you please show us more codes about this issue or upload the whole project to skydriver, so that we can reproduce this issue on our side.

    It is not necessary that you send out the whole of your project. We just need a simplest sample to reproduce the problem. You can remove any confidential information or business details from it.

    Best regards,

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

    Thursday, May 17, 2012 6:30 AM