LoadControlState Event Not Firing?

S

seraphimrhapsody

Hello all,

I've created a custom control that inherits CompositeControl for the
purpose of extending the gridview and using dynamically created
dropdowns to filter that gridview.

My main problem is persisting the dropdowns' values across postbacks,
so I thought that control state would be perfect for this issue (since
it's required for the control to function properly).

After reading countless tutorials and blogs and newsgroups posts about
the subject, I'm finally at my wits end. I seem to have setup
everything correctly, and my SaveControlState() event fires as
expected, but the LoadControlState() event never fires at all.

I've posted my fully commented code here: http://pastebin.com/733065

Am I missing something? Did I not require it correctly? Is that
statement in the incorrect place?

Thank in advance for anyone's help!
--SeraphimRhapsody
 
S

seraphimrhapsody

Also, the implementation of using this control would look something
like this:

cc1:FilteredGV ID="FilteredGV1" runat="server" SelectCommand="select *
from companies where (([ID] like @ID) AND ([CompanyName] like
@CompanyName) AND ([SubmitName] like @SubmitName))"
ConnectionString="Data Source=dev;Initial
Catalog=myDB;Persist Security Info=True;User ID=sa;Password=*****" >
<Parameters>
<asp:ListItem value="ID"></asp:ListItem>
<asp:ListItem value="CompanyName"></asp:ListItem>
<asp:ListItem value="SubmitName"></asp:ListItem>
</Parameters>
</cc1:FilteredGV>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,565
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top