I'm associating by code a datasource to a grid inside a repeater control:
Pagination and all works correctly. Instead trying an update it seems we have some problems. No error is thrown but i can exit from update only with cancel and in debug I see it does not reach the update function code.. Why? How can I solve this?
protected void Repeater1_PreRender(object sender, EventArgs e) { foreach (RepeaterItem item in Repeater1.Items) { //Dinamically generate DataSource and associate it to Repeater Item ObjectDataSource ods = new ObjectDataSource(); ods.ID = "automaticDS"; ods.TypeName = "MachinaWeb.Services.BO_ConfigurazioneProgramma_Parametro"; ods.SelectMethod = "getAll"; ods.UpdateMethod = "updateParametro"; ods.SelectParameters.Add("_idCultura", DbType.Int64, HiddenFieldIdCultura.Value); ods.SelectParameters.Add("_idAzienda", DbType.Int64, HiddenFieldIdAzienda.Value); ods.SelectParameters.Add("_idGruppoParametro", DbType.Int64, ((HiddenField)item.FindControl("HiddenFieldIdGruppo")).Value); RadGrid radGrid = (RadGrid)item.FindControl("RadGridParametriConfigurazione"); radGrid.DataSource = ods; radGrid.DataBind(); } }Pagination and all works correctly. Instead trying an update it seems we have some problems. No error is thrown but i can exit from update only with cancel and in debug I see it does not reach the update function code.. Why? How can I solve this?