Telerik Forums
Kendo UI for jQuery Forum
5 answers
184 views
We're trying to integrate PivotGrid with the XML/A server we use, Mondrian. Drill-down works fine, however there's a problem when PivotGrid needs to discover the dimensions/hierarchies. See the screenshot, PivotGrid enters into a loop when the user double-clicks on the dimensions to see the hierarchy and its levels. The screenshot also shows that the drill-down executes correctly discovering the levels.

Tracing on Mondrian side, we see that when the user initially double clicks on the dimension, PivotGrid sends a request to discover the hierarchies:

<?xml version="1.0" encoding="UTF-8"?>
<Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/">
   <Header />
   <Body>
      <Discover xmlns="urn:schemas-microsoft-com:xml-analysis">
         <RequestType>MDSCHEMA_HIERARCHIES</RequestType>
         <Restrictions>
            <RestrictionList>
               <CATALOG_NAME>FoodMart</CATALOG_NAME>
               <CUBE_NAME>Sales</CUBE_NAME>
               <DIMENSION_UNIQUE_NAME>[Product]</DIMENSION_UNIQUE_NAME>
            </RestrictionList>
         </Restrictions>
         <Properties>
            <PropertyList>
               <Catalog>FoodMart</Catalog>
            </PropertyList>
         </Properties>
      </Discover>
   </Body>
</Envelope>

Mondrian responds with the (one or more) hierarchies, but PivotGrid reiterates the same MDSCHEMA_HIERARCHIES request on and on. Mondrian never receives a MDSCHEMA_LEVELS request.


Please see below Mondrian's response to the MDSCHEMA_HIERARCHIES requests. Please let us know if you need further information.


