Telerik Forums
Kendo UI for jQuery Forum
1 answer
1.2K+ views
Is there a way to show line breaks in Kendo Grid cells?

I've tried adding <br /> tags to the content but they are just displayed as text instead of showing up as line breaks.

Any help would be appreciated.
Dimo
Telerik team
 answered on 20 Mar 2012
3 answers
559 views
I would like to Submit my page on click of a button. I am not able to figure out how I could do this, could you please help.

I had added the <form> tags and tried using the JS way of doing the submit:
 function submitform() {
            document.forms["myform"].submit();
        }

But this is erroring out with the JS error
  1. Uncaught Error: Syntax error, unrecognized expression: );
    1. c.querySelectorAll.mjquery-1.7.1.min.js:3
    2. f.fn.extend.findjquery-1.7.1.min.js:3
    3. c.Observable.extend._findViewkendo.all.min.js:9
    4. c.Observable.extend.navigatekendo.all.min.js:9
    5. c.Observable.extend._startHistory.e.changekendo.all.min.js:9
    6. w.extend.triggerkendo.all.min.js:9
    7. kendo.Observable.extend.navigatekendo.all.min.js:9
    8. f.event.dispatchjquery-1.7.1.min.js:3
    9. f.event.add.h.handle.i


I think I am doing something fundamentally wrong. 
Petyo
Telerik team
 answered on 20 Mar 2012
1 answer
104 views
I have been reviewing your demos here and believe I have found an error/typo: http://demos.kendoui.com/dataviz/api/index.html

Under Configuration > series > type="line" you have a "stacked" property that can be set.  However, when I set this property to true my series do not stack.  I noticed that under "View Code" that instead of a "stacked" property, a "stack" property is used.  I changed my code to use "stack" instead of "stacked" and the series now stack as expected.  Is this a typo under Configuration > series > type="line"?

Thanks,
Sara
Hristo Germanov
Telerik team
 answered on 20 Mar 2012
1 answer
338 views
Hi

I'm trying to override this CSS for the Text box validation but it doesn't work and i dont know if im missing anything there.

.k-textbox .k-tooltip-validation
{
     margin-left: -20px !important;
}

thanks
Dimo
Telerik team
 answered on 20 Mar 2012
1 answer
78 views
So here is my problem, I have a page design to work on that is, in theory a 3 x 3 grid like this...

    X X X
    X X X 
    X X X

Where each X is a thumbnail. So far, no problem! Except the grid REALLY looks like this....

    * X X
    X * * 
    X * X

Where the * is a empty space ( a blank placeholder graphic ). The pattern will never change. The question is how can I inject some smarts into the grid templating (native or combined with JQuery templating) that will "skip" an iteration but not gobble up the data intended for that space?

Ken

Alexander Valchev
Telerik team
 answered on 20 Mar 2012
1 answer
203 views
Hi,

I'm trying to put two (or more) Kendo Grids on my page; both grids use a separate oData request to load their data, i.e. with a data source of type:'odata'.

Having either of those grids on the page works fine, but having both of them in the same page does not work: the columns for both grids are shown, but neither grid has any data rows.

I noticed that both oData requests get the following querystring param + value: $callback=callback

I'm not entirely sure how the callback thing works, but shouldn't the values have been different? For example, $callback=grid1callback and $callback=grid2callback, respectively?

If this is indeed the problem, is there a way to override the $callback value?
Rosen
Telerik team
 answered on 20 Mar 2012
4 answers
564 views
Hi,
I am trying to bind JSON data with KENDO grid but can't figure out how to do it. following is the snippet of my code

            <script type="text/javascript">
                $(document).ready(function () {
                    $("#grid").kendoGrid({

                        height: 360,  groupable: true, scrollable: true, sortable: true, pageable: true,

                        columns: [{field: "name",title: "Name"},{field: "number",title: "Number"},{field: "type",title: "Type"},
                                        {field: "low",title: "Low"},{field: "high",title: "High"},{field: "status",title: "Status"}],

                        dataSource: {
                            transport: {
                                read: {
                                        // the remote service url
                                    url: "/DomainService/KendoDomainService.svc/json/GetSpt_values",
                                        // JSONP is required for cross-domain AJAX
                                    dataType: "jsonp"}}},

                                    schema: {
                                        // the data which the data source will be bound to is in the "results" field       
                                        //data: "GetSpt_valuesResult"
                                    }});});

            </script>

