Telerik Forums
KendoReact Forum
11 answers
410 views

GridColumn didn't work correctly. I can't use them when I insert it inside Grid.

I see that GridColumn is function

var GridColumn = function (props) { return null; };
GridColumn.displayName = 'GridColumn';

In Grid component you try to compare child component with this 'component'

var columns = React.Children
           .toArray(children)
           .filter(function (child) { return child && child.type === GridColumn_1.default; })
           .map(function (child) { return Object.assign({}, child.props); });

So, after filter there zero items, because we try to compare 2 functions.

Could you fix it, please? 

Stefan
Telerik team
 answered on 20 Oct 2020
3 answers
166 views

Hi there,

  I want to use registerForIntl() with a functional compoent - React.SFC . How can I do that? registerForIntl expecs React.Component? How can I use intl functions in a React.SFC?

 

Stefan
Telerik team
 answered on 19 Oct 2020
5 answers
1.7K+ views

Dear Sir/Madam,

We use a KendoGrid at the moment. It is good. And currently we try to keep horizontal scroll bar be visualable if table is too long. We do not want to horizontal scroll bar at the bottom all the time, otherwise user have to move to the bottom first then could scroll. Is it possible to do this? I checked document and did not find a good way. Can you give me some suggestions?

 

Thanks.

Regards,
Max

Max
Top achievements
Rank 1
 answered on 16 Oct 2020
5 answers
610 views

Hi, 

 

I'm using Kendo React Grids with filter in my application which generates column filter textbox and filter options dropdown. The requirement for me (part of ADA compliance) is any filed that user may execute an action should have a associated text with it when hovered on it. A HTML title attribute on column filter textbox and filter options dropdown would resolve this issue. 

 

The Grid did not generate title attribute on filter textbox and filter options dropdown but the clear filter textbox button has title attribute.

 

How do I resolve this issue. Any help is much appreciated.

Nikolay
Telerik team
 answered on 16 Oct 2020
26 answers
1.4K+ views
how to resize in  , i have used innerHeight and innerWidth it worked but i couldn't get toolbar in full size and also grid lines
Stefan
Telerik team
 answered on 15 Oct 2020
1 answer
547 views
Hello! Had a product question on the grid component specifically:

My needs are to copy/paste multiple cells at once from Excel to kendo grid. This can be across multiple columns as well as rows. You can see https://handsontable.com/examples and https://nadbm.github.io/react-datasheet/ allow you to copy/paste across cell ranges seamlessly. Does Kendo UI for React support that? I couldn’t find anything in the documentation. My team needs to make a decision by tomorrow 10/13 on what library to use so a quick response would be greatly appreciated. Thank you!
Stefan
Telerik team
 answered on 13 Oct 2020
2 answers
403 views
I have a functional component which includes a FirmaListesi component to set seciliFirma state and a Form component which edits the selected seciliFirma object. FirmaListesi component includes only a KendoReact Combobox. When I select a Firma object from that component, I want Form component's Field to update its value. However it doesn't happen which occurs with an ordinary Input component.

 

Am I doing something wrong?

 

Kind regards.

 

const FirmaEkle = () => {
  const [firma, setFirma] = useState({ adi: "dswsd" } as Firma);
 
  const firmalar = useTypedSelector((state) => state.firma.firmalar);
  const seciliFirma = useTypedSelector((state) => state.firma.seciliFirma);
 
  const dispatch = useDispatch();
 
  const firmaEkle = () => {
    dispatch(updateFirma([...firmalar, { adi: "ewrer", id: 2 }]));
  };
 
  const handleSubmit = async () => {
    await FirmaKaydet(firma);
  };
 
  return (
    <>
      <FirmaListesi></FirmaListesi>
      <Form
        onSubmit={handleSubmit}
        initialValues={seciliFirma}
        render={(formRenderProps) => (
          <FormElement style={{ width: 400 }}>
            <fieldset className="k-form-fieldset">
              <legend className={"k-form-legend"}>Firma Bilgileri</legend>
              <Field id={"adi"} name={"adi"} label="Firma Adı" component={FormInput}></Field>
              <Button type="submit" disabled={!formRenderProps.allowSubmit}>
                {seciliFirma ? "Güncelle" : "Kaydet"}
              </Button>
            </fieldset>
          </FormElement>
        )}
      />
 
      <Button onClick={() => alert(seciliFirma.adi)}>Deneme1</Button>
    </>
  );
};
Stefan
Telerik team
 answered on 13 Oct 2020
