This is a migrated thread and some comments may be shown as answers.

Grid Footer detail view too wide

9 Answers 60 Views
Grid
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Gerard Eikelboom
Top achievements
Rank 1
Gerard Eikelboom asked on 12 Jan 2011, 08:53 AM
Hello,
I have some strange (or not ) behaviour in my grid detail view.
When I click on the button to show the detailView in my grid it shows the details.
I also wanted to show the footer And that Is also not a problem.
The only thing is that the footer is wider than my table of the detailView.(see picture)
What I also see is that the colspan is 11. When I make it 10 it is exact as lonng as the table.
Here is my detailView:
OPColumns.Bound(op => op.Omschrijving)
                            .HeaderHtmlAttributes(new { title = "Description" }).Width(155);
                        OPColumns.Bound(op => op.S01)
                            .HeaderHtmlAttributes(new { title = "Quality" });
                        OPColumns.Bound(op => op.LandHerkomst);
                        OPColumns.Bound(op => op.MPS);
                        OPColumns.Bound(op => op.ProductInfo);
                        OPColumns.Bound(op => op.S02)
                            .HeaderHtmlAttributes(new { title = "Length" });
                        OPColumns.Bound(op => op.S03);
                        OPColumns.Bound(op => op.S04);
                        OPColumns.Bound(op => op.StelenPerEenheid);
                        OPColumns.Bound(op => op.VoorraadEenheden)
                            .HeaderHtmlAttributes(new { title = "Stock(unity)" });
                        OPColumns.Bound(op => op.LstregID).Hidden(true)
                            .HeaderHtmlAttributes(new { @style = "display: none" });

My last column is hidden.
When I make it vissible the footet matches the length of the table. But that last column must be hidden because I don't want it to be displayed.

Regards,
Gerard

9 Answers, 1 is accepted

Sort by
0
Atanas Korchev
Telerik team
answered on 12 Jan 2011, 09:09 AM
Hi Gerard Eikelboom,

 The problem is with the hidden column. The grid takes it into account when calculating the colspan. Perhaps there is a way to remove the hidden column altogether. If you are using ajax binding you can access the whole dataItem object on the client side depending on the row of the grid.

 We will log this issue and will try to fix it in the next service pack.

All the best,
Atanas Korchev
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Martín
Top achievements
Rank 1
answered on 18 Jan 2011, 06:25 PM
I couldn't find this bug in the Public Issue Tracking System.

When are you planning to fix this?

I've found the following work-around:

.Columns(cols=>
            {
                cols.Bound(l => l.ArticuloId)
                    .Hidden()
                    .FooterHtmlAttributes(new { @class = "hidden" });
                    ...
            });

And In my css file I have the following:

td.hidden
{
    display: none;
    width: 0pt;
}

Alternatively, the style can be set directly in the FootherHtmlAttributes:

                    .FooterHtmlAttributes(new { style = "display: none; width: 0pt" });

Regads,
Martín
0
Gerard Eikelboom
Top achievements
Rank 1
answered on 25 Jan 2011, 09:40 AM
Another solution for the hidden columns is:
remove the columns from the grid. Because you should have them also in your model. So they are  known.
To get the data from the specific row.

function onRowDataBound(e) {
            var row = e.row;
            if (row != undefined) {
                //hebben we nodig om niet meer gebruik te maken van hidden kolommen.
                var GridData = $('#VoorraadGrid').data('tGrid');
                var GridDataRow = GridData.$tbody.find('tr:eq(' + row.rowIndex + ')');
                var GridDataItems = GridData.dataItem(GridDataRow);
So in your GridDataItems there you should find your model.

Regards,
Gerard
0
David A.
Top achievements
Rank 1
answered on 03 Nov 2011, 05:32 AM
Hi,

I too am having this problem and I just downloaded the latest internal build (2011.2.1014.340)  I have a hidden column which is the group field that is causing the problem.  Is this going to be corrected in Q3?

Thank you,
David
0
Dimo
Telerik team
answered on 03 Nov 2011, 09:26 AM
Hello David,

I advise you to download the Q3 beta, which is now available and includes new implementation related to hidden columns. Let us know if you encounter a problem in your scenario.

Kind regards,
Dimo
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the Telerik Extensions for ASP.MET MVC, subscribe to their blog feed now
0
David A.
Top achievements
Rank 1
answered on 04 Nov 2011, 07:12 AM
Hi Dimo,

I tried the Q3 beta (2011.3.1027.340) and the footer renders properly with .Hidden(true) for two columns, unfortunately all of the other columns are not rendered properly.  The grouping-not-hidden.png refers to a proper layout without using Hidden(true)

David
0
Dimo
Telerik team
answered on 04 Nov 2011, 01:01 PM
Hi David,

Are you sure that you are testing with the Q3 beta? The described problem occurs with the previous release, not the beta. I am fiddling with the following demo and added two hidden columns:

http://demos.telerik.com/aspnet-mvc-beta/grid/grouping

Let me know if I am missing something.

Regards,
Dimo
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the Telerik Extensions for ASP.MET MVC, subscribe to their blog feed now
0
David A.
Top achievements
Rank 1
answered on 05 Nov 2011, 07:21 AM
Dimo,

I submitted a support ticket so I could send you a project.  I believe the problem lies when adding a grid aggregate column.

David
0
Dimo
Telerik team
answered on 07 Nov 2011, 02:28 PM
Hi David,

Thanks for sending a test project. You were right - the problem occurs when a group footer is rendered. We have fixed it.

Regards,
Dimo
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the Telerik Extensions for ASP.MET MVC, subscribe to their blog feed now
Tags
Grid
Asked by
Gerard Eikelboom
Top achievements
Rank 1
Answers by
Atanas Korchev
Telerik team
Martín
Top achievements
Rank 1
Gerard Eikelboom
Top achievements
Rank 1
David A.
Top achievements
Rank 1
Dimo
Telerik team
Share this question
or