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

CrossTab

8 Answers 348 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Gusev
Top achievements
Rank 1
Gusev asked on 18 Mar 2013, 01:31 PM
Hello
I want to implement "CrossTable"!
I found an example from Telerik, but could not find from you!
Can I use something other than DataTable (gridBindingToDataTable)?
 
please help!
and sorry for my bad english!

8 Answers, 1 is accepted

Sort by
0
Vladimir Iliev
Telerik team
answered on 20 Mar 2013, 08:51 AM
Hi Gusev,

 
Basically the pivot grid functionality currently is not supported out-of-the-box, however I would suggest to vote for this idea at Kendo UserVoice. Most voted ideas are included in next KendoUI releases.

Kind Regards,
Vladimir Iliev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Gusev
Top achievements
Rank 1
answered on 20 Mar 2013, 10:41 AM
Hello!
Thanks for Help!
But can I use DataTable ?
@(Html.Kendo().Grid<System.Data.DataRow>(Model.Rows.Cast<System.Data.DataRow>())
    .Name("VolumetricStruct")
    .Columns(columns =>
    {
        foreach (System.Data.DataColumn column in Model.Columns)
        {
            columns.Bound(column.DataType, column.ColumnName).Title(column.ColumnName);
        }
        columns.Command(command =>
        {
            command.Edit();
            command.Destroy();
        }).Width(300).Title("Действия");
    })
    .Scrollable(s => s.Height(500))
    .DataSource(dataSource => dataSource
        .Ajax()
        .Model(model => model.Id("idDiameter"))
        .Read(read => read.Action("ReadVolumetricStruct", "VolumetricTable"))
        .Update(" ", " ")
        .Create(" ", " ")
        .Destroy(" ", " ")
    )
    .Editable(editable => editable.TemplateName("VolumetricTable").Mode(GridEditMode.PopUp))
)
To my regret, I get error A circular reference was detected while serializing if I use .Grid<System.Data.DataRow>(Model.Rows.Cast<System.Data.DataRow>

But if I use .Grid(Model)
I get Error : This request has been blocked because sensitive information could be disclosed
And I don't know that i must do :(

Please help if u can!
0
Vladimir Iliev
Telerik team
answered on 20 Mar 2013, 11:55 AM
Hi Gusev,

 
I would suggest to check the "Binding to DataTable" example in the CodeLibrary which demonstrates how to bind KendoUI Grid for ASP.NET MVC to a DataTable object. Also you can check the Grid documentation for more information about the issues that you mention:

  • More information about how to fix the "Circular reference" errors can be found in the Grid Troubleshooting article.
  • More information about the "The request has been blocked" errors can be found in the above article.

Kind Regards,
Vladimir Iliev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Gusev
Top achievements
Rank 1
answered on 21 Mar 2013, 12:03 PM
Hello!
Thanks for help and answer!
Can you show me on this example, how I can edit first or any field from first object?
Because I get Error: A circular reference was detected.... and this POST:"Error during serialization or deserialization using the JSON JavaScriptSerializer" don't help me!
And I can't use [scriptignore], because I don't know , where I need use him :)

Thanks for help!
Sorry for my bad English and sorry for my sad questions ))))
0
Gusev
Top achievements
Rank 1
answered on 21 Mar 2013, 12:22 PM
I corrected my mistakes.
Thanks for help

Soon I'll be back)
0
Gusev
Top achievements
Rank 1
answered on 03 Apr 2013, 02:26 PM
Hello!!!
I have a question!
I use this example:http://www.kendoui.com/code-library/mvc/grid/binding-to-datatable.aspx
Please show on this example how to edit object (row)

and next:
I have Model:
public class ShrinkCoeffModel
    {
        [Display(Name = "Толщина (мм)")]
        public virtual int Thickness { get; set; }
         
        [Display(Name = "Влажность (%)")]
        public virtual string[] Wetness { get; set; }
 
        [Display(Name = "Коэфф. усушки (мм)")]
        public virtual decimal[] Coeff { get; set; }
    }
and Grid:
@(
 Html.Kendo().Grid(Model)
                .Name("ShrinkCoeff")
                .ToolBar(commands =>
                {
                    commands.Create();
                })
                .Columns(columns =>
                {
                    columns.Bound(o => o.Thickness);
                    for (int i = 0; i < Model.FirstOrDefault().Wetness.Count(); i++)
                    {
                    columns.Bound(o => o.Wetness[i]);
                         
                    }
                    columns.Command(command =>
                    {
                        command.Edit();
                        command.Destroy();
                    }).Width(210).Title("Действия");
                })
                .Editable(editable => editable.TemplateName("Item").Mode(GridEditMode.PopUp))
                .DataSource(dataBinding => dataBinding
                    .Server()
                                                    .Model(model => model.Id(o => o.Thickness))
                                                        .Update("Edit", "ShrinkCoeff")
                                                        .Create("Create", "ShrinkCoeff")
                                                        .Destroy("Delete", "ShrinkCoeff"))
                .Pageable()
                .Sortable()
                .Selectable()
)
Why Grid dosn't want work with array(
How I can this do?
for (int i = 0; i < Model.FirstOrDefault().Wetness.Count(); i++)
                    {
                    columns.Bound(o => o.Wetness[i]);
                          
                    }

0
Vladimir Iliev
Telerik team
answered on 03 Apr 2013, 02:35 PM
Hi Gusev,

 
As this thread is out of the original topic, may I kindly ask you to open a new support thread for the appropriate product (KendoUI Grid in that case)? That way we will be able to help you straight away.

Kind Regards,
Vladimir Iliev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Gusev
Top achievements
Rank 1
answered on 04 Apr 2013, 09:46 AM
Tags
Grid
Asked by
Gusev
Top achievements
Rank 1
Answers by
Vladimir Iliev
Telerik team
Gusev
Top achievements
Rank 1
Share this question
or