CrossTab

9 posts, 0 answers
  1. Gusev
    Gusev avatar
    83 posts
    Member since:
    Dec 2012

    Posted 18 Mar 2013 Link to this post

    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!
  2. Vladimir Iliev
    Admin
    Vladimir Iliev avatar
    2194 posts

    Posted 20 Mar 2013 Link to this post

    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!
  3. Gusev
    Gusev avatar
    83 posts
    Member since:
    Dec 2012

    Posted 20 Mar 2013 Link to this post

    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!
  4. Vladimir Iliev
    Admin
    Vladimir Iliev avatar
    2194 posts

    Posted 20 Mar 2013 Link to this post

    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!
  5. Gusev
    Gusev avatar
    83 posts
    Member since:
    Dec 2012

    Posted 21 Mar 2013 Link to this post

    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 ))))
  6. Gusev
    Gusev avatar
    83 posts
    Member since:
    Dec 2012

    Posted 21 Mar 2013 Link to this post

    I corrected my mistakes.
    Thanks for help

    Soon I'll be back)
  7. Gusev
    Gusev avatar
    83 posts
    Member since:
    Dec 2012

    Posted 03 Apr 2013 Link to this post

    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]);
                              
                        }

  8. Vladimir Iliev
    Admin
    Vladimir Iliev avatar
    2194 posts

    Posted 03 Apr 2013 Link to this post

    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!
  9. Gusev
    Gusev avatar
    83 posts
    Member since:
    Dec 2012
Back to Top