Telerik Forums
UI for ASP.NET MVC Forum
1 answer
107 views
Hello,

We have a Telerik InCell editable grid with FileUpload in use. Now we want to convert it to KendoUI. During this process we found a few bugs / misunderstandings? Hopefully, someone can help us.

For better understanding I added a sample project in which we have an InCell grid with an included FileUpload.

1. The Fileupload-Column doesn't fire the Save-Event of the Grid. With a normal TextBox the event works fine and also using the Telerik Extensions everything worked fine. What can we do? We need an event that gets fired as soon as the user leaves the edit-mode of the cell.

2. The date-column is in a completely different format than it was in the Telerik extensions. What can we do to just get Date + Time, based on the language the user uses... --> 31.07.2012 12:04

3. Problem: http://www.kendoui.com/forums/mvc/grid/ajax-binding-clienttemplate-issue-with-create-action.aspx
--> To see what this problem causes: In the attached sample project --> index.cshtml --> add the ClientTemplate (which is commented out) to the CreatedDate-row --> Start project --> Add a new row --> Error

I hope someone can help us with these three problems.

Another tipp:
4. Problem: Be aware of ClientTemplate where you use a sharp --> ClientTemplate("<a href='#'>...") --> isn't possible anymore
Solution: ClientTemplate("<a href='javascript:void(0)'>...")
--> If someone has a better solution for that - let me know :)
Mathias
Top achievements
Rank 1
 answered on 01 Aug 2012
0 answers
169 views
Need to import external data to SharePoint list and export Sharepoint list to SQL, Orcale, or MySQL?
there are three methods that one can use to import external data sources to SharePoint lists:
1. The first method provided by Microsoft.But it is aware that there is no OLEDB provider for SharePoint, or at least there was no easy way prior to SharePoint 2007. But if you use SharePoint 2010 or higher you have an option to use PowerPivot for SharePoint.Another restriction is that data sources are limited.
2. The second is to develope code. This method requires IT departments to write programs or code that is then utilized in SharePoint to import external date. Surely, it need take time to develop and test the code.if the code is too long or complicated it can quickly become unusable, unstable, full of bugs, etc;
3. The third one: using Data Connector by SharePoint Boost. This sharepoint web part provides provides a convenient and secure way to access external data completely within SharePoint such as sharepoint list to sql. Including sharepoint sql server connection, SharePoint Data Connector also support data connection among sharepoint and other systems, such as, Oracle Database and My SQL, etc. Additionally, this solution allows you to export SharePoint list and library in SharePoint as a set of normalized tables to any external database or you can use SharePoint as the default user interface to update or add to your external data.
Angela
Top achievements
Rank 1
 asked on 01 Aug 2012
2 answers
243 views
I would like to load different content into the window depending on what button was click by the user.

I was trying something like this:

var desk = $("#window");
 
        $("#openEmail").click(function (e) {
            desk.contents() = "test";
            desk.data("kendoWindow").open();           
        });
and that does not work of course.

Any ideas how this could be done?
Andrew
Top achievements
Rank 1
 answered on 01 Aug 2012
0 answers
178 views
How do I create dynamic hierarchy grids in KendoUI.
Something like this -
http://demos.telerik.com/aspnet-ajax/grid/examples/hierarchy/autogeneratedhierarchy/defaultcs.aspx 

Thanks.
Ashwin
Top achievements
Rank 1
 asked on 01 Aug 2012
4 answers
230 views
I'm using Ajax binding, and my Destroy method looks like this:
[HttpPost]
public ActionResult AjaxDelete([DataSourceRequest]DataSourceRequest request, tbl_app_Customer customerToDelete) {
if (customerToDelete != null) {
db.tbl_app_Customer.Attach(customerToDelete);
                db.ObjectStateManager.ChangeObjectState(customerToDelete, EntityState.Deleted);
                db.SaveChanges();
        }
        return Json(ModelState.ToDataSourceResult());
}
However this code fails with the error:
An object with a temporary EntityKey value cannot be attached to an object context

Any idea why this is? What am I doing wrong?
Victor
Top achievements
Rank 1
 answered on 31 Jul 2012