Thanks
Walter




  <?xml version="1.0" encoding="ISO-8859-1"?>
  <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" >
  <SOAP-ENV:Header>
  </SOAP-ENV:Header>
  <SOAP-ENV:Body>
  <cxmla:DiscoverResponse xmlns:cxmla="urn:schemas-microsoft-com:xml-analysis">

    <cxmla:return>

      <root xmlns="urn:schemas-microsoft-com:xml-analysis:rowset" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:EX="urn:schemas-microsoft-com:xml-analysis:exception">

        <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="urn:schemas-microsoft-com:xml-analysis:rowset" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:sql="urn:schemas-microsoft-com:xml-sql" targetNamespace="urn:schemas-microsoft-com:xml-analysis:rowset" elementFormDefault="qualified">

          <xsd:element name="root">

            <xsd:complexType>

              <xsd:sequence>

                <xsd:element name="row" type="row" minOccurs="0" maxOccurs="unbounded"/>

              </xsd:sequence>

            </xsd:complexType>

          </xsd:element>

          <xsd:simpleType name="uuid">

            <xsd:restriction base="xsd:string">

              <xsd:pattern value="[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}"/>

            </xsd:restriction>

          </xsd:simpleType>

          <xsd:complexType name="row">

            <xsd:sequence>

              <xsd:element sql:field="CATALOG_NAME" name="CATALOG_NAME" type="xsd:string" minOccurs="0"/>

              <xsd:element sql:field="SCHEMA_NAME" name="SCHEMA_NAME" type="xsd:string" minOccurs="0"/>

              <xsd:element sql:field="CUBE_NAME" name="CUBE_NAME" type="xsd:string"/>

              <xsd:element sql:field="DIMENSION_UNIQUE_NAME" name="DIMENSION_UNIQUE_NAME" type="xsd:string"/>

              <xsd:element sql:field="HIERARCHY_NAME" name="HIERARCHY_NAME" type="xsd:string"/>

              <xsd:element sql:field="HIERARCHY_UNIQUE_NAME" name="HIERARCHY_UNIQUE_NAME" type="xsd:string"/>

              <xsd:element sql:field="HIERARCHY_GUID" name="HIERARCHY_GUID" type="uuid" minOccurs="0"/>

              <xsd:element sql:field="HIERARCHY_CAPTION" name="HIERARCHY_CAPTION" type="xsd:string"/>

              <xsd:element sql:field="DIMENSION_TYPE" name="DIMENSION_TYPE" type="xsd:short"/>

              <xsd:element sql:field="HIERARCHY_CARDINALITY" name="HIERARCHY_CARDINALITY" type="xsd:unsignedInt"/>

              <xsd:element sql:field="DEFAULT_MEMBER" name="DEFAULT_MEMBER" type="xsd:string" minOccurs="0"/>

              <xsd:element sql:field="ALL_MEMBER" name="ALL_MEMBER" type="xsd:string" minOccurs="0"/>

              <xsd:element sql:field="DESCRIPTION" name="DESCRIPTION" type="xsd:string" minOccurs="0"/>

              <xsd:element sql:field="STRUCTURE" name="STRUCTURE" type="xsd:short"/>

              <xsd:element sql:field="IS_VIRTUAL" name="IS_VIRTUAL" type="xsd:boolean"/>

              <xsd:element sql:field="IS_READWRITE" name="IS_READWRITE" type="xsd:boolean"/>

              <xsd:element sql:field="DIMENSION_UNIQUE_SETTINGS" name="DIMENSION_UNIQUE_SETTINGS" type="xsd:int"/>

              <xsd:element sql:field="DIMENSION_IS_VISIBLE" name="DIMENSION_IS_VISIBLE" type="xsd:boolean"/>

              <xsd:element sql:field="HIERARCHY_IS_VISIBLE" name="HIERARCHY_IS_VISIBLE" type="xsd:boolean"/>

              <xsd:element sql:field="HIERARCHY_ORDINAL" name="HIERARCHY_ORDINAL" type="xsd:unsignedInt"/>

              <xsd:element sql:field="DIMENSION_IS_SHARED" name="DIMENSION_IS_SHARED" type="xsd:boolean"/>

              <xsd:element sql:field="PARENT_CHILD" name="PARENT_CHILD" type="xsd:boolean" minOccurs="0"/>

              <xsd:element sql:field="LEVELS" name="LEVELS" minOccurs="0"/>

            </xsd:sequence>

          </xsd:complexType>

        </xsd:schema>

        <row>

          <CATALOG_NAME>FoodMart</CATALOG_NAME>

          <SCHEMA_NAME>FoodMart</SCHEMA_NAME>

          <CUBE_NAME>Sales</CUBE_NAME>

          <DIMENSION_UNIQUE_NAME>[Product]</DIMENSION_UNIQUE_NAME>

          <HIERARCHY_NAME>Product</HIERARCHY_NAME>

          <HIERARCHY_UNIQUE_NAME>[Product]</HIERARCHY_UNIQUE_NAME>

          <HIERARCHY_CAPTION>Product</HIERARCHY_CAPTION>

          <DIMENSION_TYPE>3</DIMENSION_TYPE>

          <HIERARCHY_CARDINALITY>2256</HIERARCHY_CARDINALITY>

          <DEFAULT_MEMBER>[Product].[All Products]</DEFAULT_MEMBER>

          <ALL_MEMBER>[Product].[All Products]</ALL_MEMBER>

          <DESCRIPTION>Sales Cube - Product Hierarchy</DESCRIPTION>

          <STRUCTURE>0</STRUCTURE>

          <IS_VIRTUAL>false</IS_VIRTUAL>

          <IS_READWRITE>false</IS_READWRITE>

          <DIMENSION_UNIQUE_SETTINGS>0</DIMENSION_UNIQUE_SETTINGS>

          <DIMENSION_IS_VISIBLE>true</DIMENSION_IS_VISIBLE>

          <HIERARCHY_IS_VISIBLE>true</HIERARCHY_IS_VISIBLE>

          <HIERARCHY_ORDINAL>6</HIERARCHY_ORDINAL>

          <DIMENSION_IS_SHARED>true</DIMENSION_IS_SHARED>

          <PARENT_CHILD>false</PARENT_CHILD>

        </row>

      </root>

    </cxmla:return>

  </cxmla:DiscoverResponse>
  </SOAP-ENV:Body>
  </SOAP-ENV:Envelope>


Georgi Krustev
Telerik team
 answered on 16 Mar 2015
1 answer
1.4K+ views
Hello,

I am trying to get Kendo Grid to make a RESTful call after performing an in-line row edit. The call happens but it doesn't successfully make it's way to my spring-boot end-point, I keep getting a 400 Bad Request.

[KENDO CODE]
                    var dataSource = new kendo.data.DataSource({
                        transport: {
                            read:  {
                                url: "/customers",
                                type: 'GET',
                                dataType: "json"
                            },
                            update: {
                                url: "/customers/update",
                                type: 'PUT',
                                contentType: "application/json",
                                dataType: "json"
                            },
                            destroy: {
                                url: "/customers/destroy",
                                dataType: "json"
                            },
                            create: {
                                url: "/customers/create",
                                dataType: "json"
                            },
                            parameterMap: function(options, operation) {
                                if (operation !== "read" && options.models) {
                                    return {models : kendo.stringify(options.models)};
                                }
                            }
                        },
                        batch: true,
                        pageSize: 20,
                        schema: {
                            model: {
                                id: "id",
                                fields: myFields
                            }
                        }
                    });                
               
                    $("#grid").kendoGrid({
                        dataSource: dataSource,
                        height: 550,
                        groupable: true,
                        sortable: true,
                        editable: true,
                        filterable: {
                            extra: false,
                            operators: {
                                string: {
                                    startswith: "Starts with",
                                    eq: "Is equal to",
                                    neq: "Is not equal to"
                                }
                            }
                        },                        
                        pageable: {
                            refresh: true,
                            pageSizes: true,
                            buttonCount: 5
                        },
                        toolbar: ["create", "save", "cancel"],
                        columns: myColumns
                    });

