I need to delete a bunch of rows for wich I have their respective CURRENT row indexes in an array.
However if I do a sheet.deleteRow(rowIndex), The row indexes of the rest of the rows change.
I can't find a way to reference the rows themselves. Only the row indexes.
How could I go about doing such a task?
I do not have Data binding of any kind.
Thanks in advance.
// this does not work. I need a reference to the row itself
var
rowsToDelete = [2,6,53];
for
(
var
x=0;x<rowsToDelete.length;x++){
sheet.deleteRow(x);
}
<script id=
"ImportPNRSupplierHeads"
type=
"text/x-kendo-template"
class=
"KendoExtTemplate"
>
<div data-role=
"window"
id=
"ImportPnrSupplierTaxWindow"
class=
"PricingCommercialSubWindow"
data-animation=
"false"
data-title=
"Supplier Tax Breakup"
data-modal=
"true"
data-width=
"770"
data-visible=
"false"
data-bind=
"events:{close: SupplierTaxWindowClose,open: OnSupplierTaxWindowOpened}"
>
<button type=
"button"
data-role=
"button"
text-align=
"left"
class=
"btn btn-default"
data-bind=
"click: AddSupplierTaxRow"
style=
"margin-bottom: 2px"
>
<i class=
"fa fa-plus"
></i>
Add Tax
</button>
<br />
<!--<div id=
"ImportPnrSupplierTaxGrid"
></div>-->
<!--Import PNR SupplierTaxGrid Starts-->
<div data-role=
"grid"
id=
"ImportPnrSupplierTaxGrid"
data-editable=
'true'
data-columns='[{
"field"
:
"ID"
,hidden:
true
},
{
"field"
:
"IsUserCreated"
, hidden:
true
},
{
"field"
:
"OfficePNRTSTID"
, hidden:
true
},
{
"field"
:
"CountryCode"
,
"title"
:
"Code"
},
{
"field"
:
"Type"
,
"title"
:
"Sub Code"
, width: 80 },
{
"field"
:
"Description"
,
"title"
:
"Description"
, width: 250},
{
"field"
:
"AmountCurrency"
,
"title"
:
"Currency"
, width: 80 , editable:
"false"
}
]'
data-bind=
'source: Tax.TaxBreakup,events: {dataBound: ImportPnrSupplierTaxGridDataBound}'
></div>
<!--Import PNR SupplierTaxGrid Ends-->
<br />
<div style=
"text-align: center"
>
<button type=
'button'
class=
'k-button'
data-bind=
""
>
<i class=
'fa fa-close fa-fw'
></i> Close
</button>
</div>
</div>
</script>
I am using Grid MVVM InCell Editing and want the column "AmountCurrency" to be editable based on value "IsUserCreated" (true/false). And want to add class "Red" to column "CountryCode How can do that?
var
viewModel = kendo.observable({
data: vmJson,
selected:
null
});
this
.set(
"selected"
,e.data)
I believe you have a bug in your software.
I would like to display a 2 digit hour value, but want the time displayed in 24hour format. So I'd like the hour zero padded if it is less than 10.
Here are the value and format combinations I've used and how to recreate the bug:
5/1/2018 1:11 => dd-mmm-yyyy h:mm => 01-may-2018 1:11 (works)
5/1/2018 1:11 => dd-mmm-yyyy hh:mm => 01-may-2018 01:11 (works)
5/1/2018 13:13 => dd-mmm-yyyy h:mm => 01-may-2018 13:13 (works)
5/1/2018 13:13 => dd-mmm-yyyy hh:mm => 01-may-2018 01:13 (broken)
Let me know if you have any questions.
Greg
Hello,
can someone tell me why my pie chart is disappearing when I call .refresh()?
Here is a snipped illustrating my problem:
https://dojo.telerik.com/uGijuvOw/2
It works fine when I set the data as the dataSource and call dataSource.read() prior to .refresh(). But for our use case it would be more convenient to have the data embedded in the series.
Regards,
Matthias
Hello,
I have a date column in my grid. But sometimes the date picker filter doesn't open. When I debug, I can see it opens then closed automatically because the scroll event is bound to the grid in the open function when options.modal is not true.
What does options.modal do? I don't see any documentation about this. And why bind the scroll event and close the popup in this case?
Best regards,
Yajing
When expanding all kendo grid rows, it is very slow.
The detailtemplate is very simple, but it is still so slow. Any suggestions how to make it faster?
Demo : http://dojo.telerik.com/EHiSa
I need to perform a custom action on a row. For that I want to use the rowheader contextmenu.
How can I know wich row Index is the context menu being applied? the contextMenu e.target seems to be the whole spreadsheet.
I cannot find any clue in either contextmenu or spreadsheet docs or forums.
var
rowHeaderContextMenu =
this
.currentSpreadsheet.rowHeaderContextMenu();
rowHeaderContextMenu.remove(
"[data-action=delete-row]"
);
rowHeaderContextMenu.remove(
"[data-action=hide-row]"
);
rowHeaderContextMenu.append(
"<li id='myAction' data-action='row-customaction'>My custom action<
/li>"
);
rowHeaderContextMenu.bind(
'select'
,
function
(e){
console.log(
'contextmenu row'
, e);
var rowIndex = ?????????
doMyCustomAction(rowIndex);
});
Extra points if the answer applies also for a cell / columnHeader.
Thanks in advance.