Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
390
Row expanding not stable
posted

Hi

I've been struggling WebHierarchicalDataGrid. I load rows on demand. For first expanding, grid successfully expands row but if I try to expand another row, nothing happens. In debug, for first click page enters page load, executes filling method and handles event and filling demand data. But for second, it does not enter page load. After that if click another row it expands successfully but if I try to expand non expanded rows again, There is nothing. I'm sure about all rows successfully filled. Here is my code.

private void MesajDoldur()
{

DataTable dtMessages = new DataTable();
DataSet dsKullanici = new DataSet();
DataTable dtKullanici = new DataTable();

Messages = new clsMessages();



dsKullanici = Messages.KisiGetir(RezervasyonRef, 0, 1);
dtKullanici = dsKullanici.Tables[0];
dtKullanici.TableName = "tableKisi";

Infragistics.Web.UI.DataSourceControls.DataView dvKisi = new Infragistics.Web.UI.DataSourceControls.DataView();

dvKisi.ID = "vBaslik";
dvKisi.DataMember = "tableKisi";
dvKisi.DataSource = dtKullanici;

dtMessages.TableName = "tableMesaj";
dtMessages.Columns.Add("ID", typeof(int));
dtMessages.Columns.Add("Mesaj", typeof(string));

for (int i = 0; i < dtKullanici.Rows.Count; i++)
{
DataRow drMessage = dtMessages.NewRow();
drMessage[0] = Convert.ToInt32(dtKullanici.Rows[i][0]);
drMessage[1] = " ";
dtMessages.Rows.Add(drMessage);
}

#region comment dvMesaj
Infragistics.Web.UI.DataSourceControls.DataView dvMesaj = new Infragistics.Web.UI.DataSourceControls.DataView();

dvMesaj.ID = "vMesaj";
dvMesaj.DataMember = "tableMesaj";

dvMesaj.DataSource = dtMessages;

whdsShowMessages.DataRelations.Clear();
whdsShowMessages.DataViews.Clear();
whgridShowMessages.Rows.Clear();

whdsShowMessages.DataViews.Add(dvKisi);
whdsShowMessages.DataViews.Add(dvMesaj);

Infragistics.Web.UI.DataSourceControls.DataRelation drel =
new Infragistics.Web.UI.DataSourceControls.DataRelation("vBaslik", "ID", "vMesaj", "ID");
whdsShowMessages.DataRelations.Add(drel);
#endregion

whgridShowMessages.DataSource = whdsShowMessages;

whgridShowMessages.DataBind();


}

protected void whgridShowMessages_RowIslandsPopulating(object sender, Infragistics.Web.UI.GridControls.ContainerRowCancelEventArgs e)
{

e.Cancel = true;
Messages = new clsMessages();
DataSet dsChild = new DataSet();
dsChild = Messages.MesajGetir(RezervasyonRef, Convert.ToInt32(e.Row.DataKey[0]), 1);

ContainerGrid childGrid = new ContainerGrid();
e.Row.RowIslands.Add(childGrid);

childGrid.ShowHeader = false;
childGrid.DataSource = dsChild;

childGrid.DataBind();

}

Parents
No Data
Reply Children