[SPRING-BOOT CODE]
@RestController
@RequestMapping(value="/customers")
  public class CustomerRestController {
  @RequestMapping(value="/update", method = RequestMethod.PUT)
    public @ResponseBody List<Customer> update(@RequestBody List<Customer> cust) {
    ...
  }
}

[THE ERROR]
251{"timestamp":1426123694014,"status":400,"error":"Bad Request","exception":"org.springframework.http.converter.HttpMessageNotReadableException","message":"Could not read JSON: Unrecognized token 'models': was expecting ('true', 'false' or 'null')\n at [Source: org.apache.catalina.connector.CoyoteInputStream@735e34; line: 1, column: 8]; nested exception is com.fasterxml.jackson.core.JsonParseException: Unrecognized token 'models': was expecting ('true', 'false' or 'null')\n at [Source: org.apache.catalina.connector.CoyoteInputStream@735e34; line: 1, column: 8]","path":"/customers/update"}0
Atanas Korchev
Telerik team
 answered on 16 Mar 2015
1 answer
86 views
http://dojo.telerik.com/etIwa/2


<input id="maskedtextbox" />

<script>
var m = "0ba";
// this should limit the first character to 0-9, the second to 0-5, and the third to 0-2
// but enter the following:
// 9
// left arrow
// 2
// left arrow
// 3
// left arrow
// 8
// left arrow
// 9
// leaves us with "983" - only the first character is "valid"
// basically, after you left arrow it will "push" the existing characters to the right (sometimes, not always) when the next character is entered

$("#maskedtextbox").kendoMaskedTextBox({
mask: m,
    rules: {
      // "0" allows 0-9
      "b": function (char) {
        return (char === "0" || char === "1" || char === "2" || 
                    char === "3" || char === "4" || char === "5");
      },
      "a": function (char) {
        return (char === "0" || char === "1" || char === "2");
      }
    }
});
</script>
Georgi Krustev
Telerik team
 answered on 16 Mar 2015
6 answers
1.2K+ views
Im using Kendo Grid And Kendo Window.. On click of Edit in Kendo Grid, Need to populate a kendo window which consists of Textboxes.. Im not using the editable"popup" because there is a grid in Kendo Window. Anyways.. Here Is my Window

 if (window != null) {
                     
                        if (!window.data("kendoWindow")) {
                            window.kendoWindow({
                                visible: true
                                , resizable: false
                               
                                , content:' /api/Foo/'
                                , modal: true
                                , actions: ["Close"],
                                close: function (e) {
                                }
                            });
                        }
Im currently getting data from Kendo selected row of kendo grid. I just need to put it into the textboxes/ddls in the Window. Creating a record using the data from the window  is completed. i.e Able to get the data from window.. Dont know how to put the data into the window. Please help !Thanks! 
   



























Im using Kendo Grid And Kendo Window.. On click of Edit in Kendo Grid, Need to populate a kendo window which consists of Textboxes.. Im not using the editable"popup" because there is a grid in Kendo Window. Anyways.. Here Is my Window

                        if (!window.data("kendoWindow")) {
                            window.kendoWindow({
                                visible: true
                                , resizable: false
                              //, content:' /api/Info/'
                                , modal: true
                                , actions: ["Close"],
                                close: function (e) {
                                }
                            });
                        }

                            window.data("kendoWindow").title(header);
                            window.data("kendoWindow").center();
                            window.data("kendoWindow").open();
                    }

Im currently getting Data from the selected Row of Kendo Grid. What I need to do is just populate the Kendo Window with the data.. I tried using the - content:"api/foo" But its not working.. I think I need to explicitly set the textBox values..How Do I do that?! Please Help ! Thanks!

