Telerik Forums
Kendo UI for jQuery Forum
3 answers
326 views
I noticed that when I use virtual scrolling with the example of frozen columns (http://demos.telerik.com/kendo-ui/web/grid/frozen-columns.html) using the MVC syntax, the rows are out of sync when I scroll to the bottom.
It appears as there is no blank space below the table with the frozen columns when a horizontal scrollbar is show in the non-frozen columns
Ronald
Top achievements
Rank 1
 answered on 02 May 2014
7 answers
256 views
Quite new to MVC and kendo and was wondering if there was a way to prevent panelbar from creating duplicate items and whats the best method to achieve this.

Here is my panelbar markup:
@(Html.Kendo()
                  .PanelBar()
                  .Name("panelbar")
                  .HtmlAttributes(new { style = "width:200px" })
                  .ExpandAll(true)
                  .BindTo(Model, (Kendo.Mvc.UI.Fluent.NavigationBindingFactory<PanelBarItem> mappings) =>
                  {
                      mappings.For<QueryModel>(binding =>
                      {
                          binding.ItemDataBound((panelitem, modelitem) =>
                              {
                                  panelitem.Text = modelitem.category;
                              });
 
                      });
                  })
                   
             )

Here is my class markup for the model:
public class QueryModel
    {
        public string category { get; set; }
        public string controlID { get; set; }
        public string controlType { get; set; }
        public System.Nullable<int> multiplier { get; set; }
        public string caption { get; set; }
        public string dropdownSQL { get; set; }
        public string columnSQL { get; set; }
        public string sortorder { get; set; }
        public string tooltip { get; set; }
    }

And here is my controller action:
public ActionResult Query()
        {
            QueryModel querydata = new QueryModel();
 
            var results = from s in dbContext.T223_Searches
                          join sd in dbContext.T224_SearchDetails on s.KeySearch equals sd.KeySearch
                          join sc in dbContext.T225_SearchCategories on sd.KeyCategory equals sc.KeyCategory
                          where sd.KeySearch == 3
                          orderby sd.SortOrder
                          select new QueryModel
                          {
                              category = sc.Description,
                              controlID = sd.ControlID,
                              controlType = sd.ControlType,
                              multiplier = sd.Multiplier,
                              caption = sd.Caption,
                              dropdownSQL = sd.DDLSQL,
                              columnSQL = sd.SQLColumn,
                              tooltip = sd.ToolTip
                          };
 
            return View("Query", results.ToList());
        }

Is there anyway in the controller action or actual panelbar markup to select DISTINCT category?  My model returns multiple rows which could have different or the same category.  Or is there a way I can check if the item with certain text exists already and not create it?

Also am I going about this the wrong way and do I need to have a separate model just for categories?
Petur Subev
Telerik team
 answered on 02 May 2014
1 answer
959 views
Hi,
    Today we have a new issue where e.masterRow[0].rowIndex does not give the correct row index.The scenario is like this.

We have a hierarhical grid which is prepopulated with 9 rows. I add a new row to this grid. when I click on the second row the child grid is populated.
I get the rowindex correctly. Now when I click on any row below the secong row the rowindex given by e.masterRow[0].rowIndex  would be incremented by 1. Is there any other method to get the row index of the currently selected row which needs to be expanded.


Regards,
Vijay
Atanas Korchev
Telerik team
 answered on 02 May 2014
2 answers
269 views
Hello, I am using KendoGrid to display events in my project along with server paging. I wish to use SignalR and view the events as and when they occur in the kendo grid without a refresh. I wanted to know if KendoGrid server paging could be used along with SignalR,if yes,please help me with some examples. Thank you.
Alka
Top achievements
Rank 1
 answered on 02 May 2014
2 answers
475 views
We are using the ImageBrowser with Azure Blob Storage, and we have a database with the images stored as "Files." Each File row contains FileId and Name. Let's use this row as an example:

FileId: "5d4acf03-7e9b-4dae-ba1a-d4ded83bba6d"
Name: "logo.jpg"

Once we have the FileId, we use that to create a new Blob Container in Azure (so it creates a new "directory" in Azure Storage with a URL like "https://clientname.blob.core.windows.net/5d4acf03-7e9b-4dae-ba1a-d4ded83bba6d/logo.jpg").

OK, so when I pass our list of images back to the Kendo ImageBrowser, the only property it has is "Name," which in this case is "logo.jpg". But if I set the imageUrl to "https://clientname.blob.core.windows.net/", then when it inserts the image into the Editor, the src is "https://clientname.blob.core.windows.net/logo.jpg", which is obviously incorrect. I still need the FileId, which will be different for every image. Both the thumbnailUrl and the imageUrl need the FileId as well to be able to properly build the correct URL.

I tried creating a custom schema like this:

schema: {
    model: {
        fields: {
            name: { field: "name" },
            type: { field: "type" },
            size: { field: "size" },
            containerId: { field: "containerId" }
        }
    }
}

And passed a "containerId" property back with each object from the Read action. But then I didn't know how to make the thumbnailUrl or imageUrl functions use that containerId property.

I'm stuck! Can you help me figure out how to make this work please? Thank you.
JohnVS
Top achievements
Rank 1
 answered on 01 May 2014
10 answers
2.4K+ views
I have trouble to update my datasource when the grid is edited.
See the following jsfiddle: http://jsfiddle.net/ewaldhofman/uU2th/8/

The update method in the transport of the datasource is never called when the value in the grid is updated.

What am I doing wrong?
King Wilder
Top achievements
Rank 2
 answered on 01 May 2014
7 answers
441 views
Hi.  I have a grid displaying using the following code.  As you can see, I have scrollable set to false and pageable set to true.  The pagesize is 6...  The problem is that even if I only have one row displaying in the grid, it still allows for scrolling.  The reason this is particularly problematic is that when I touch the screen, I may accidentally scroll it.  This has the unfortunate effect of making the keyboard pop up on the tablet device every time.  I would like to be able to solve both of these issues.  Please advise.  Thanks!

 
        <div id="clientsDb">
            <div id="gridViewDiv"></div>
        </div>
        
        <style scoped>
            #clientsDb{
                height: 100%;
                width: 100%;
                margin 0px auto 0;
                padding: 0px 0px 0 0px;
            }
        </style>


            var dataSource = new kendo.data.DataSource({
              data: viewModel.itemsArray,
              pageSize: 6
            });
                          
                          
            //gridview div for the main grid
            $("#gridViewDiv").kendoGrid({
                        dataSource: dataSource,
                        mobile: "tablet",
                        //height: kendo.support.mobileOS.wp ? "24em" : 430,
                        resizable: false,
                        //toolbar: ["create"],
                        columns: [
                            { field:"ItemDesc", title: "Item" },
                            { field: "QtyOrdered", title:"Qty",  width: "35px" },
                            { field: "ItemPrice", title:"Price", format: "{0:c}", width: "60px" },
                            { field: "PriceUOM", title:"Per", width: "35px" },
                            { field: "OrderAmount", title:"Order Amt", format: "{0:c}", width: "60px" },
                            { command: [{text: "qty", click: editRow}, {text: "remove", click: deleteRow}], title: "&nbsp;", width: "165px" }
                        ],
                        editable: "inline",
                        filterable: true,
                        sortable: true,
                        height: 320,
                        pageable: true,
                        scrollable: false,
                        columnMenu: true,
                        dataBound: function () {
                           $('td').each(function(){if($(this).text()=='0' || $(this).text()=='$0.00'){$(this).addClass('gridCellClass')}})
                        }
            });
