Telerik Forums
KendoReact Forum
1 answer
131 views

Hello Telerik, 

Is there any way to make child elements load on demand only in expand event, and control the expand status depending on data?

Filip
Telerik team
 answered on 30 Nov 2023
0 answers
171 views

Hello KendoReact Team,

is there an example that shows how to fully customise a numeric filter cell? I have the case that I need a filter cell for integers and one for decimals. The creation of the component is done, but I can't find an example that also implies the filter operator. The following questions arise from the problem.

1. Where can I view all the CSS classes of KendoReact that I can use for component styling? E.g. `k-icon k-i-filter-clear k-buttonicon` With this class I can style a clear button, including automatic assignment of the icon.

2. Which element is necessary to display the selection list of the filter operator?

3. Is it possible to implement the filter element in the standard display?

 

Thank you for the help

Screen capture

 

Code

import { NumericTextBox, NumericTextBoxChangeEvent } from "@progress/kendo-react-inputs";
import { GridFilterCellProps } from "@progress/kendo-react-grid";
import { Button } from "@progress/kendo-react-buttons";
import React, { useState } from "react";
import { DropDownList } from "@progress/kendo-react-dropdowns/dist/npm/DropDownList/DropDownList";
import { DropDownListChangeEvent } from "@progress/kendo-react-dropdowns";

type CustomNumericFilterCellProps = {
  gridFilterCellProps: GridFilterCellProps;
  format: string;
};

type NumericFilterOperatorType = {
  text: string;
  operator: string;
};

const numericFilterOperators: NumericFilterOperatorType[] = [
  { text: "Is equal to", operator: "eq" },
  { text: "Is not equal to", operator: "neq" },
  { text: "Is greater than or equal", operator: "gte" },
  { text: "Is greater than", operator: "gt" },
  { text: "Is less than or equal", operator: "lte" },
  { text: "Is less than", operator: "lt" },
  { text: "Is null", operator: "isnull" },
  { text: "Is not null", operator: "isnotnull" },
];

export const CustomNumericFilterCell = ({
  gridFilterCellProps,
  format,
}: CustomNumericFilterCellProps) => {
  const { onChange: filterCellPropsOnChange } = gridFilterCellProps;

  const [filterCellValue, setFilterCellValue] = useState<number | null>(null);
  const [isFilterActive, setIsFilterActive] = useState<boolean>(false);
  const [selectedOperator, setSelectedOperator] = useState<NumericFilterOperatorType>(
    numericFilterOperators[0]
  );

  const numericTextBoxOnChange = (event: NumericTextBoxChangeEvent) => {
    const { value: filterValue } = event.target;
    setFilterCellValue(filterValue);
    setIsFilterActive(true);

    filterCellPropsOnChange({
      value: filterValue,
      operator: filterValue ? selectedOperator.operator : "",
      syntheticEvent: event.syntheticEvent,
    });
  };

  const onButtonClearClick = (event: React.MouseEvent<HTMLButtonElement, MouseEvent>) => {
    event.preventDefault();
    setFilterCellValue(null);
    setIsFilterActive(false);
    setSelectedOperator(numericFilterOperators[0]);

    filterCellPropsOnChange({
      value: "",
      operator: "",
      syntheticEvent: event,
    });
  };

  const dropdownlistOnChange = (event: DropDownListChangeEvent) => {
    const operator = event.value as NumericFilterOperatorType;
    setSelectedOperator(operator);
  };

  return (
    <div className="k-filtercell">
      <NumericTextBox onChange={numericTextBoxOnChange} format={format} value={filterCellValue} />

      <DropDownList
        data={numericFilterOperators}
        textField="text"
        dataItemKey="operator"
        onChange={dropdownlistOnChange}
        value={numericFilterOperators.find((item) => item.operator === selectedOperator.operator)}
        className="k-button k-filtercell-clear"
        popupSettings={{ width: "180px" }}
      />

      <Button title="Clear" onClick={onButtonClearClick}>
        <span
          className={`k-icon k-i-filter-clear k-button-icon ${
            !isFilterActive ? "k-disabled" : "k-clear-button-visible"
          }`}
        />
      </Button>
    </div>
  );
};

 

Christian
Top achievements
Rank 1
Iron
Iron
Iron
 updated question on 27 Nov 2023
1 answer
329 views

I've been working with the UI for React library and, specifically, the Dropdown component. Unfortunately, I've encountered an issue where the dropdown is not functioning as expected. When I attempt to select an option, the dropdown doesn't respond, and the selected value isn't reflected. I've reviewed the documentation and examples, but I couldn't find a solution to my specific problem. I've also checked my implementation against best practices, but the issue persists.

If anyone in the community has faced a similar problem or has insights into troubleshooting the React Dropdown component, I would greatly appreciate your assistance.

Konstantin Dikov
Telerik team
 answered on 24 Nov 2023