Im using Kendo Grid And Kendo Window.. On click of Edit in Kendo Grid, Need to populate a kendo window which consists of Textboxes.. Im not using the editable"popup" because there is a grid in Kendo Window. Anyways.. Here Is my Window

                        if (!window.data("kendoWindow")) {
                            window.kendoWindow({
                                visible: true
                                , resizable: false
                              //, content:' /api/Info/'
                                , modal: true
                                , actions: ["Close"],
                                close: function (e) {
                                }
                            });
                        }

                            window.data("kendoWindow").title(header);
                            window.data("kendoWindow").center();
                            window.data("kendoWindow").open();
                    }

Im currently getting Data from the selected Row of Kendo Grid. What I need to do is just populate the Kendo Window with the data.. I tried using the - content:"api/foo" But its not working.. I think I need to explicitly set the textBox values..How Do I do that?! Please Help ! Thanks!

Im using Kendo Grid And Kendo Window.. On click of Edit in Kendo Grid, Need to populate a kendo window which consists of Textboxes.. Im not using the editable"popup" because there is a grid in Kendo Window. Anyways.. Here Is my Window

                        if (!window.data("kendoWindow")) {
                            window.kendoWindow({
                                visible: true
                                , resizable: false
                              //, content:' /api/Info/'
                                , modal: true
                                , actions: ["Close"],
                                close: function (e) {
                                }
                            });
                        }

                            window.data("kendoWindow").title(header);
                            window.data("kendoWindow").center();
                            window.data("kendoWindow").open();
                    }

Im currently getting Data from the selected Row of Kendo Grid. What I need to do is just populate the Kendo Window with the data.. I tried using the - content:"api/foo" But its not working.. I think I need to explicitly set the textBox values..How Do I do that?! Please Help ! Thanks!

bharath
Top achievements
Rank 1
 answered on 16 Mar 2015
4 answers
569 views
Hi.
In response from server (which function return Json(some_records, JsonRequestBehavior.AllowGet)) I have field:
TestDate: "2015-03-11T02:10:27.8278798+05:00"
If I don't specify 'schema' for kendo-grid then TestDate colimn's cells displays string values 'as is'. There not enable date formating, sorting and filtering, of course.
But when I specify
    schema  : {
            model: {
                fields: {
                    TestDate: { type: 'date' }
                }
            }
        }
all column's cells values become empty.
Why is that?
I've tried specify format and parseFormats - it's not working.
Template "#= kendo.parseDate(TestDate, 'yyyy-MM-ddTHH:mm:ss.fffZ') #" for column returns 'null' everytime (with any parse format I set).
I get example here http://jsfiddle.net/OnaBai/Ahq6s/ and input "2015-03-11T02:10:27.8278798+05:00" in date field.. and it works!

After hours I come up with a solution - specify template "#= new Date(TestDate).format('dd.mm.yyyy') #".
Huray, my TestDate is displayed! But only if I don't specify TestDate type in schema.model.fields. And without that I don't have date options in filtering menu, for example.
What I do wrong?

P.S. Oh, and one more thing. In demo http://demos.telerik.com/kendo-ui/grid/filter-row we see 4 column specified in code and only 3 columns in visual grid.
Guess, which column is not displayed? Yup, 'OrderDate' with type: 'date' in schema.model.fields description. Same result in Dojo.
I don't know what to think.

P.P.S. Sorry for my English.
Vitaly
Top achievements
Rank 1
 answered on 16 Mar 2015
1 answer
85 views
I am very new to kendo. When I am writing an event in my grid the intellisence is not showing .datasource method. Am I missing something?

.Events(e => e.FilterMenuInit("OnGridChange"))


    function OnGridChange(e) {
var gridData = $("#grid").data("kendoGrid");
var currFilter = grid.dataSource.filter();}
      
Vladimir Iliev
Telerik team
 answered on 16 Mar 2015
4 answers
144 views
It worked yesterday, but not today. I didn't make any changes. Now it always displays "No items to display". I'm getting towards the end of my trial period (got a message when I loaded Visual Studio). Could that have something to do with it?

Here's the grid definition in the view:

@(Html.Kendo().Grid<CapEdit2.Models.Report>()
    .Name("SearchResultsGrid")
    .DataSource(ds => ds
        .Ajax()
        .Read(read => read
            .Action("GetSearchResults", "Report").Data("reportsReadData")
        )
        .PageSize(10)
    )
    .Columns(columns => 
    {
        columns.Bound(r => r.Id);
        columns.Bound(r => r.TransDate).Title("Trans Date").Format("{0:MM-dd-yyyy}"); 
        columns.Bound(r => r.Corporation.Name).Title("Corporation"); 
        columns.Bound(r => r.Headline); 
    })
    .Pageable()
    .Sortable()
)


