0

I have a GridView and a SqlDataSource. All binding done in aspx, works correctly and Select calls an SP with parameters.

Now I would like to access the bound data programmatically, in stuctured form, not parsing back it from the UI, using cells or .FindControl or other hacks. I also do not want to reselect the data using my SqlDataSource's Select.

I've debugged the code but can not find any structured data neither in my GridView variable neither in my SqlDataSource variable. Maybe I was browsing the wrong properties or a cast was missing.

Thx in advance

2
  • 1
    Please post some code. See SO help for how to ask questions here. Thanks! Commented Nov 14, 2013 at 23:48
  • My question is, why do you want to do it this way? Commented Nov 14, 2013 at 23:49

1 Answer 1

1

I don't think you can do that. When you bind the data from an SQL DataSource to a Gridview, it fetches the data to display and then that's it. It's gone.

When a GridView updates the data, it uses the key field ID and the text in the GridView to do it. There is no other DataTable or other structure behind the scenes.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.