This is a migrated thread and some comments may be shown as answers.

Rad Controls viewstate on a dynamically created user control

7 Answers 124 Views
Input
This is a migrated thread and some comments may be shown as answers.
A K
Top achievements
Rank 1
A K asked on 21 Apr 2010, 08:54 PM

I have following  Rad controls on a user control. I load this user control dynamically.  I am doing everything mentioned in general to maintain viewsatate.

Following RadText box is not maintaining a viewstate in between postbacks. Next to Rad I have put regular aspText box and it works fine with viewstate.

<telerik:RadTextBox ID="txtName" runat="server" MaxLength="50"

                                          meta:resourcekey="txtName" Width="300px" EnableViewState="true">

                                    </telerik:RadTextBox>

<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>  --- This one works fine

Following Rad combobox is behaving like locked I can not select values from a dropdown. But next to this one is regular aspdropdown on the same page which works fine with view state as well as with dropdown list selection. Exactly same code I use to load both boxes. Which is also given

<telerik:RadComboBox ID="cboAccount" runat="server" Skin="Vista"

                                          meta:resourcekey="cboAccount" Sort="Ascending" Width="300px" AppendDataBoundItems="True">

                                    </telerik:RadComboBox>

           

 

<asp:DropDownList ID="DropDownList1" runat="server">

                                    </asp:DropDownList>

 

      With cboAccount

                        .DataSource = _piggyBankEligibleAccounts

                        .DataTextField = "Text"

                        .DataValueField = "id"

                        .DataBind()

                  End With

                  With DropDownList1

                        .DataSource = _piggyBankEligibleAccounts

                        .DataTextField = "Text"

                        .DataValueField = "id"

                        .DataBind()

                  End With

7 Answers, 1 is accepted

Sort by
0
Iana Tsolova
Telerik team
answered on 23 Apr 2010, 01:20 PM
Hello A K,

I followed your description in the attached sample however I was unable to replicate the issue. Can you check it out and let me know what differs in your case?

Greetings,
Iana
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Anagha Kulkarni
Top achievements
Rank 1
answered on 23 Apr 2010, 02:14 PM
I am  creating a radpanel item dynamically and creating user control inside this panelItem.
0
Iana Tsolova
Telerik team
answered on 23 Apr 2010, 02:28 PM
Hi Anagha,

Can you provide runnable code illustrating your scenario and the issue? I will check it out and turn back to you with my findings.

Looking forward your reply,
Iana
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Anagha Kulkarni
Top achievements
Rank 1
answered on 23 Apr 2010, 02:38 PM

Thank you for replying Lana!

 

I have a user control called piggybank on the control there are few controls outside the panel and some are on the panel. On page load of user control I populate all these controls. On parent page I have radpanel bar control. On the page load of parent page I dynamically add panel items ( depending on the count of accounts) with this piggy bank user control. Piggy bank user control has edit button. By default panel on user control is invisible. When user clicks edit I make panel visible. It does make the panel visible but Data on the textboxes and other control is gone. But by default if I keep this panel visible, I do see the data on these controls. In between postbacks if panel is invisible by default viewstate is not maintained. None of the comboboxes on this page works.

 

If you need any additional information please let me know. 

Thanks you!!!

0
Iana Tsolova
Telerik team
answered on 26 Apr 2010, 12:06 PM
Hi Anagha,

Can you send me a sample project, or share a runnable code illustrating the case? Thus I can debug it locally and turn back to you with a proper resolution.

Sincerely yours,
Iana
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
A K
Top achievements
Rank 1
answered on 26 Apr 2010, 01:23 PM
How do I attach zip files of my project? when I click on attach only options I have.gif .png .jpg. . I can Send you user control any project files. let me know how to send you those files.

Thanks
0
Iana Tsolova
Telerik team
answered on 27 Apr 2010, 08:19 AM
Hello,

Try opening a formal support ticket where you would be able to attach the project in a zip file.

Greetings,
Iana
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
Input
Asked by
A K
Top achievements
Rank 1
Answers by
Iana Tsolova
Telerik team
Anagha Kulkarni
Top achievements
Rank 1
A K
Top achievements
Rank 1
Share this question
or