角度-有没有办法使Kendown网格上正确显示dropdownlist选项?

时间:2019-10-28 15:35:40

标签: html angular kendo-ui kendo-grid

我正在使用Angular和Kendo来显示带有一些下拉列表项的Grid。

到目前为止,信息已根据需要提供。问题取决于单击网格内的任何dropdownlist项目;当您单击其中的一个以查看所有选项时,该选项列表未显示在下拉菜单的上方/下方,而是显示在屏幕顶部,或者在某些情况下未显示。

到目前为止,我已经尝试过使用列的宽度和高度,但似乎不起作用。

Clicking first dropdownlistAnother example

 <kendo-grid [height]="400" [data]="examTableGrid" [pageSize]="pageSize" [sort]="sort" [skip]="skip" [pageable]="true"
        [sortable]="true" (pageChange)="pageChange($event)">
        <kendo-grid-column *ngIf="typeOfTest == '0'" field="INJURY_TYPE" title="Joint" width="250">
            <ng-template kendoGridCellTemplate let-dataItem>
                <kendo-dropdownlist [data]="injuryTypesList" textField="Description"  valueField="Id" 
                [valuePrimitive]="true" [(ngModel)]="dataItem.INJURY_TYPE"
                (valueChange)="injuryValueChange($event, dataItem)"></kendo-dropdownlist>
            </ng-template>
        </kendo-grid-column>
        <kendo-grid-column field="EXAM_TEST_TYPE_ID" title="Test" width="250">
            <ng-template kendoGridCellTemplate let-dataItem>
                <kendo-dropdownlist [data]="testsTypesListFiltered" textField="Description"  valueField="Id" 
                [valuePrimitive]="true"   (filterChange)="handleFilter($event)" (open)="onOpen($event, dataItem)" [filterable]="true" [(ngModel)]="dataItem.EXAM_TEST_TYPE_ID"></kendo-dropdownlist>
            </ng-template>
        </kendo-grid-column>
        <kendo-grid-column field="SIDE_TYPE" title="Side" width="250">
            <ng-template kendoGridCellTemplate let-dataItem>
                <kendo-dropdownlist [data]="sidesList" textField="Description"  valueField="Id" 
                [valuePrimitive]="true"   [(ngModel)]="dataItem.SIDE_TYPE"></kendo-dropdownlist>
            </ng-template>
        </kendo-grid-column>
        <kendo-grid-column *ngIf="typeOfTest == '2'" field="NUMBER_VALUE" title="Strength (0-5)" width="250">
            <ng-template kendoGridCellTemplate let-dataItem>
                <kendo-dropdownlist [data]="gradesList" textField="Description"  valueField="Id" 
                [valuePrimitive]="true"   [(ngModel)]="dataItem.NUMBER_VALUE"></kendo-dropdownlist>
            </ng-template>
        </kendo-grid-column>
        <kendo-grid-column *ngIf="typeOfTest == '3'" field="NUMBER_VALUE" title="Grade (I - III)" width="250">
            <ng-template kendoGridCellTemplate let-dataItem>
                <kendo-dropdownlist [data]="gradesList" textField="Description"  valueField="Id" 
                [valuePrimitive]="true"    [(ngModel)]="dataItem.NUMBER_VALUE"></kendo-dropdownlist>
            </ng-template>
        </kendo-grid-column>
    </kendo-grid>

我希望每个下拉列表的选项都将显示在下拉列表的上方/下方,对我做错了什么有什么想法?谢谢

0 个答案:

没有答案