Telerik Forums
KendoReact Forum
1 answer
124 views

 

Hi Support,

I just wondering on how to change the date format on Scheduler components (look picture below, those start and end section). At the moment my date format is coming up as month/day/year, but what i want is day/month/year.

 

This is the KendoUI React Scheduler i am using on my code. 

 

I tried to look at  your api online but still couldn't get the solutions. Please give me advice.

 

Thanks

 

John

 

 

 

Konstantin Dikov
Telerik team
 answered on 12 Feb 2024
2 answers
85 views
Hello.

I am trying to use your react grid with data passed in as props with filtering and sorting. I am following this article as a guide - https://www.telerik.com/blogs/sorting-filtering-grouping-kendoreact-data-grid. My issue is that when I pass the data in via props, it does not initially appear. If I actually try filtering, the data will show up. My issue is here -

 const [resultState, setResultState] = React.useState(
   process(props.gridData, initialDataState)
 );

This does not seem to work on the initial rendering of the component. Again, when I start filtering, everything shows up properly. I have read that using props to set an initial state is considered an anti-pattern. Thus, I know something is off here.

Almost all of your examples use data from a json file. However, I have retrieved my data from a rest endpoint and I'm passing it in to my grid component via props.

If I simply use the grid without filtering and sorting with the data passed in as props, everything works fine. However, I would like to use your filtering and sorting capabilities.

Please help

Thanks
Sunil
Top achievements
Rank 1
Iron
 answered on 07 Feb 2024
1 answer
72 views

Hi

I'm using kendo-react-treelist v. 3.18.0 and navigatable prop is not there for TreeList.
Which version was it added in?

Thanks

Vlad

Wissam
Telerik team
 answered on 07 Feb 2024
1 answer
68 views

Hi,

I am trying to get this grid to display the TEST message in the detail when I click the expander against the row.  Everything looks to be working as expected (I am using state.fetchErrorMsg to provide debug text to prove that state is changing and triggering re-rendering when necessary, I can also confirm that the expander toggles between + and - as expected).

Any ideas what I am doing wrong here?  I suspect it is something to do with how I am handling the promise that returns the data, since I can get this working when I use locally built static arrays instead of the fetch.

Cheers

Mike

import React, { useEffect, useState } from 'react';
import { UserInfo, TcbObjMilestoneGrp, TcbObjInfo } from '../../models/models';
import { loadingDiv } from '../../functions/componentFunctions';
import { Grid, GridColumn, GridExpandChangeEvent,  GridDetailRowProps } from '@progress/kendo-react-grid';
import './TcbObjMilestones.css';

type TcbObjMilestonesProps = {
    tcbObj: TcbObjInfo;
    userInf: UserInfo;
}

type TcbObjMilestonesState = {
    milestoneList: TcbObjMilestoneGrp[];
    milestonesFetched: boolean;
    fetchError: boolean;
    fetchErrorMsg: string;
    fetchInProg: boolean;
}

function TcbObjMilestones(props: TcbObjMilestonesProps) { 

    const [state, setState] = useState<TcbObjMilestonesState>({
        milestoneList: [],
        milestonesFetched: false,
        fetchError: false,
        fetchErrorMsg: '',
        fetchInProg: false
    });

    useEffect(() => {

        state.fetchErrorMsg = 'FetchInProg';
        state.fetchInProg = true;
        setState({ ...state});

        let url = props.userInf.currProject.apiUrl + '/api/details/GetTcbObjMilestones';

        fetch(url, { method: 'POST', body: JSON.stringify(props.tcbObj), headers: { 'Content-Type': 'application/json', 'Authorization': 'Bearer ' + props.userInf.token } })
            .then(resp => resp.json())
            .then(res => {
                switch (res.callStatus) {
                    case "OK":
                        let ml: Array<TcbObjMilestoneGrp> = res.results;

                        state.fetchErrorMsg = 'Got MilestoneData '
                        state.milestoneList = ml;
                        state.milestonesFetched = true;
                        state.fetchInProg = false;
                        setState({ ...state });

                        break;
                    case "UNAUTH":
                        let uInf: UserInfo = { ...props.userInf, isAuthorised: false };

                        state.fetchInProg = false;
                        setState({ ...state });
                        break;

                    default:
                        state.fetchInProg = false;
                        state.fetchError = true;
                        state.fetchErrorMsg = res.callStatusMessage;

                        setState({ ...state });

                }
            })
            .catch(err => {
                state.fetchInProg = false;
                state.fetchError = true;
                state.fetchErrorMsg = 'Error fetching Item Details - ' + err.toString();
                setState({ ...state });
            });
    }, []);


  
    const expandGrpChange = (e: GridExpandChangeEvent) => {
        let dr: TcbObjMilestoneGrp = e.dataItem;
        let ml = state.milestoneList;
        let mlg = ml.find(x => x.milestoneId === dr.milestoneId)!;
        mlg.isExpanded = !e.dataItem.isExpanded;
   

        state.fetchErrorMsg = 'Expanded ' + mlg.isExpanded;
        setState({ ...state});

    }

    const renderMilestoneDetails = (e: GridDetailRowProps) => {
        return (<section><p>TEST</p></section>);

    };


     if (state.fetchInProg)
        return loadingDiv();

        let formatStr = "{0:dd-MMM-yyyy HH:mm }";

        return (
            <>
            <p>{state.fetchErrorMsg}</p>
            <Grid
                data={state.milestoneList}
                detail={renderMilestoneDetails}
                expandField="isExpanded"
                onExpandChange={expandGrpChange}
                resizable
            >
                <GridColumn field="milestoneDesc" title="Milestone" className="TcbObjMilestoneGridMainCell" />
                <GridColumn field="latestMilestoneDate" title="Latest" format={formatStr} width="120px" className="TcbObjMilestoneGridCell" />
                <GridColumn field="latestSource" title="Source" width="90px" className="TcbObjMilestoneGridCell" />
            </Grid>
            </>
        );
    }
    