Here's the server-side code that gets the data for the grid (I can see that it's working fine):

        public ActionResult GetSearchResults([DataSourceRequest]DataSourceRequest request, string company, DateTime startDate, DateTime endDate)
        {

            var context = new CapInternalContext();

            var query = (IQueryable<Report>)context.Reports
                    .Include("Corporation")
                    .Include("Stages");  

            var result = this.Json(query.ToDataSourceResult(request));
            return result; // I put a break point here, and always see results
        }

Thanks for your help!

Mike
Mike
Top achievements
Rank 1
 answered on 15 Mar 2015
2 answers
897 views
I have two group of columns, i.e. Group A and Group B. I would like to make cells in Group A selectable, but keep cells in Group B not selectable. 
Is there a way to do it? 

Thank you for any suggestion.

Jerry
Jerry
Top achievements
Rank 1
 answered on 13 Mar 2015
2 answers
126 views
We are using a DataSource with local data (nothing remote), and we dynamically change the PageSize of the DataSource. We do this by starting out the view showing 20 results, and as the user scrolls down the page, we automatically expand the PageSize by 10, thereby copying an endless scroll kind of functionality.

var arr = [
   new Vehicle(1),
   new Vehicle(2),
   new Vehicle(3)
];
var vehicles = new kendo.data.DataSource({ data: arr, pageSize: 20 });
 
//if user scrolls to bottom, then:
vehicles.pageSize(vehicles.pageSize() + 10)

The problem with this is that I've noticed that on every change of the PageSize, Kendo redraws every item on the page, even though many items on the page are already drawn. So as you scroll down the page, the PageSize is getting larger and larger, and Kendo is redrawing every time. If you scroll down to where the PageSize is 100 and beyond, it takes longer and longer for it to redraw every item. Is there some way to tell Kendo to not redraw items that are already drawn?
JohnVS
Top achievements
Rank 1
 answered on 13 Mar 2015
5 answers
384 views
I attempted using panels and that was disastrous and then I attempted using an accordion based on bootstrap collaspe and am getting an invalid template issue and the pop up is no longer loading.

Could someone please point me to what a "valid" template looks like so I can attempt to work this in. Or show me a simple example?

Thanks,
Chris 
Chris
Top achievements
Rank 1
 answered on 13 Mar 2015
Narrow your results
Selected tags
Tags
Grid
General Discussions
Charts
Data Source
Scheduler
DropDownList
TreeView
MVVM
Editor
Window
DatePicker
Spreadsheet
Upload
ListView (Mobile)
ComboBox
TabStrip
MultiSelect
AutoComplete
ListView
Menu
Templates
Gantt
Validation
TreeList
Diagram
NumericTextBox
Splitter
PanelBar
Application
Map
Drag and Drop
ToolTip
Calendar
PivotGrid
ScrollView (Mobile)
Toolbar
TabStrip (Mobile)
Slider
Button (Mobile)
Filter
SPA
Drawing API
Drawer (Mobile)
Globalization
LinearGauge
Sortable
ModalView
Hierarchical Data Source
Button
FileManager
MaskedTextBox
View
Form
NavBar
Notification
Switch (Mobile)
SplitView
ListBox
DropDownTree
PDFViewer
Sparkline
ActionSheet
TileLayout
PopOver (Mobile)
TreeMap
ButtonGroup
ColorPicker
Pager
Styling
Chat
MultiColumnComboBox
Dialog
DateRangePicker
Checkbox
Timeline
Drawer
DateInput
ProgressBar
MediaPlayer
ImageEditor
TextBox
OrgChart
Accessibility
Effects
PivotGridV2
Licensing
ScrollView
Switch
TextArea
BulletChart
QRCode
ResponsivePanel
Wizard
CheckBoxGroup
Localization
Barcode
Breadcrumb
Collapsible
MultiViewCalendar
Touch
RadioButton
Stepper
Card
ExpansionPanel
Rating
RadioGroup
Badge
Captcha
Heatmap
AppBar
Loader
Security
TaskBoard
Popover
DockManager
TimePicker
FloatingActionButton
CircularGauge
ColorGradient
ColorPalette
DropDownButton
TimeDurationPicker
ToggleButton
BottomNavigation
Ripple
SkeletonContainer
Avatar
Circular ProgressBar
FlatColorPicker
SplitButton
Signature
Chip
ChipList
VS Code Extension
AIPrompt
PropertyGrid
Sankey
Chart Wizard
OTP Input
SpeechToTextButton
InlineAIPrompt
StockChart
ContextMenu
DateTimePicker
RadialGauge
ArcGauge
AICodingAssistant
SmartPasteButton
PromptBox
SegmentedControl
+? more
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?