SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm having a spgridview in a visual webpart. The datasource of this gridview is written in the ascx-file and has a selectmethod in codebehind.

The problem is that while the datasource does it'S databinding all properties in the webpart are emtpy or zero but were filled before. Additionally to this when i set a property while databinding the property is emtpy or zero after databinding.

How can I access the properties while databindig?

share|improve this question
Are you talking about web part properties? It would be helpful if you provided some of the relevant code. – Kit Menke Nov 1 '11 at 18:20
up vote 0 down vote accepted

Answer is that you have to use the Selectparameters when using a Databind. All other properties are not working while in Databind.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.