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

[Solved] PostBack Problem on WebUserControl as Template for RadGrid

0 Answers 79 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Ing. Jesus Manuel
Top achievements
Rank 1
Ing. Jesus Manuel asked on 25 Apr 2013, 07:55 PM
So my problem is that I have a RadGrid which has a WebUserControl as Template

Inside this WebUserControl I have a RadTreeView with ChecBoxes that I populate with some datasource, I run the app, I select some Nodes, but they don't stay checked because Page_Load(here I set de datasource to the RadTreeView) event executes before leaving to the .aspx

The thing here is that Page.IsPostBack is always true so it resets my treeview everytime

.ascx
protected void Page_Load(object sender, EventArgs e)
{
 
            if (!Page.IsPostBack)
            {
                List<ANYTYPE> list = SOMEDATASOURCE;
                treeView.DataSource = SOMEDATASOURCE;
                treeView.DataBind();
            }
}


Another thing is how can I set a propertie of my .ascx from the .aspx?

No answers yet. Maybe you can help?

Tags
Grid
Asked by
Ing. Jesus Manuel
Top achievements
Rank 1
Share this question
or