Telerik Forums
Kendo UI for jQuery Forum
1 answer
241 views
I have this grid, It's created through viewmodel that returns two objects, one of them is in a list form and create  columns dynamically. I don't have trouble setting values, I can do this perfectly using javascrip. But, when I click to save returns the controller only null values in the list, could set values in a list like this?
Thanks

Grid:
@(Html.Kendo().Grid(Model)
    .Name("Programas")
    .Columns(columns =>
    {
        columns.Bound(t => t.Programa.ProgramaId).Title("Programa");
   
        for (var i = 0; i < ViewBag.num; i++)
        {
            columns.Bound(e => e.Empresas[i].Selected).ClientTemplate("#=funcao(Empresas[" + i + "])#");
               
                
        }
    })
    .Filterable()
    .ToolBar(tb => tb.Save()
    .Editable(ed => ed.Mode(GridEditMode.InCell))
    .DataSource(data => data
        .Ajax()
            .Model(mod => {
                mod.Id(m => m.Programa.ProgramaId);
                  
            })
        .Batch(true)
        .Read(read =>read.Action("GetProgramas","ProgramaRede", new { id = ViewBag.RedeId}))
        .Update(up =>up.Action("UpdateProgramas","ProgramaRede", new { id = ViewBag.RedeId })
        )))
JS:
function set(line, checkbox) {
   
    var state = $(line).is(':checked');
    var grid = $('#Programas').data().kendoGrid;
    var dataSource = grid.dataSource.view()[line.id]
       
   
    for (var c = 0; c < dataSource.Empresas.length; c++)
        if (dataSource.Empresas[c].Value == checkbox) {
               
            dataSource.Empresas[c].set("Selected", state)
               
            dataSource.dirty = true;
   
        }
}
   
function funcao(emp, prog) {
       
    retorno = "<input type='checkbox' onclick='set(this,\"" + emp.Value + "\")'  class='chkbx' id=" + prog + " " + ((emp.Selected) ? "checked = 'checked'" : '') + " class='chkbx' />";
       
    return retorno;
}
Update Controller:
        [AcceptVerbs(HttpVerbs.Post)]
        public ActionResult UpdateProgramas(short id, [DataSourceRequest] DataSourceRequest request, [Bind(Prefix = "models")]  IEnumerable<ProgramaRedeViewModel> model)
        {
///////function to editing
}
Petur Subev
Telerik team
 answered on 12 Apr 2013
2 answers
209 views
Is it possible to bind a complex object to both the master grid and the subgrid using the html helper?  For example, if I have a collection of Employers, and each Employer contains a collection of Employees, and these collections share a EmployeeId.  Is it possible to bind the Employer to the master grid, and have the subgrid bound to Employees?  I need this to all be bound simultaneously so that the main and subgrids can both be displayed when the page loads.  Thanks.
Wayne
Top achievements
Rank 1
 answered on 12 Apr 2013
0 answers
58 views
Hi
I successfully bind from chrome but not from explorer 9.
do you know about this ?
I can see in fiddler that the json url is not called, why ?
Thanks


var items = new kendo.data.DataSource({
schema: {data: "GetProdByBizResult.RootResults"},
type: "json",
serverFiltering: true,
transport: {
read: {
url:"http://www.yelotag.com/light/BizRef-Web-DomainService1.svc/JSON/GetProdByBiz",
datatype:"json",
data: {bizId: window.bizId,
lg: window.lg
}
}
}
});
Michal Revivo
Top achievements
Rank 1
 asked on 12 Apr 2013
2 answers
82 views
After you enter text in the filter field (from a filterable mobile listview) the cancel icon that is supposed to display to the right of the field is not the correct icon.
Kenneth
Top achievements
Rank 1
 answered on 12 Apr 2013
0 answers
128 views
Hi
With aspx you can pass parameter in the url like
http://www.mytestapp.com/asp/default.aspx?lg=0&bizId=46958&name=nathaliePastry.com

how you can pass parameters for an html page

http://www.myTestapp.com/my/sushi.html ??????

Thanks
Michal Revivo
Top achievements
Rank 1
 asked on 11 Apr 2013
0 answers
123 views
Hi
I am testing the sample sushi web.
How I can debug the javacript and display the number of items for example.
It's running in chrome but nor in explorer.
I try to use F12 for explorer but didn't succeed to display the number of items.
Could you help ?
Thanks

var items = new kendo.data.DataSource({
      schema: {data: "GetProdByBizResult.RootResults"},
                        type: "json",
      serverFiltering: true,
      transport: {
                            read: {
        url:"http://www.yelotag.com/light/BizRef-Web-DomainService1.svc/JSON/GetProdByBiz",
        datatype:"json",
         data: {bizId: window.bizId,
          lg: window.lg
         }
        }
                        }
                    });
Michal Revivo
Top achievements
Rank 1
 asked on 11 Apr 2013
0 answers
106 views
Hi Everyone,

I am new to kendo ui, and past two weeks I was working on some grid functionality using ASP.Net web Api, LINQ to Entity and Kendo UI. I am able to do serverFiltering, serverPaging and serverSorting, but i have a difficulty in the serverGrouping: true.

It would be really helpful if you share the idea, if someone already did this functionality.

Your help is greatly appreciated.

Pandian
Pandiyarajan
Top achievements
Rank 1
 asked on 11 Apr 2013
4 answers
114 views
Hi there,
i made an iOS App, where I´m using the Mobile List View and Pull to refresh, without any Problems.

After porting my App to Android I ran into problems with the loading spinner. There is no Javascript error and the content gets refreshed as expected but the spinner isn't hiding after the refresh. My Code looks like this:

01.var dataSource = new kendo.data.DataSource({
02. transport: {
03.read: {
04. url: "URL.TO.MY.SERVER",
05.contentType: "application/json; charset=utf-8",
06.type: "GET",
07.dataType: "jsonp",
08.data: {
09.foo: "bar",
10.type: "start",
11.device: deviceID
12.}
13.}
14.}
15.});
16. 
17.$("#listView").kendoMobileListView({
18.          dataSource: dataSource,
19.          template: kendo.template($("#template").html()),
20.          pullToRefresh: true,
21.          pullTemplate: "Zum Aktualisieren runterziehen",
22.          releaseTemplate: "Zum Aktualisieren loslassen",
23.          refreshTemplate: "Aktualisiert..."
24.});

Tested Devices:
HTC ONE - Android 4.0.3 (real device)
NEXUS ONE - Android 4.2.2 (AVD)
Kai
Top achievements
Rank 1
 answered on 11 Apr 2013
1 answer
1.5K+ views
Hi,
how do you set the column width for a command in a kendo Grid? All my columns have widths, and when the grid resizes, they all do nicely until I introduce a command button. I'd like to fix the command button column size and have the others stretch.
Regards,
Jack
Iliana Dyankova
Telerik team
 answered on 11 Apr 2013
5 answers
180 views
We are experiencing difficulties with inline javascript and oher events such as selecting text on the IPAD.
a typical problem on the IPAD is not firing a onClick handler or handler on a href <a href="javascript:...
In some cases, after many clicks, it does seem to work, feels like something is blocking the event.

When hooking events with Jquery
$("a.enlargePicture").on("click touchstart", function (e)
{
//do something.
e.preventDefault();
});
it seems to work fine.

Is there a way to get around this?
Alex Gyoshev
Telerik team
 answered on 11 Apr 2013
Narrow your results
Selected tags
Tags
Grid
General Discussions
Charts
Data Source
Scheduler
DropDownList
TreeView
MVVM
Editor
Window
DatePicker
Spreadsheet
Upload
ListView (Mobile)
ComboBox
TabStrip
MultiSelect
AutoComplete
ListView
Menu
Templates
Gantt
Validation
TreeList
Diagram
NumericTextBox
Splitter
PanelBar
Drag and Drop
Application
Map
ToolTip
Calendar
PivotGrid
ScrollView (Mobile)
Toolbar
TabStrip (Mobile)
Slider
Button (Mobile)
Filter
SPA
Drawing API
Drawer (Mobile)
Globalization
LinearGauge
Sortable
ModalView
Hierarchical Data Source
Button
FileManager
MaskedTextBox
View
Form
NavBar
Notification
Switch (Mobile)
SplitView
ListBox
DropDownTree
PDFViewer
Sparkline
ActionSheet
TileLayout
PopOver (Mobile)
TreeMap
ButtonGroup
ColorPicker
Pager
Styling
Chat
MultiColumnComboBox
Dialog
DateRangePicker
Checkbox
Timeline
Drawer
DateInput
ProgressBar
MediaPlayer
ImageEditor
TextBox
OrgChart
Accessibility
Effects
PivotGridV2
Licensing
ScrollView
Switch
TextArea
BulletChart
QRCode
ResponsivePanel
Wizard
CheckBoxGroup
Localization
Barcode
Breadcrumb
Collapsible
MultiViewCalendar
Touch
RadioButton
Stepper
Card
ExpansionPanel
Rating
RadioGroup
Badge
Captcha
Heatmap
AppBar
Loader
Security
TaskBoard
Popover
DockManager
TimePicker
FloatingActionButton
CircularGauge
ColorGradient
ColorPalette
DropDownButton
TimeDurationPicker
ToggleButton
BottomNavigation
Ripple
SkeletonContainer
Avatar
Circular ProgressBar
FlatColorPicker
SplitButton
Signature
Chip
ChipList
VS Code Extension
AIPrompt
PropertyGrid
Sankey
Chart Wizard
OTP Input
SpeechToTextButton
InlineAIPrompt
StockChart
ContextMenu
DateTimePicker
RadialGauge
ArcGauge
AICodingAssistant
SmartPasteButton
PromptBox
SegmentedControl
+? more
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?