When i run above URL in my browser, i get data from json. So, i have data and i have the kendo grid. The data i am fetching from the MasterDB (SQL SERVER) SPT_VALUES table.

the data snippet is as follow:

{"GetSpt_valuesResult":{"TotalCount":2506,"RootResults":
[{"high":null,"low":null,"name":"rpc","number":1,"status":0,"type":"A "},
{"high":null,"low":null,"name":"pub","number":2,"status":0,"type":"A "},
{"high":null,"low":null,"name":"sub","number":4,"status":0,"type":"A "},
{"high":null,"low":null,"name":"dist","number":8,"status":0,"type":"A "}
]}}

Could you please help my in binding data as i am really new to the jquery.

Kind Regards,
waseem

Waseem
Top achievements
Rank 1
 answered on 20 Mar 2012
0 answers
90 views
I am looking at applying row wise data type validations for my kendo grid(editable).
for e.g. row 1 - accepts string values only
row 2 accepts number values only.
Right now i can apply column wise data type by model/schema fields definitions.
Is there a way to define this row wise ?

thanks in advance

mahesh
Mahesh
Top achievements
Rank 1
 asked on 20 Mar 2012
0 answers
75 views
I am looking at applying rowwise datatype validations for my kendo grid(editable).
for e.g. row 1 - accepts string values only
row 2 accepts number values only.
Right now i can apply column wise datatype by model/schema fields definitions.
Is there a way to define this row wise ?

thanks in advance

mahesh
Mahesh
Top achievements
Rank 1
 asked on 20 Mar 2012
2 answers
205 views
Hi,

I would like to bind Kendo Grid using Ajax enabled WCF and returning a data either in json or xml format. But the problem is that my kendo UI Grid is not binding with my web service. The webservice returns the data without any problem. Any help would be greatly appreciated.

Webservice Data :

{"d":["20417","20418","20419","20420","20421","20422","20424","20425","20426","20427","20443","20480","20489","20491","20492","20495","20497","20498"]}

[ServiceContract(Namespace = "QS")]
[AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)]
public class PSService
{
     
    [OperationContract()]
    [WebGet(BodyStyle = WebMessageBodyStyle.WrappedRequest)]
    public string[] GetJobs()
    {
        try
        {
            StringBuilder sb = new StringBuilder();
            sb.Append("select ID from ff_job");
            string sql = sb.ToString();
            DataTable dt = Database.Instance.ExecuteQueryToDataTable(sql);
            List<string> IJobList = new List<string>();
            string sJobID;
            foreach (DataRow dr in dt.Rows)
            {
                sJobID = dr["ID"].ToString();
                IJobList.Add(sJobID);
            }
            return IJobList.ToArray();
        }
        catch (Exception ex)
        {
            Console.WriteLine(ex.Message.ToString());
            return null;
        }
 
    }


<div id="grid">
</div>

<
script type="text/javascript">
       $(document).ready(function () {
           $("#grid").kendoGrid({
               dataSource: {
                   type: "odata",
                   transport: { read: "http://localhost:3444/BootStrap/PSService.svc/getjobs" },
                   pageSize: 10
               },
               schema: {
                   model: {
                       fields: {
                           ID: { type: "number" }
 
                       }
                   }
               },
               height: 360,
               groupable: true,
               scrollable: true,
               sortable: true,
               pageable: true,
               columns: [{
                   field: "ID",
                   width: 90,
                   title: "Job No."
               }]
           });
       });
   </script>
Muhammad
Top achievements
Rank 1
 answered on 20 Mar 2012
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
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?