Hey
I have problem with the grid his not showing createdTime Why ? I so Tired for searching solution plzz help me Im beginner In kendo and that my code :
View :
@(Html.Kendo().Grid<appfox.Models.Address>()
.Name("grid")
.Columns(columns =>
{
columns.Bound(p => p.AddressLine1);
columns.Bound(p => p.AddressLine2).Visible(false);
columns.Bound(p => p.AddressPostalCode);
columns.Bound(p => p.CreatedDate).Format("{0:dd-MM-yyyy}").EditorTemplateName("Date");
columns.Bound(p => p.CreatedTime).Format("{0:HH:mm:ss}").EditorTemplateName("Date");
columns.Command(command => command.Custom("ViewDetails").Click("showDetails")).Width(180);
})
.Resizable(resize => resize.Columns(true))
.Reorderable(reorder => reorder.Columns(true))
.HtmlAttributes(new { style = "height: 380px;" })
.Scrollable()
.Groupable()
.Sortable()
.Pageable(pageable => pageable
.Refresh(true)
.PageSizes(true)
.ButtonCount(5))
.DataSource(dataSource => dataSource
.Ajax()
.Model(model =>
{
model.Field(x => x.AddressId).Editable(false);
model.Id(x => x.AddressId);
})
.Read(read => read.Action("List", "Test"))
)
)
@(Html.Kendo().Window().Name("Details")
.Title("Customer Details")
.Visible(false)
.Modal(true)
.Draggable(true)
.LoadContentFrom("List", "Test")
.Width(300))
_____________________________________________________________________________________
Class:
public partial class Address
{
public int AddressId { get; set; }
public string AddressLine1 { get; set; }
public string AddressLine2 { get; set; }
public Nullable<byte> AddressPostalCode { get; set; }
public string City { get; set; }
public string State { get; set; }
public string Country { get; set; }
public string TimeZone { get; set; }
public string CreatedBy { get; set; }
public System.DateTime CreatedDate { get; set; }
public System.TimeSpan CreatedTime { get; set; }
public string UpdatedBy { get; set; }
public System.DateTime UpdatedDate { get; set; }
public System.TimeSpan UpdatedTime { get; set; }
}
}
Controller
public ActionResult Index1([DataSourceRequest]DataSourceRequest request)
{
List<Address> omList = new List<Address>();
Address om = new Address();
using (Test1Entities objContext = new Test1Entities())
{
var q = objContext.Address.ToList();
omList = getOrders(q);
DataSourceResult result = omList.ToDataSourceResult(request);
return View(result);
// return omList;
}
}
private List<Address> getOrders(List<Address> olist)
{
List<Address> omList = new List<Address>();
foreach (var ads in olist)
{
Address o = new Address();
o.AddressLine1 = ads.AddressLine1;
o.AddressLine2 = ads.AddressLine2;
o.AddressPostalCode = ads.AddressPostalCode;
o.City = ads.City;
o.State = ads.State;
o.Country = ads.Country;
o.TimeZone = ads.TimeZone;
o.CreatedBy = ads.CreatedBy;
o.CreatedDate = ads.CreatedDate;
omList.Add(o);
}
return omList;
}
public ActionResult List([DataSourceRequest]DataSourceRequest request)
{
List<Address> omList = new List<Address>();
Address om = new Address();
using (Test1Entities objContext = new Test1Entities())
{
var q = objContext.Address.ToList();
omList = getOrders(q);
DataSourceResult result = omList.ToDataSourceResult(request);
return Json(result, JsonRequestBehavior.AllowGet);
// return omList;
}
}
Hi ,
I have below scenarion
I am loading text box dropdown and switch in Grid in load, i need to maintain the selected values or entered values after the grid refresh
Is there any way to maintain

when splitter moved to the right, Gantt's header's width was expanded,but The Width of Gantt's timeLine was not expanded.
I think the automatically calculated timeline width of the Gantt chart is wrong
How can I solve this situation?
ps Add another picture.