Kiril Nikolov
Telerik team
 answered on 01 May 2014
3 answers
399 views
Hi,

We are using Kendo Grid in angularJS application. When we navigate to other page, we get this error message: "Cannot call method 'destroy' of kendoDropTarget before it is initialized".

We have groupable property set to true in kendoGrid. If we remove that, the error doesn't come. Seen a below forum posts, but not sure if you guys have actually fixed the issue or if there's a workaround for this which I'm not aware of?

Can you please let us know on this on priority. This is blocking us.

Post:
https://github.com/kendo-labs/angular-kendo/issues/66

Thanks!
Vladimir Iliev
Telerik team
 answered on 01 May 2014
1 answer
75 views
hi all.
i created an app with latest kendo mobile version. i use kendo mobile listview in the login view.
after submit my app version to apple they rejected it because they cannot enter text in login input field.
in previous ios version it works well.
any solutions?
regards,
maor
Kiril Nikolov
Telerik team
 answered on 01 May 2014
1 answer
271 views
Hi,

Implementing Kendo grid  using jquery  with MVC4  .First I am binding data with html table then put kendo jquery for paging and sorting. but sorting is not working correct .  html and jquery are below:-



 <table id="grid" class="table table_hover">
                    <thead>
                        <tr>
                            <th>Date</th>
                            <th>Order ID </th>
                            <th>Source</th>
                            <th>Destination</th>
                            <th>Items</th>
                            <th>Schedule Date</th>
                            <th>Type</th>
                            <th>Status</th>
                            <th>Action</th>
                        </tr>
                    </thead>
                    <tbody>
                        @foreach (var i in Model)
                        {
                            DMETrackContext objDMETrackContext = new DMETrackContext();
                            var OrderItems = (from p in objDMETrackContext.InventoryOrderItems where p.OrderId == i.InventoryOrderId select p).ToList();
                            <tr>
                                <td>
                                    @i.Created                                                                    
                                </td>
                                <td>
                                    @i.OrderIdExternal                                  
                                </td>
                                <td>
                                    @if (i.SourceInvLocationId != null)
                                    {
                                        var LocationDetail = (from p in objDMETrackContext.InventoryLocations where p.InventoryLocationId == i.SourceInvLocationId select p).FirstOrDefault();
                                        if (LocationDetail != null)
                                        {
                                       // @Html.ActionLink(LocationDetail.Name, "LocationDetail", new { controller = "Location", Id = LocationDetail.InventoryLocationId }, htmlAttributes: new { style = "color: rgb(58, 115, 206);" });
                                         <a title="@LocationDetail.Name" href="@Url.Action( "LocationDetail", "Location", new {Id = LocationDetail.InventoryLocationId  })"  style = "color: rgb(58, 115, 206);">@LocationDetail.Name</a>

                                        }
                                        else
                                        {
                                        @: N/A
                                         }
                                    }
                                    else
                                    {
                                        @: N/A
                                    }

                                </td>
                                <td>
                                    @if (i.DestinationInvLocationId != null)
                                    {
                                        var LocationDetail = (from p in objDMETrackContext.InventoryLocations where p.InventoryLocationId == i.DestinationInvLocationId select p).FirstOrDefault();
                                        if (LocationDetail != null)
                                        {
                                      //  @Html.ActionLink(LocationDetail.Name, "LocationDetail", new { controller = "Location", Id = LocationDetail.InventoryLocationId }, htmlAttributes: new { style = "color: rgb(58, 115, 206);" });
                                         <a title="@LocationDetail.Name" href="@Url.Action( "LocationDetail", "Location", new {Id = LocationDetail.InventoryLocationId  })"  style = "color: rgb(58, 115, 206);">@LocationDetail.Name</a>
                                        }
                                        else
                                        {
                                        @: N/A
                                         }
                                    }
                                    else
                                    {
                                        @: N/A
                                    }


                                </td>
                                <td>
                                    @OrderItems.Count
                                </td>
                                <td>
                                    @i.ScheduleDate
                                  
                                </td>
                                <td>

                                    @if (i.Type == 1)
                                    {
                                        @: Customer Order
                    }
                                    else if (i.Type == 2)
                                    {
                                        @: Customer Pickup
                    }
                                    else if (i.Type == 3)
                                    {
                                        @:Transfer
                    }

                                </td>
                                <td>

                                    @if (i.Status == 1)
                                    {
                                        @: Pending
                    }
                                    else if (i.Status == 2)
                                    {
                                        @: Picked
                    }
                                    else if (i.Status == 3)
                                    {
                                        @:Complete
                    }
                                    else if (i.Status == 4)
                                    {
                                        @:Canceled
                    }

                                </td>
                                <td>
                                    @*@Html.ActionLink("Edit", "EditLocation", new { controller = "Location", Id = @i.InventoryLocationId })*@
                                    @Html.ActionLink("Details", "InventoryOrderDetail", new { controller = "InventoryOrder", Id = @i.InventoryOrderId }, htmlAttributes: new { style = "color: rgb(58, 115, 206);" })
                                </td>
                            </tr>
                        }
                    </tbody>
                </table>