1 answer
239 views
I have six columns in the grid. I have to perform incell edit  in the grid.  when i click on each cell, i want to display a custom dropdown in 2 columns & custom check boxes in 2 columns & text boxes in 2 columns.  I tried this example,  https://www.telerik.com/kendo-react-ui/components/grid/editing/editing-in-cell/ . but the problem i am facing is if i click on any cell, all the cells in the row is getting enabled.  Kindly help me.
Konstantin Dikov
Telerik team
 answered on 23 Nov 2023
2 answers
1.7K+ views

Hi,

How to responsive columns kendo grid react view on mobile.

same : https://demos.telerik.com/kendo-ui/grid/responsive-columns

Thanks for any help.

Hiba
Top achievements
Rank 1
Iron
 answered on 22 Nov 2023
1 answer
1.8K+ views
It is possible to repeat a header and footer for every page in a React PDF Generator.
Vessy
Telerik team
 answered on 22 Nov 2023
1 answer
204 views

Hello Team,

I hope your weak is going smoothly.  I am reaching out to you because , I am facing problem to remove Row and Column header from pivot table view. Also, I dont want these fields to be downloaded in excel download as well. I am using kendo react pivot grid version: 

"@progress/kendo-react-pivotgrid": "^5.9.0",

I have succesfully expanded all fields (defaultRowAxes and defaultColumnAxes) by defaut. So, I do not need this fields in my pivot table view and downloaded excel file. I am using built in saveAsExcel function to download excel file. I want to remove the fields highlighted in rectangle (check attached image) from downloaded excel file also. I am attaching the screenshot for better understanding.Your assistance in resolving this matter would be grately appreciated.

Thanks in advance

Konstantin Dikov
Telerik team
 answered on 20 Nov 2023
1 answer
589 views

Hi.

I use what you describe in your example on this page to generate a base64 string from a part of a page and show it in the PdfViewer Component and this works great. The only issue I have is that the PDF doesn't show language specific characters (utf-8), like for example German ä, ü, etc.

Is there any way to make the them appear in the PDF?

Thanks,

Greetings,

Bernd

Konstantin Dikov
Telerik team
 answered on 20 Nov 2023
1 answer
142 views
I have a Grid with 2 columns, Country & state.  When i perform in-line edit operation, the country name should turn in to a dropdown & state name should turn in to a textbox. when i select a value from he dropdown, the state text field should auto populate the state name.  I am using key value pair for Country name
Wissam
Telerik team
 answered on 17 Nov 2023
1 answer
144 views
I have a GridColumnMenuCheckboxFilter and GridColumnMenuSort for pricing filter showing different value and label based on currency format..
filtering is working fine but sort is not working as expected for example if i filter one price column and sort beside column data is getting empty.

pls refer the following example thank u

https://stackblitz.com/edit/react-sjotkk-zudywu?file=app%2FcolumnMenu.jsx
Vessy
Telerik team
 answered on 17 Nov 2023
Narrow your results
Selected tags
Tags
General Discussions
Grid
Wrappers for React
Charts
Scheduler
Filter 
DropDownList
Form
DatePicker
Styling / Themes
Editor
TreeList
Styling
PDF Processing
ComboBox
Excel Export
Dialog
Input
TreeView
Upload
Drawer
Button
Drag and Drop
MultiSelect
Tooltip
Accessibility
NumericTextBox
Checkbox
Menu
Gantt
DateTimePicker
PDF Viewer
Popup
Window
AutoComplete
DateInput
Sortable
Data Query
Licensing
TabStrip
Drawing
Calendar
Pager 
Labels 
Localization
TimePicker
GridLayout
FontIcon
Animation
PanelBar
TaskBoard
PivotGrid
Card
DropDownButton
Conversational UI 
DateRangePicker
Splitter
Badge 
Security
Slider
Spreadsheet
ContextMenu
MultiViewCalendar
Stepper
MultiColumnComboBox
MultiSelectTree
TextBox
AppBar
File Saver
ListView
MaskedTextBox
RadioButton
Switch
TextArea
Toolbar
DropDownTree
TileLayout
Map
Avatar
Date Math
Gauge
RadioGroup
RangeSlider
Rating
Loader
ExpansionPanel
SvgIcon
Typography
ProgressBar
ScrollView
Popover
StockChart
RadialGauge
Server Components
AIPrompt
Page Templates / Building Blocks
AI Coding Assistant
Chat
ColorGradient
ColorPalette
ColorPicker
Notification
Ripple
Skeleton
ButtonGroup
Chip
ChipList
FloatingActionButton
SplitButton
ActionSheet
Barcode
QR Code
FlatColorPicker
Signature
BottomNavigation
BreadCrumb
StackLayout
Timeline
ListBox
ChunkProgressBar
Sparkline
FileManager
ArcGauge
CircularGauge
LinearGauge
ExternalDropZone
OrgChart
Sankey
VS Code Extension
InlineAIPrompt
SpeechToTextButton
Chart Wizard
Agentic UI Generator
SmartPasteButton
PromptBox
SegmentedControl
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?