Hi Team,
We are facing issue with exported PDF.
We are not able to get print out from the exported PDF file.
When we try to get print out then only small portion from the pdf is printed on single page.
Please help us how we can take print out from exported PDF.
Thanks!

I'm using the cellClose event to update cell values, it works within the values in the selected row. I have a last row called Total which is the sum of the Values of the Column D
----------Column_A Column_B Column_C Column_D
----------Product1---ValueB1---ValueC1-------ValueD1
----------Product2---ValueB2---ValueC2-------ValueD2
----------Total------------------------------------------ValueT
Column D= Column_C * Column_B and ValueT = ValueD1 + ValueD2
When i update ValueC1 or ValueB1 , ValueD1 gets updated and re-rendered with the new value . The problem is that the ValueT gets udpated but it doesnt re-render .
The code i have is this one :
cellClose:function(e){<br> var dataItem=e.sender.dataItem($(e.container).parent())// getting the current edited row<br> var aux= e.sender.dataSource.data(); //getting all rows<br> var dataTotal= aux[aux.length-1]; //geting total row<br> <br> valueB=dataItem["Column_B"];<br> valueC=dataItem["Column_C"];<br> dataItem.set("Column_D",valueB*ValueC);<br> <br> var sum=0;<br> for (let i=0;i<aux.length-1;i++)//getting sum of values of Column_D<br> {<br> sum=sum+aux[i].Column_D;<br> } <br> dataTotal.set("Column_D",sum) // setting sum<br> <br> <br> } <br>

I'm using the cellClose event to update cell values, it works within the values in the selected row. I have a last row called Total which is the sum of the Values of the Column D
----------Column_A Column_B Column_C Column_D
----------Product1---ValueB1---ValueC1-------ValueD1
----------Product2---ValueB2---ValueC2-------ValueD2
----------Total------------------------------------------ValueT
Column D= Column_C * Column_B and ValueT = ValueD1 + ValueD2
When i update ValueC1 or ValueB1 , ValueD1 gets updated and re-rendered with the new value . The problem is that the ValueT gets udpated but it doesnt re-render .
The code i have is this one :
cellClose:function(e){var dataItem=e.sender.dataItem($(e.container).parent())// getting the current edited rowvar aux= e.sender.dataSource.data(); //getting all rowsvar dataTotal= aux[aux.length-1]; //geting total rowvalueB=dataItem["Column_B"];valueC=dataItem["Column_C"];dataItem.set("Column_D",valueB*ValueC); var sum=0; for (let i=0;i<aux.length-1;i++)//getting sum of values of Column_D { sum=sum+aux[i].Column_D; } dataTotal.set("Column_D",sum) // setting sum}

In the following example I want to show the Id of the category when the corresponding "columns.values" is not found. Is there a way to do it easily?
in the "burger" line it is blank, and I want that in that case at least its category is displayed
<div id="grid"></div>
<script>
$("#grid").kendoGrid({
columns: [
{ field: "productName" },
{ field: "category", values: [
{ text: "Beverages", value: 1 },
{ text: "Food", value: 2 }
] }
],
dataSource: [
{ productName: "Tea", category: 1 },
{ productName: "Ham", category: 2 },
{ productName: "Burger", category: 3 },
],editable: true,
});
</script>

Hi,
As my title says, when I clear selected values in the input, additional values selected.
See Dojo: https://dojo.telerik.com/UgOVISOL
Duplicate:
1) Open the widget and select an element under the Customer Location group
2) Close the widget
3) Click the X button on the tag to remove the selected Customer Location.
See how it adds an additional value to the selected list. This is somehow linked to the filtering in the change callback because when I remove the change callback, it works fine. N.B. this only happens when clearing the value using the X, if the value is deselected, all is fine
The desired behaviour is that when a customer location is selected, the customer accounts in the datasource are filtered by the selected customer location. This part is working though.
Thanks,
Grant
Hi all.
In this example: https://demos.telerik.com/kendo-ui/grid/multicolumnheaders.
How can I lock / unlock columns from the column menu?
Thank you in advande.
Regards,
Carlos Conde
