Ticket T417171
Visible to All Users

get Selected row cell value in grid view in c#

created 9 years ago

how  to get Selected row cell value  in grid view in c#

get me code example

Comments (1)
B B
Brendon Muck [DevExpress MVP] 9 years ago

    Are you using single row selection or multi-row selection?

    Answers approved by DevExpress Support

    created 9 years ago (modified 10 months ago)

    Hello,

    If you enable the GridView.OptionsSelection.MultiSelect option, use the GridView.GetSelectedRows method to get handles of the selected rows. To get a value of these rows, use the GridView.GetRowCellValue method.

    The GridView.GetSelectedCells method returns selected cells.

    Please do not hesitate to contact us in case of any further difficulty. We will be happy to help you.

    See also:
    A quick-reference guide - it contains cheat sheets, best practices, and troubleshooting sections:
    DevExpress WinForms Cheat Sheets

    Multiple Row and Cell Selection

      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.