export default TcbObjMilestones;


Michael
Top achievements
Rank 1
Iron
 answered on 07 Feb 2024
1 answer
95 views

Hello,

     I'm running into an issue with a custom GridColumnMenuFilter cell.  The component is very simple:

import * as React from "react";
import {
  GridColumnMenuFilter,
  GridColumnMenuProps,
} from "@progress/kendo-react-grid";

export default function ColumnMenu(props: GridColumnMenuProps) {
  return (
    <div>
      <GridColumnMenuFilter {...props} expanded={true} />
    </div>
  );
};

I'm trying to get this to work within the Master headers on a Master/Detail grid.  Previously the grid was not a Master/Detail grid and the filter popup was working fine, however when it was refactored to a Master/Detail grid the filter popups are not being displayed when the sideways elipsis is clicked.  Unfortunately no js errors are being reported in the browser console, there is just a warning about a stylesheet not loading in time.  My question is, are custom GridColumnMenuFilter cells, or any filtering at all, supported in a Master/Detail grid?  If so, is there anything specific we would need to do to enable this?

Any assistance is definitely appreciated.

Thanks,

Paul Johnson

Konstantin Dikov
Telerik team
 answered on 05 Feb 2024
1 answer
66 views
Hello, I have been trying to change a simple Input Custom that I call from the <Field /> but it does'nt allow FillMode ={"outline"} and I could'nt change it from scss either. I don't know if I am having any direct problems from kendo material, any example? maybe I'm doing it wrong. (The Textbox component allows me but I'm not using it in the form)
Konstantin Dikov
Telerik team
 answered on 05 Feb 2024
1 answer
137 views

I wanted to add data grid in my existing project. where all the dependencies are installed with yarn
so I installed the kendo-react-grid dependency with yarn and i am getting the error.

here is the code. 

 

import * as React from "react";import * as ReactDOM from "react-dom";import { Grid, GridColumn } from "@progress/kendo-react-grid";import products from "./products.json";
export const KindoRactApp = () => {  return (    <Grid style={{ height: "400px" }} data={products}>      <GridColumn field="ProductID" title="ID" width="40px" />      <GridColumn field="ProductName" title="Name" width="250px" />      <GridColumn field="Category.CategoryName" title="CategoryName" />      <GridColumn field="UnitPrice" title="Price" />      <GridColumn field="UnitsInStock" title="In stock" />    </Grid>  );};

 

 

this is the error 

image

Vessy
Telerik team
 answered on 05 Feb 2024
1 answer
75 views

Hello,

When the scheduler is configured with the timezone, the Day View should show the today's date of the timezone when clicking on the Today button at the top left calendar but it's showing 1 day less.

Stackblitz demo

 

 

 

Wissam
Telerik team
 answered on 02 Feb 2024
0 answers
60 views

I have found a perfection for my requirements

- A dropdown of selection insert none-editable peace of text

- The text should not be change

- The text should be style able

But there is a problem, when select the uneditable span when stand alone in a line. It cannot be styled. I think it's because of  the contenteditable dissmiss with user-selection:none dismiss any style change.

Here  is thee related question. You can scroll down at the end to find the solution.

Custom dropdownlist in toolbar of Kendo React Editor in KendoReact | Telerik Forums

Nguyen
Top achievements
Rank 1
 asked on 02 Feb 2024
0 answers
76 views
I wanted to add data grid in my existing project. where all the dependencies are installed with yarn
so I installed the kendo-react-grid dependency with yarn and i am getting the error.

here is the code. 

import * as React from "react"; import * as ReactDOM from "react-dom"; import { Grid, GridColumn } from "@progress/kendo-react-grid"; import products from "./products.json";

export const KindoRactApp = () => {
  return (
    <Grid style={{ height: "400px" }} data={products}>
      <GridColumn field="ProductID" title="ID" width="40px" />
      <GridColumn field="ProductName" title="Name" width="250px" />
      <GridColumn field="Category.CategoryName" title="CategoryName" />
      <GridColumn field="UnitPrice" title="Price" />
      <GridColumn field="UnitsInStock" title="In stock" />
    </Grid>
  );
};


this is the error 

  
Prafulla
Top achievements
Rank 1
 asked on 01 Feb 2024
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?