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
20
Problem with accessing expanded row value in XMLHttpRequest-LoadOnDemand Xml
posted
Hi Folks,
I have an ultrawebgrid with multiple (at least 4) hierarchies in it. I’m using LoadonDemand=Xml on this grid for the sake of implementing AJAX in .NET 1.1. I have done this from the following link.
As per the above link, the whole dataset is bound to the grid at first time itself. But, my data set is a bit bulky. That’s why I want to show only parent table rows on loading grid for the first time.
Problem 1: I am not getting expand buttons (“+”) when I bring only 1 data table into the dataset and bound to the grid. So, I fetched parent and first child table from data base and created a relation between them and bound to ultrawebgrid. Now, it started showing expand buttons. But if I want to fetch only first table is there any work around? I tried creating dummy child table. But it’s not fruitful.
Now, on subsequent expand button clicks the “ultraWebGrid1_InitializeDataSource” is fired in this event I thought of fetching the child tables from the data base based on the expanded parent row value.
Problem 2: I am not getting values of the expanded row in ultraWebGrid1_InitializeDataSource event.
I have done some research on this and came to know “ultraWebGrid1_XMLHttpRequest“ event is called on every expand button click. For, reference see the link below.
But, here also I’m not getting the values of expanded row. But I’m getting e.Band and e.RowNo. So based on these two I got expanded row value in ultraWebGrid1_InitializeDataSource from my dataset which again filled from database (Please, observe I’ve not found any values in ultraWebGrid1, because it is showing rows count zero..!!). Based on this value I got the first child table now. I have created relation between these two tables and bound to my ultrawebgrid. This is working fine till now.
Problem 3: When I clicked on expand button of Band 1 (i.e., first child band), again the ultraWebGrid1_XMLHttpRequest is fired, but this time I am getting only e.RowNo value, the e.Band is ‘nothing’. Why this is happening? Without e.Band value my e.RowNo is useless to get further child tables from database.
Can anybody have solution please let me know soon. Help needed urgently.
 
 
  • 255
    posted

    I am also having the same situation. I want to fetch only the first level rows initially and without a page reload I want to get the child rows. I tried LoadonDemand=Xml and LoadonDemand=Manual.

    In the first case it is not even calling the InitializeDataSource. Nothing happens on [+] button click.

    I have written the datasource bind in the InitializeDataSource as suggested in the link you mentioned.

    In the second case, it is reloading the page again, which I cannot afford.

    Could you please suggest the solution if you have got. I am using framework 3.0. Do I need to do any Ajax settings specifically for this?

     

    Thanks,

    Uma