Telerik Forums
Kendo UI for jQuery Forum
0 answers
73 views
Please see the attached image.
It seems useless giving each box a height of 25%.

PS. everything is inside a <div data-role="view">
Fanzy
Top achievements
Rank 1
 asked on 07 Aug 2012
3 answers
497 views
Hi everyone,

I am trying to create a kendo dropdownlist that binds to a datasource from a web service.

Since I want to reduce the size of the sent data, I decide to use dictionary<string, string> instead of  a class that has properties for the select name and value.

However, I got a bit stuck on the mapping part since the dictionary<string, string> will convert to Json string as { "value1" : "name1", "value2" : "name2", ...}, hence javascript will see value{n} as properties and name{n} as their values instead of pairs of two separate value.

Bottom line is that I would like to convert these pairs of values into datasource fields "name", and "value". What would be the best way to tackle this?

Thank you,

Patt
John DeVight
Top achievements
Rank 1
 answered on 07 Aug 2012
0 answers
125 views
Hi,

I'm using kendo ui but it's very slow, combobox is loading firstly without any style then flushing with the kendo ui style?
can any one help on this?
Ahmed
Top achievements
Rank 1
 asked on 07 Aug 2012
1 answer
1.2K+ views
Hi All,
    I would like a button click on my page to programattically open a tab.

  // bind event for button

$("#btnShowMyTab").click( function(e) { 

var tabstrip = $("#informationTabstrip").kendoTabStrip().data("kendoTabStrip");

var myTab = tabstrip.tabGroup.children("li").eq(2);

// activate fact tab

    tabstrip.select(myTab);

});

The problem I am having is that for a split second, the tab I want to see shows up, but it is immediately replaced by whichever tab was open before I clicked the button.  The open tab I want does not stay open.

Does anyone see anything wrong with my click event ?

Thank you,
Kim

Alexander Valchev
Telerik team
 answered on 07 Aug 2012
1 answer
900 views
How to refresh a window from within? I have button in the window content that should refresh the window .
Alex Gyoshev
Telerik team
 answered on 07 Aug 2012
0 answers
62 views
Hi all,
The title describes my problem. ASP.NET AJAX provides the feature but not sure if its supported in MVC or does anyone have a workaround to this?
Regards,
Bernard
Bernard
Top achievements
Rank 1
 asked on 07 Aug 2012
1 answer
293 views
Hello  All ,

Im new    to Kendoui  web   and  i have been  getting my hands  dirty  with it .  but    i need  help  with  this  issue. im  using kendo with java or jsp  and  i could   read  records  from  an oracle database  unto the   grid.  and  i could  do an insert or  create operation to the  same oracle  database. but  i could not  do an update or delete operation  on the grid.  i keep  getting  an error . i  need  somebody to  tell  me what im doing  wrongly.  here is a sample of my code :   


  <Script>  
      
         
                      
    $("#grid").kendoGrid({
        
    dataSource: {
        transport: {
            read: "listdepart.jsp",
            create: {
                url: "insertdepart.jsp",
                type: "POST"
            } 
           
        },
        update:{
            url: "updatedepart.jsp",
            type:"POST"
        },
        destroy:{
            url:"deleletdepart.jsp",   
            type:"POST"
        },
        
          parameterMap: function (options, operation) {
                        if (operation !== "read" && options.models) {
                            return { models: kendo.stringify(options.models) };
                        }
                    
                },
            batch: true,
            pageSize:5 , 


        schema: {
            data: function(result) {     
              return result.data || result;
            },
            total: function(result) { 
                var data = this.data(result);
                return data ? data.length : 0;
            
        },
            
            model: {
                id: "deptid",
                fields: {
                   // id: { editable: false },
                   id: { validation: { required: true} ,type: "number" } ,
                   name: { validation: { required: true} }
                }
            }
            
        }
      
    },
    
  
    
    //detailTemplate: kendo.template($("#template").html()),
   //// detailInit: detailInit,
    editable: true,
    navigable: true,  // enables keyboard navigation in the grid
    pageable:true,
    serverPaging: true,
    groupable: true,
    sortable:true ,
    filterable:true,
   // toolbar: [ "save", "cancel" ,"create" ],  // adds save and cancel buttons,
    toolbar: [ { name :"create" , text: "Add New Department" }],  // adds save and cancel buttons,
    editable:"popup" ,
    columns: [{title: "Department ID", field: "deptid" }, { title: "Department Name",field: "name" } ,{ title: "Action", command: ["edit", "destroy"] }]
   
   
    
});
          
 </script>

