Using ver 11.2 WHDG set up to bind to a dataset first row only at runtime to reduce time of loading all children rows. Everything loads fine initially. When a expand row indicator is clicked I have the rowislandspopulating setup to add the child band. This works sometimes. I have noticed that sometimes I click on the expand row and the ajax indicator shows quickly and disapears. The rowislandspopulating routine never gets executed. If I try to click on the expand row again nothing happens. I can go to a different row and try to expand it and the ajax asynch indicator appears and it tries to work but then I get a "server does not respond" message before it even tries to run the islandpopulting routine. I can go to another row and it works fine. Got to another row and does not work. All of my root rows have at least 1 child row so it does not make sense to me why I am getting these 3 scenarios.
Recap: when trying to expand row ...
Scenario 1 works as should
scenario 2 does nothing
scenario 3 get server does not respond message and row does not show.
Please help! This has been very frustrating and I have tried every setting and combination that I can think of.
Thanks
Hi jcom39201,
You could test your scenario with a simple DataSet and see if the issue still occurs.
I will try to get a running example, but may be time consuming. Database is DB2 on a remote server.
Your code seems to be correct. I am not able to tell what is causing the issue. Is it possible for you to provide me with a running sample, that reproduces this behavior? Thank you.
Thank you for your reply.
This is my first level dataset...
cmd.CommandText ="SELECT distinct PCASE_EMS_RUN_NUM,pcase_start_dt,pcase_dpo_loc,pcase_comments " + _
" FROM pcase_file " + _
" WHERE upper(PCASE_EMS_RUN_NUM)='" + UCase(TextBox3.Text) + "' and pcase_pat_acct=" + Session("acctid").ToString
cb.DataAdapter = da
da.SelectCommand = cmd
da.Fill(ds2,"tr")
I do not want to load the second tier dataset yet because that it what makes this page take so long to load. The user only needs to load a child tier if needed. So, I found on web to do this...
ds2.Tables.Add()
ds2.Tables(1).Columns.Add("PCASE_EMS_RUN_NUM", GetType(String))
ds2.Relations.Add(ds2.Tables(0).Columns("PCASE_EMS_RUN_NUM"), ds2.Tables(1).Columns("PCASE_EMS_RUN_NUM"))
Me.ug1.DataSource = ds2.Tables("tr").DefaultView
Me.ug1.DataBind()
The above allows a dummy tier to be added in order to show the + indicator to each row.
I then have my rowisland routine as below and this loads the second tier of data per the parent ID.
Protected Sub ug1_RowIslandsPopulating(ByVal sender As Object, ByVal e As infragistics.Web.UI.GridControls.ContainerRowCancelEventArgs) Handles ug1.RowIslandsPopulating
e.Cancel =True
Dim x = e.Row.Items(0).Value
Dim cnnn As New Odbc.OdbcConnection
' Get the data key
Dim key As Integer = CInt(e.Row.DataKey(0))
ds3.Clear()
ds3.Tables.Clear()
Dim cmd As New Odbc.OdbcCommand
Dim da As New Odbc.OdbcDataAdapter
Dim cb As New Odbc.OdbcCommandBuilder
cmd.Connection = cnnn
cmd.CommandTimeout = 500
cnnn.ConnectionString =
"Provider=IBMDADB2;DSN=DISC" + Session("onpart") + ";Hostname=RSG2;Protocol=TCPIP;Port=50000;Uid=db2;Pwd=db2admin;"
cnnn.Open()
cmd.CommandText =
"SELECT distinct PCASE_EMS_RUN_NUM,trn_enc_num,enc_tot,enc_pbal,enc_ibal,TRN_POST_DT, SVC_DESC1, TRN_AMT, trn_rmk,INS_NM1" + _
" FROM ((((trn_FILE inner JOIN enc_file on trn_file.trn_enc_num = enc_file.enc_num) LEFT JOIN TRH_FILE ON trn_file.TRN_HDR_NUM = TRH_FILE.TRH_NUM) LEFT JOIN PCASE_FILE ON TRH_FILE.TRH_JN_TO_PCASE = PCASE_FILE.PCASE_JN_FROM) left join svc_file on trn_file.trn_svc_cd = svc_file.svc_cd) left join ins_file on trn_file.trn_ins_cd=ins_file.ins_cd " + _
" WHERE PCASE_EMS_RUN_NUM <> '' and PCASE_EMS_RUN_NUM = '" + x.ToString + "' and trn_PAT_ACCT = " + Session("acctid").ToString + _
" ORDER BY trn_ENC_NUM,TRN_POST_DT"
da.Fill(ds3,"enc")
cnnn.Close()
' Create Container Grid
Dim childGrid As New ContainerGrid()
childGrid.AutoGenerateColumns =
True
childGrid.DataKeyFields ="PCASE_EMS_RUN_NUM"
e.Row.RowIslands.Add(childGrid)
' Bind Grid
childGrid.DataSource = ds3.Tables("enc")
childGrid.DataBind()
end sub
As stated in original post. It works some of the time. I can load the top tier with 20 records and as I click on the expansion + it will run the rowisland routine good. If i select a different row the ajax indicator may flash for a second but the rowisland does not run. I can select another row and it runs fine. Select another row and I get error. Very random.
Thanks!
Hello jcom39201,
I could not reproduce the behavior you have described. Please provide me with a small sample, demonstrating the issue, in order to be able to investigate it further. I am attaching the sample I created using v11.1.20111.2207.