Since you are using GridTemplateColumns I hope you are having controls inside the ItemTemplate. If so you need to access the controls first and then its value. Here is a sample code which I tried on my end. If this does not meet your requirement I would suggest you to send your aspx code.