<script>
$("#grid").kendoGrid({
                sortable: true,
                scrollable: false,
                pageable: {
                    pageSize: 15, pageSizes: [15, 50, 100], messages: {
                        display: "Showing {0}-{1} from {2} data items"
                    }
                }
            });

</script>

I also modify the Jquery code to add schema but it not working for the date filed and anchor tag data file

$("#grid").kendoGrid({
                dataBound: addRowClickFeature,
                dataSource: {                   
                    schema: {
                        model: {
                            fields: {
                                Created: { type: "date", format: "{0:dd/MM/yyyy}" },
                                OrderID: { type: "number" },
                                Source: { type: "string" },
                                Destination: { type: "string" },
                                Items: { type: "number" },
                                Date1: { type: "date", format: "{0:dd/MM/yyyy}" },
                                Type: { type: "string" },
                                Status: { type: "string" }
                            }
                        }
                    }
                },
                sortable: true,
                scrollable: false,
                pageable: {
                    pageSize: 15, pageSizes: [15, 50, 100], messages: {
                        display: "Showing {0}-{1} from {2} data items"
                    }
                }
            });


Please suggest  how to apply sorting by using jquery 

Thanks
Alok
Vladimir Iliev
Telerik team
 answered on 01 May 2014
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
Chat
MultiColumnComboBox
Dialog
DateRangePicker
Checkbox
Timeline
Drawer
DateInput
ProgressBar
MediaPlayer
ImageEditor
TextBox
OrgChart
Accessibility
Effects
PivotGridV2
ScrollView
Switch
TextArea
BulletChart
Licensing
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
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
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
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?