Hello DevExpress,
I'm using a gridview. I'm trying to get the key of a selected row with javascript but it seems does not work.
The ClientInstanceName of the grid is called "gridAna".
If i call alert(gridAna.GetRowKey(0)); it works and the alert shows a guid(which is the key of the row at 0 position).
If i call gridAna.GetSelectedKeysOnPage().length it will return 0 even if i have selected a row on the grid with the checkbox.
Any idea why this could happen?
Thank you.
Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.
Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.
now it works.
Hello Walter,
Thank you for your question. I have tried to reproduce the issue using a small sample, but could not do it. It seems that the ASPxClientGridView.GetSelectedKeysOnPage method works properly.
Could you please download the attached example and then execute it using the same version as I have?
Please share your results with me.
Thanks,
Vest
Hello Vest,
i have solved the problem.
The grid is within a usercontrol that is loaded dynamically. Sometimes it does not worked because of viewstate problem and because i had not set the id of the control when loading it dynamically.
Not it works. Thank you.
Thank you.