I just learn the below demo to present dynamic columns and data.
http://jsfiddle.net/darrenarbell/4HTEr/
I am facing the problem if i want to do the cell onchange event how could i implement ?
For example,
First row Column 0 value is 2,i edit to change value to 3, i want column 1,2,3,4 cell value all add+1.
I don't know where could i add onchange event to ?
Deeply appreciated your help thanks.
I have this grid that has a hidden column that is hidden on Load.
<div class="row">
<div class="blanktable references" style="padding: 5px; border: 1px solid rgb(211, 211, 211); border-image: none;">
@(Html.Kendo().Grid<Something>()
.Name("Something ")
.Selectable(builder => builder.Mode(GridSelectionMode.Multiple).Enabled(false))
.ClientRowTemplate(Html.Partial("Something ").ToHtmlString())
.TableHtmlAttributes(new { @class = "table table-stripped" })
.Scrollable(scrollable => scrollable.Height(100).Enabled(true))
.Columns(columns =>
{
columns.Bound(h => h.IsSelected)
.Sortable(false)
.Filterable(false)
.Title(string.Empty).Template(@<text></text>).HeaderTemplate("<input type='checkbox' id='Something' onchange=' Something (this)' />").Width(80).Hidden(true);
columns.Bound(h => h. Something).Title("Partner type").Width(120);
columns.Bound(h => h. Something).Title("Date").Width(120);
columns.Bound(h => h. Something).Title("Name");
})
.Events(e => e.DataBound("Something").Change("Something "))
)
</div>
</div>
The resulting table is in file 1.
When I click on the edit button, I show the column
$(`#${grid}`).data("kendoGrid").showColumn(0);
And then I had this html to each row
<td><input type="checkbox" class="checkbox" id= " Something " onchange= " Something (this); SomethingElse(this)" /></td>
And I get the grid on file 2.
For some reason the, the HeaderTemplate is not shown.
I have a grid elsewhere with the same column, except that it is not
hidden on load and it works fine.
This is the other grid
@(Html.Kendo().Grid< Something >()
.Name("Something ")
.Deferred()
.AutoBind(false)
.ClientRowTemplate(Html.Partial("Something ").ToHtmlString())
.TableHtmlAttributes(new { @class = "table table-stripped" })
.Events(e => e.DataBound("Something "))
.Resizable(res => res.Columns(true))
.Columns(columns =>
{
columns.Bound(e => e.IsSelected)
.Sortable(false)
.Filterable(false)
.Title(string.Empty).Template(@<text></text>).HeaderTemplate("<input type='checkbox' id= Something onchange= Something (this)' />");
…
columns.Bound(e => e. Something)
.Title("Bundle")
.Sortable(false)
.Filterable(false);
columns.Bound(e => e.LastComment)
.Sortable(false);
})
.Filterable()
.Sortable()
.Selectable()
.Pageable(x =>
{
x.ButtonCount(3);
x.Enabled(true);
x.PageSizes(new[] { "5", "10", "20", "30" });
x.Refresh(true);
})
.DataSource(dataSource => dataSource
.Ajax()
.Read(read => read.Action("Something ", " Something ").Data("Something "))
.ServerOperation(true)
)
)
This is the result html of the column in the grid where it works
<th class="k-header" scope="col"
data-title="" data-index="0"
data-field="IsSelected"><input id=" Something "
onchange=" Something (this)" type="checkbox"></th>
And this is the other html
<th class="k-header"
id="97dafba3-0cf9-420b-9104-d51ab36d924b"
role="columnheader" aria-haspopup="true"
rowspan="1" scope="col" data-title=""
data-index="0"
data-field="IsSelected">IsSelected</th>
Hi,
We are using the custom visual in order to display circles in our legend.
I'm wondering, is there a way to increase padding between each item? I've adjusted the 'spacing' - but that only controls space between the circle and the label. I want to adjust space between each item.
Like this: o Series 1 o Series 2 o Series 3
http://dojo.telerik.com/iliGOJ/7
Any suggestions?
Hi,
I have a JSON data coming from a webapi from the table which is displayed in the below format
Team 1 2 3 4 5
Series1 100 200 300 50 10
Series2 50 250 300 340 20
Series3 40 200 300 400 30
Series4 30 50 70 80 90
Series5 20 0 5 0 0
I need to display a column bar chart in the format attached below.
Above team 1 2 3 4 5 are column headers in the sql table
I need to display data in the below format. Please help me.
1) I have the following code snippet from the Kendo Demo http://demos.telerik.com/kendo-ui/treelist/local-data-binding and included it in a chstml file
2) Tree List renders properly first time, when button is clicked second time, the earlier Tree List Data doesnt get refreshed. New DataSource gets appended to earlier one.
3) using the following Kendo UI Version Kendo UI v2015.3.1111, in AIG
4) Attached is Screenshot
5) you can reach out to me at rajaraman.soundarara@aig.com
Please help me resolve this issue at the earliest, since we are in middle of development
<script type="text/javascript">
$(document).ready(function () {
RefreshView();
$("#refreshTree").click(function () {
alert('button clicked');
RefreshView();
});
});
function RefreshView() {
var dataSource = new kendo.data.TreeListDataSource({
data: [
{ id: 1, Name: "Daryl Sweeney", Position: "CEO", Phone: "(555) 924-9726", parentId: null },
{ id: 2, Name: "Guy Wooten", Position: "Chief Technical Officer", Phone: "(438) 738-4935", parentId: 1 },
{ id: 32, Name: "Buffy Weber", Position: "VP, Engineering", Phone: "(699) 838-6121", parentId: 2 },
{ id: 11, Name: "Hyacinth Hood", Position: "Team Lead", Phone: "(889) 345-2438", parentId: 32 },
{ id: 60, Name: "Akeem Carr", Position: "Junior Software Developer", Phone: "(738) 136-2814", parentId: 11 },
{ id: 78, Name: "Rinah Simon", Position: "Software Developer", Phone: "(285) 912-5271", parentId: 11 },
{ id: 42, Name: "Gage Daniels", Position: "Software Architect", Phone: "(107) 290-6260", parentId: 32 },
{ id: 43, Name: "Constance Vazquez", Position: "Director, Engineering", Phone: "(800) 301-1978", parentId: 32 },
{ id: 46, Name: "Darrel Solis", Position: "Team Lead", Phone: "(327) 977-0216", parentId: 43 },
{ id: 47, Name: "Brian Yang", Position: "Senior Software Developer", Phone: "(565) 146-5435", parentId: 46 },
{ id: 50, Name: "Lillian Bradshaw", Position: "Software Developer", Phone: "(323) 509-3479", parentId: 46 },
{ id: 51, Name: "Christian Palmer", Position: "Technical Lead", Phone: "(490) 421-8718", parentId: 46 },
{ id: 55, Name: "Summer Mosley", Position: "QA Engineer", Phone: "(784) 962-2301", parentId: 46 },
{ id: 56, Name: "Barry Ayers", Position: "Software Developer", Phone: "(452) 373-9227", parentId: 46 }
],
schema: {
model: {
id: "id",
expanded: true
}
}
});
$("#treelist").kendoTreeList({
dataSource: dataSource,
height: 540,
columns: [
{ field: "Position" },
{ field: "Name" },
{ field: "Phone" }
]
});
}
</script>
<div id="treelist"></div>
<button type="button" id="refreshTree">Click Me!</button>