here  are  my  jsp 

for insert
===========
<%
 
 response.setContentType("application/json"); 
try  {
String dept_id = request.getParameter("deptid");
String dept_name = request.getParameter("name");




String jdbcname = "jdbc/orcl";
    
    
    Context ctx = new InitialContext();
    Context envCtx = (Context)ctx.lookup("java:/comp/env");
    DataSource ds = (DataSource)envCtx.lookup(jdbcname);
    Connection conn = ds.getConnection();
    Statement stmt = conn.createStatement();
     ResultSet rs  = null ;




// if (bsave.equals("savechanges")) {
String cmd2 = "insert into   department  (deptid , name)  values ('"+dept_id+"' , '"+dept_name+"')";
  rs = stmt.executeQuery(cmd2);
            if (rs.next()) {
        StringBuffer data = new StringBuffer("{\"data\":["); 
               data.append("{\"Insert was done sucessfully"  + "\"},");
             data.setCharAt( data.length()-1,']');  // replace last character with ]
             data.append("}");
          out.println(data.toString());
            } else {
              StringBuffer data = new StringBuffer("{\"data\":["); 
               data.append("{\"Insert was not done sucessfully"  + "\"},");
             data.setCharAt( data.length()-1,']');  // replace last character with ]
             data.append("}");
          out.println(data.toString());
conn.close();
            }
     //}





 } catch(Exception e) {
    out.println("Error: " + e);
    e.printStackTrace();
  }
%> 

===============================================================================
for delete or update ( Almost  the   same just operations  )
==============================================================


 response.setContentType("application/json"); 
try  {
String dept_id = request.getParameter("deptid");
String dept_name = request.getParameter("name");




String jdbcname = "jdbc/orcl";
    
    
    Context ctx = new InitialContext();
    Context envCtx = (Context)ctx.lookup("java:/comp/env");
    DataSource ds = (DataSource)envCtx.lookup(jdbcname);
    Connection conn = ds.getConnection();
    Statement stmt = conn.createStatement();
     ResultSet rs  = null ;






String cmd2 = "delete  from   department  where  deptid = '"+dept_id+"'";
  rs = stmt.executeQuery(cmd2);
            if (rs.next()) {
        StringBuffer data = new StringBuffer("{\"data\":["); 
               data.append("{\"Delete Operation  was sucessfully"  + "\"},");
             data.setCharAt( data.length()-1,']');  // replace last character with ]
             data.append("}");
          out.print(data.toString());
            } else {
              StringBuffer data = new StringBuffer("{\"data\":["); 
               data.append("{\"Delete Operation  was not  sucessfully"  + "\"},");
             data.setCharAt( data.length()-1,']');  // replace last character with ]
             data.append("}");
          out.print(data.toString());
conn.close();
            }
 } catch(Exception e) {
    out.println("Error: " + e);
    e.printStackTrace();
  }
%> 
        
Any  help  to get this working   will  really  be appreciated.




Adebayo
Top achievements
Rank 1
 answered on 07 Aug 2012
1 answer
286 views
Hi,
I have used Kendo UI for doing my application in ASP.NET. Here I am calling a page as a view from a parent page. Both have separate master pages.. I can't create Date picker in child page which has the error while creating.

I am listing the source of the page here.

<%@ Page Title="" Language="C#" MasterPageFile="~/m/Blank.Master" AutoEventWireup="true"
    CodeBehind="FileDetails.aspx.cs" Inherits="LegalPaperwork.m.FileDetails" ValidateRequest="false" %>


