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. Image for the cookie policy date

GridDataControl with DetailsViewTemplate

Hi,

I am using a GridDataControl with a DetailsViewTemplate like this :
<syncfusion:GridDataControl.DetailsViewTemplate>
    <DataTemplate>
        <ListBox ItemsSource="{Binding MyList}" MinHeight="32" Height="Auto" />
    </DataTemplate>
</syncfusion:GridDataControl.DetailsViewTemplate>

I have several display issues I wish to resolve :
1. When I do not set a MinHeight and a Height, the ListBox is empty (see red arrows in griddatacontrol.height.problem.png in attached file).
2. At first load, I do not want to have the blank rows (see red arrows in griddatacontrol.scroll.png in attached file).
3. I do not want an horizontal scroll bar (see blue arrow in griddatacontrol.scroll.png in attached file).

Can you help me ?


griddatacontrol_21156768.zip

2 Replies

RV Rajiv Verma October 30, 2013 01:52 PM UTC

I am facing the same issue. I hope you get a response soon.

In addition to the blank details, if you have groupings in the GridDataControl then it behaves erratically when you add new data row into it. Some times it inserts blank rows and sometimes it breaks the group tree structure. It is aweful!


FP Farjana Parveen Ayubb Syncfusion Team November 19, 2014 09:14 AM UTC

Hi Dude/Rajiv,

Sorry about the delay caused.

Please refer the below updates:

Due to internal server problem, we are unable to download the attached files. So, we are unable to understand your queries clearly. We have provided the update based on our understanding.

Please find the response below:

Query

Response

When I do not set a MinHeight and a Height, the ListBox is empty

We regret to inform you that currently, we don’t have support for displaying the details view without setting the Width and Height. If you didn’t set, then the size of the details view will not be visible, so details view shrinks.

At first load, I do not want to have the blank rows

We have tested the sample on our end. The reported issue “While loading the grid, blank rows is displayed” is not reproduced on our end. For your reference, we have attached the video:

 

I do not want an horizontal scroll bar

If your requirement is to hide the horizontal scroll bar of the ListBox, we can set the ScrollViewer.HorizontalScrollBarVisibility="Hidden" in ListBox. If this is different from your requirement, please share your exact requirement.

Code Snippet:

     <ListBox ItemsSource="{Binding RelativeSource={RelativeSource AncestorType=Window}, Mode=TwoWay, Path=DataContext.MyList}" MinHeight="70" Height="Auto" ScrollViewer.HorizontalScrollBarVisibility="Hidden"/>

If you have groupings in the GridDataControl then it behaves erratically when you add new data row into it. Sometimes it inserts blank rows and sometimes it breaks the group tree structure. It is aweful!

We have tested the sample on our end. The reported issue “Empty row is added while adding the data at the runtime” is reproduced on our end in the version 11.3. But this issue has been already fixed in our current version 12.3.0.36.

 

Please refer the sample in the following location:

If the query is different from our understanding, please share more information along with the attachment file. This would be helpful for further analysis.


Regards,

Farjana Parveen A


Attachment: Details_view_With_ListBox_Sample_and_Video_5672ce19.zip

Loader.
Up arrow icon