My scenario: an aspx page with a custom control on it, containing a Datagrid. I have to assign some control properties programatically, and I do it in the Page_Load event from the aspx page, then I DataBind the control. In the Page_Load of the control, I Bind the control only when Not IsPostBack. I don't know it it is correct, but it shows what I expect. If I don't bind the control after assigning the properties, the control is not shown.
Now, I want to edit some fields of the Datagrid. I Click on the edit button and the textboxes from the EditItemTemplate appeared. Great.
But now, I edit the values and click on the Update Button. When I try to retrieve the values from the textboxes, they are not loaded. Instead of that, the labels of the ItemTemplate part has been loaded again.
I Databind the Datagrid again on the Update Command event handler, but always after trying to recover the values from the textboxes. But I think that some of the bindings I'm done on both the aspx and the ascx are doing the change.
Anyone has any idea? If the explanation is not clear, I'll try to be more precise.
Now, I want to edit some fields of the Datagrid. I Click on the edit button and the textboxes from the EditItemTemplate appeared. Great.
But now, I edit the values and click on the Update Button. When I try to retrieve the values from the textboxes, they are not loaded. Instead of that, the labels of the ItemTemplate part has been loaded again.
I Databind the Datagrid again on the Update Command event handler, but always after trying to recover the values from the textboxes. But I think that some of the bindings I'm done on both the aspx and the ascx are doing the change.
Anyone has any idea? If the explanation is not clear, I'll try to be more precise.