<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <script src="../js/kendo/kendo.all.min.js" type="text/javascript"></script>
    <link href="../Styles/kendo/kendo.default.min.css" rel="stylesheet" type="text/css" />
    <link href="../Styles/kendo/kendo.common.min.css" rel="stylesheet" type="text/css" />
    <style type="text/css">
        .inputs
        {
            font-size: 15px !important;
            font-weight: normal;
        }
        .labels
        {
            font-size: 12px !important;
            font-weight: bold;
        }
        
        .heading
        {
            font-size: 12px !important;
            font-weight: normal;
        }
        
        .button
        {
            width: 150px !important;
            text-align: center;
        }
    </style>
  
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div id="example" class="k-content">
        <div data-role="view" id="issues" data-transition="slide">
            <div data-role="navbar" class="heading">
                Issues <a href="#appwrapper" data-role="backbutton" data-align="right">Cancel </a>
            </div>
            <div>
                <table align="center">
                    <tr>
                        <td width="50">
                            <asp:Label ID="Label15" runat="server" CssClass="labels" Text="File "></asp:Label>
                        </td>
                        <td>
                            <asp:Label ID="lblDocumentName0" runat="server" CssClass="labels"></asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <asp:Label ID="Label16" runat="server" CssClass="labels" Text="Case "></asp:Label>
                        </td>
                        <td>
                            <asp:Label ID="lblCase3" runat="server" CssClass="labels"></asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="2">
                            <asp:Label ID="Label17" runat="server" CssClass="labels" Text="Submitted to Court By "></asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="2">
                            <asp:DropDownList ID="dropSubmittedBy" runat="server" Width="255px" DataTextField="Name"
                                DataValueField="RowKey" CssClass="inputs">
                            </asp:DropDownList>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="2">
                            <asp:Label ID="Label18" runat="server" CssClass="labels" Text="Submitted to Court On"></asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="2">
                            <input id="datepicker" value="November 2011" style="width: 150px" />
                               
                        </td>
                    </tr>
                    <tr>
                        <td align="center" colspan="2">
                            <asp:Button ID="btnUpdateSubmission" runat="server" Text="Update" />
                        </td>
                    </tr>
                </table>
            </div>
        </div>
          <script type="text/javascript">
       
$(document).ready(function(){
 $("#datePicker").kendoDatePicker();
});
        
        </script>
    
</asp:Content>


----------------------------------------------------------
This is the error I am getting..
Microsoft JScript runtime error: Object doesn't support property or method 'kendoDatePicker'

 Why it is happen..?Please help me..
comgiu
Top achievements
Rank 2
 answered on 07 Aug 2012
0 answers
68 views
hi,

It is possible to use kendoAutoComplete in mobile application.

it is work or not

Thanks,
Raghwenda
Nick
Top achievements
Rank 1
 asked on 07 Aug 2012
0 answers
156 views
Hello,

I have an Editor Template in which only a DropDownList is present. I am trying to populate that DropDownList using an action on my controller. I have the following code:

@(Html.Kendo().DropDownListFor(m => m)
                .DataSource(
                    datasource => datasource
                        .Read(r => r.Action("GetPossibleLines", "ProductionProgram"))
                        .ServerFiltering(true)
                    )
                .DataTextField("Text")
                .DataValueField("Value")
                .HtmlAttributes(new { style = "width: 200px" }))

My action looks like this:

[HttpPost]
public ActionResult GetPossibleLines()
{
    var options =
        new List<SelectListItem>()
        {
            new SelectListItem() { Text = "LI50", Value = "51" }
        };
 
    return Json(options);
}

What am I doing wrong? The DropDownList doesn't get filled and keeps loading forever.
Max
Top achievements
Rank 1
 asked on 07 Aug 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
Application
Map
Drag and Drop
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
MultiColumnComboBox
Chat
DateRangePicker
Dialog
Checkbox
Timeline
Drawer
DateInput
ProgressBar
MediaPlayer
ImageEditor
TextBox
OrgChart
Effects
Accessibility
PivotGridV2
ScrollView
BulletChart
Licensing
QRCode
ResponsivePanel
Switch
Wizard
CheckBoxGroup
TextArea
Barcode
Breadcrumb
Collapsible
Localization
MultiViewCalendar
Touch
RadioButton
Stepper
Card
ExpansionPanel
Rating
RadioGroup
Badge
Captcha
Heatmap
AppBar
Loader
Security
TaskBoard
Popover
DockManager
FloatingActionButton
CircularGauge
ColorGradient
ColorPalette
DropDownButton
TimeDurationPicker
ToggleButton
TimePicker
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
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?