2 answers
185 views
I need to implement a solution for a master row that has few details "views" for it.
There should be two buttons in the master row - One button should display the details of history and another button that should display another details view.
How can I do it? It seems that I have to override the built-in details opening mechanism...
Yaron
Top achievements
Rank 1
 answered on 31 Jul 2012
1 answer
125 views
I have a remote attribute on my mvc model class being used as my edit template. However my remote controller function is never hit. Is this feature supported?
Adam
Top achievements
Rank 1
 answered on 31 Jul 2012
1 answer
221 views
When doing an inline edit in a grid, unobtrusive validation doesn't work (I have only tried inline mode so far). I know the older telerik grid would wrap the grid in a form element, but I'm not sure if this is the only reason the validation doesn't work or if it manually occurred under the hood. My input elements in edit mode are getting correct data-val-* attributes but they aren't being evaluated on the client prior to adding/editing.

Any feedback would be appreciated.
Adam
Top achievements
Rank 1
 answered on 31 Jul 2012
1 answer
530 views
Hello I need help to find how to write 2 events.
1_ OnDatabinding not exist inEvents(events => events....
2_ OnComplete not exist in Events(events => events....

In KendoUI I not find how to write the events "DataBinding" and "Complete" to call javascript functions.

@(Html.Kendo().Grid(Model.Sors)
        .Name("Grid")
        .EnableCustomBinding(true)
        .Columns(columns =>
        {
            columns.Bound(o => o.TransactionId).Width(20).Title("<input id='selectAll' type='checkbox' /").Sortable(false);
            columns.Bound(o => o.StaffName).Width(100).Title(LocaleUtil.Get(GuestMessageKeys.StaffName));
            columns.Bound(o => o.BuildingName).Width(100).Title(LocaleUtil.Get(BuildingMessageKeys.Building));
            columns.Bound(o => o.DateTime).Width(120).Title(LocaleUtil.Get(GlobalMessageKeys.DateTime)).Format(TelerikUtil.GetShortDateTimeFormat());
            columns.Bound(o => o.TransactionId).Width(30).Title(LocaleUtil.Get(GlobalMessageKeys.Change)).Sortable(false);
        })
        .Events(events => events.DataBound("Grid_OnDataBound"))
        .Events(events => events.DataBinding("Grid_OnDataBinding"))
        .Events(events => events.Complete("Grid_OnComplete"))
        .DataSource(dataBinding => dataBinding
            .Ajax()
            .Read("_KCustomBinding", "MassSorUpdate", new { Area = "MassProcessing" })
            .Total(Model.SorsTotal))
        .Pageable()
        .Sortable()
    )

My javascript
// Send additional data to the grid action method, in this case the ComboBox selected value.
function Grid_OnDataBinding(e) {
    e.data = { id: $("#UpdateType").val() };
    // uncheck select all combo
     $("#selectAll").attr("checked", false);
}
 
var totalGridRecords = 0;
function Grid_OnComplete(e) {
    totalGridRecords = e.response.total;
}
 
function Grid_OnDataBound(e) {
    e.row.cells[0].innerHTML = "<input type='checkbox' name='checkedRecords' value='" + e.dataItem.TransactionId + "' />";
    e.row.cells[4].innerHTML = "<a href='javascript:;' onclick='ShowSorDetailPopup( { transactionId: \"" +e.dataItem.TransactionId+ "\"})'>" + msgDetail + "</a>";
}

My customBinding where I need an "int id"
[GridAction(EnableCustomBinding = true)]
        public ActionResult _KCustomBinding([DataSourceRequest(Prefix = "Grid")] DataSourceRequest request, int id)
        {
            if (request.PageSize == 0)
            {
                request.PageSize = 10;
            }
 
            ViewClientFilter<SorDTO> viewClientFilter = new ViewClientFilter<SorDTO>();
            viewClientFilter.AddPageCount(request.PageSize);
            viewClientFilter.AddPageIndex(request.Page);
 
            ClientFiltersResponse<SorDTO> list = this.MassSorUpdateRepository.GetMassSorUpdatesList(id, viewClientFilter);
 
            return View(new GridModel
            {
                Data = list.Data,
                Total = list.Total
            });
        }

So how can I write these two events for the grid?
1_ DataBinding
2_ Complete

In Telerik I have this:
....
.ClientEvents(s => s.OnRowDataBound("Grid_OnDataBound"))
            .ClientEvents(s => s.OnDataBinding("Grid_OnDataBinding"))
            .ClientEvents(s => s.OnComplete("Grid_OnComplete"))
            .DataBinding(dataBinding => dataBinding.Ajax().Select("_CustomBinding", "MassSorUpdate", new { Area = "MassProcessing" }))
            .Pageable(settings => settings.Total(Model.SorsTotal))
            .EnableCustomBinding(true)
            .Sortable()

UPDATE:
==================================


Now I made this change and the grid call the action
.Ajax()
            // Enable batch mode
            .Batch(true)
            .Read(read => read.Action("_KCustomBinding", "MassSorUpdate", new { Area = "MassProcessing" })
                .Data("Grid_OnDataBinding"))
            .Total(Model.SorsTotal)

But it give me a null reference error on Sorts:
if (request.Sorts.Count == 0)   <= Sorts is = null or undefined

Petur Subev
Telerik team
 answered on 31 Jul 2012
3 answers
896 views
I'd like to use a Kendo grid in batch edit mode, but need to mark certain columns as readonly.  Is this feature supported?  If so, please advise as to how I can do this.  If not, could you advise as to when we can expect this?

EDIT: I see that this is still an issue in the Q2-2012 KendoUI release.  Please advise if/when you will be supporting this feature?
Mathias
Top achievements
Rank 1
 answered on 31 Jul 2012
Narrow your results
Selected tags
Tags
Grid
General Discussions
Scheduler
DropDownList
Chart
Editor
TreeView
DatePicker
ComboBox
Upload
MultiSelect
ListView
Window
TabStrip
Menu
Installer and VS Extensions
Spreadsheet
AutoComplete
TreeList
Gantt
PanelBar
NumericTextBox
Filter
ToolTip
Map
Diagram
Button
PivotGrid
Form
ListBox
Splitter
Application
FileManager
Sortable
Calendar
View
MaskedTextBox
PDFViewer
TextBox
Toolbar
MultiColumnComboBox
Dialog
DropDownTree
Checkbox
Slider
Switch
Notification
Accessibility
ListView (Mobile)
Pager
ColorPicker
DateRangePicker
Security
Wizard
Styling
Chat
DateInput
MediaPlayer
TileLayout
Drawer
SplitView
Template
Barcode
ButtonGroup (Mobile)
Drawer (Mobile)
ImageEditor
RadioGroup
Sparkline
Stepper
TabStrip (Mobile)
GridLayout
Badge
LinearGauge
ModalView
ResponsivePanel
TextArea
Breadcrumb
ExpansionPanel
Licensing
Rating
ScrollView
ButtonGroup
CheckBoxGroup
NavBar
ProgressBar
QRCode
RadioButton
Scroller
Timeline
TreeMap
TaskBoard
OrgChart
Captcha
ActionSheet
Signature
DateTimePicker
AppBar
BottomNavigation
Card
FloatingActionButton
Localization
MultiViewCalendar
PopOver (Mobile)
Ripple
ScrollView (Mobile)
Switch (Mobile)
PivotGridV2
FlatColorPicker
ColorPalette
DropDownButton
AIPrompt
PropertyGrid
ActionSheet (Mobile)
BulletGraph
Button (Mobile)
Collapsible
Loader
CircularGauge
SkeletonContainer
Popover
HeatMap
Avatar
ColorGradient
CircularProgressBar
SplitButton
StackLayout
TimeDurationPicker
Chip
ChipList
DockManager
ToggleButton
Sankey
OTPInput
ChartWizard
SpeechToTextButton
InlineAIPrompt
TimePicker
StockChart
RadialGauge
ContextMenu
ArcGauge
AICodingAssistant
SegmentedControl
+? more
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?