1 answer
584 views

Hi All

Very new to react, trying hooks to simplify code and readability. 

I am trying to implement the odata service example from: https://www.telerik.com/kendo-react-ui/components/grid/data-operations/odata-server-operations/

The odata service is fine, I am just trying to get the function setGridState1 to set the grid state to gridState and then call the function toODataString passing in the grid state (and therefore parsing it to an odata string) and then passing it to my rest api.

I can get the debugger points to trigger, but after I update a filter in the grid and it calls fetchData, gridState is still null?

Missing something crucial here, not sure what it is though, any help would be great.

 

import * as React from "react";
import { Grid, GridColumn as Column } from "@progress/kendo-react-grid";
import { toODataString } from '@progress/kendo-data-query';
import { dataService } from "../Services/dataService";
 
export const AddExistingGrid: React.FC = () => {
  const [selectedID, setSelectedID] = React.useState(null)
  const [editId, setEditId] = React.useState(undefined);
  const [data, setData] = React.useState<any[]>([]);
  const [gridState, setGridState] = React.useState<any>([]);
 
  const fetchData = React.useCallback(async () => {
    debugger;
    const newData = await dataService.getLoanInvOdata(toODataString(gridState));
  }, [setData]);
 
  const setGridState1 = (e) => {
    setGridState(e);
    fetchData();
    debugger;
  }
 
  React.useEffect(() => { fetchData() }, [fetchData]);
 
  return (
    <>
      <div>
        <Grid
          filterable={true}
          sortable={true}
          pageable={true}
          data={data.map(item => ({
            ...item,
            inEdit: item.ProductID === editId,
            selected: item.ProductID === selectedID
          }))}
          onDataStateChange={setGridState1}
        >
          <Column field="id" title="Id" />
          <Column field="ProductName" title="Name" />
          <Column
            field="UnitPrice"
            filter="numeric"
            format="{0:c}"
            title="Price"
          />
          <Column field="UnitsInStock" filter="numeric" title="In stock" />
        </Grid>
 
      </div>
    </>
  );
};
Stefan
Telerik team
 answered on 12 Oct 2020
5 answers
1.6K+ views

Hi,

One of my grid columns uses a child component to display its own data for each row in the grid.  I have a demo here:

https://stackblitz.com/edit/react-mu6rlr?file=app/main.jsx

The issue is that any state change in the parent causes that child in the grid column to unmount re-mount.  Try opening the console at the bottom right.  Then type any text in the input.  You can see that for each state change, the child unmounts and re-mounts.

In my real app, the child is fetching data with axios.  So for each keystroke (or ANY state change), that child unmounts, remounts, and fetches the data again.  This also happens with any action on the grid, such as sorting.  Sort the grid, and the child unmounts and remounts.

How can I prevent this behavior?  I can't have the child re-fetching the data like that.

Thanks for any help.

Stefan
Telerik team
 answered on 12 Oct 2020
2 answers
1.4K+ views

Hello

How to expand One Grid Row Only at a Time with React, the behavior needed is that all the rows will be collapsed when i expand a row.

I found a solution with jquery but not in React.

Thank you in advance.

Raef
Top achievements
Rank 1
 answered on 09 Oct 2020
Narrow your results
Selected tags
Tags
General Discussions
Grid
Wrappers for React
Charts
Scheduler
Filter 
DropDownList
Form
Styling / Themes
DatePicker
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
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Hiba
Top achievements
Rank 1
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Hiba
Top achievements
Rank 1
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?