We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

how to show child grid height completely from main grid automatically or programatically

Thread ID:

Created:

Updated:

Platform:

Replies:

131480 Jul 12,2017 06:18 AM UTC Jul 17,2017 05:03 PM UTC ASP.NET MVC 4
loading
Tags: Grid
Dongil Shin
Asked On July 12, 2017 06:18 AM UTC

Hi, I have a problem on showing full height of child grid from main grid. (Main grid has an expand icon to expand the child grid)

initially, when page loading, it expands the child grid, but the height is not the exact necessary height. so, it does not show full height of the child grid.

.e-grid {
        overflow-y:auto !important;
        min-height:200px;        
    }

as this example,  I give minimum height, but this is not a solution.

some strange thing is that if I manually click/unclick the expand icon, it shows the full height of child grid.

I'd like to know how to give full height of child grid programatically or automatic the main grid's record's expand icon clicking.

Thank you in advance.

any solutions are welcome!
Kind Regards

Dongil Shin
Replied On July 13, 2017 02:53 AM UTC

I attached this issue with screenshots.

Thank you.

Kind Regards,


Attachment: does_not_show_full_height_child_grid_issue_a19c4841.zip

Farveen Sulthana Thameeztheen Basha [Syncfusion]
Replied On July 13, 2017 04:35 PM UTC

Hi Dongil, 

Thanks for contacting Syncfusion Support. 

We have checked your issue and prepared sample according to that but we are unable to reproduce your reported problem “Child Grid height doesn’t set properly” at our end . In this sample we have rendered hierarchical Grid inside the Tab. Please refer to the sample:- 


So we need additional information to find the cause of the issue. Could you please share following details with us. 

1. Grid code example (both in server and client side). 

2. Did you have customized the Grid height. If so please share the code. 

3. An issue reproducing sample if possible or sample hosted link or replicate the issue on the above sample. 
 
4. Essential studio version and browser details. 

The provided information will help us to analyze and provide you the solution as early as possible. 
 
Regards, 
 
Farveen sulthana T 



Dongil Shin
Replied On July 14, 2017 04:41 AM UTC

Hi, Thank you for your quick response.

I attached our current source code, the structure is that the Edit.cshtml includes as a partial view with _StarGrid which has Syncfusion grid.

the stargrid.js includes all related events in Main grid and Child grid.

however, the core logic for showing grid is in _StarGrid.cshtml.

<style>
    /* Force width of validation so the message is not truncated */
    .e-field-validation-error {
        width: 113px;
    }

    .e-rowcell {       
        word-wrap:break-word !important;
    }

    .e-grid {
        overflow-y:auto !important;
        min-height:200px;          
    }        
</style>
<script>
    setTimeout(function () {
        var height = $('.e-detailrow:visible').height();
        //console.log(height);
        if (height > 200) // default is 200px, if height is bigger than, then apply it.
        {
            $(".e-grid").css("min-height", height + "px");
            $("#StarGrid").ejGrid("collapseAll");
            $("#StarGrid").ejGrid("expandAll");
        }
    }, 1000);

</script>

this code works, with this code, it can show the full height of child grid of #StarGrid.

however as you can see, I just use setTimeOut and set height and then collapse then expand, it works.

but there may be a better solution, I think so.

Please give me a response soon.

Thank you.

Kind Regards,


Attachment: stargrid_57bbd03b.zip

Farveen Sulthana Thameeztheen Basha [Syncfusion]
Replied On July 17, 2017 05:03 PM UTC

Hi Dongil,  
 
We  have checked your code example and prepared sample according to that but we are unable to reproduce your reported problem at our end. Please check the sample. 


Could you please make ensure that AllowScrolling property  has been enabled for both child and parentGrid. After following the code example in the sample, still facing difficulties, please share us the following details with us. 

1. Screenshot/Video demo to replicate the issue. 

2.If possible, provide an issue reproducing sample or hosted link or replicate the issue in the provided sample.  
 
3. Confirm the version of Essential Studio (15.2.0.46). 

4. Exact scenario you are facing the issue. 

The provided information will help us to analyze and provide you the solution as early as possible. 
 
Regards, 

Farveen sulthana T 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;