Telerik Forums
UI for ASP.NET MVC Forum
3 answers
1.1K+ views

Hi guys, I'm new to the Kendo, I want single search option on top of the grid.How can I make this using Kendo controls?

Viktor Tachev
Telerik team
 answered on 16 Apr 2019
3 answers
1.4K+ views

Hi!

 

I have a kendo grid  in my MVC project, with inline editing enabled and everything works beautifully. I use read, update and create methods on the datasource to manage the data.

I also have a summary section on my page, so after a user edits a row, i need to update the summary and there is no "built in method" on the DataSource for this.

So after some investigation, it seems i need to use the requestEnd event, however, as soon as i do that, the read, update and create methods stop working.

Is there a workaround for this?

Below is small piece of the code, I've removed some not relevant bits:

                            .DataSource(dataSource => dataSource
                                .Ajax()
                                .ServerOperation(false)
                                .AutoSync(true)
                                .Model(model => model.Id(i => i.Id))
                                .Read(read => read.Action("Index", "InvoiceGrid", Model.SelectedVendorId))
                                .Update(update => update.Action("UpdateGrid", "InvoiceGrid"))
                                .Create(create => create.Action("AddInvoice", "InvoiceGrid", new { batchId = batch.batch.Id }))
                                //.Events(ev => ev.RequestEnd("refreshSummary"))
                                ).ToHtmlString()

If i uncomment the Events line above, it breaks the read, update and create methods.

Is there a workaround for this?

Bruce

Bruce
Top achievements
Rank 1
 answered on 15 Apr 2019
3 answers
249 views
I have been looking through the forms for sometime now to find an answer. I have a hierarchy grid that works well. However I need to iterate through the data later. I want to eager load my hierarchy grid. The only thing I have found so far are some older answers using jquery from 2013 here . Is there a more modern approach using Asp.net MVC I could use?
Hans
Top achievements
Rank 1
 answered on 15 Apr 2019
11 answers
396 views

High,

I just updated to 2019.1.115 and have a problem with the Kendo Menu. The links have lost their blue color. See the attached screenshots for the difference. Other links are blue as expected. Can you please help me restore the blue color to the links in the Menu control?

 

Best regards,

Henrik

Devin
Top achievements
Rank 1
 answered on 12 Apr 2019
12 answers
347 views

We downloaded the telerik toolkit trial and then downloaded MVC VSExtentions for VS 2017 but we didnt find the add new scaffolding item. would you please help?

 

Nencho
Telerik team
 answered on 12 Apr 2019
3 answers
495 views

Hello,

We have a DatePicker which has the 'Year' view so you can only select months. We wish to only allow the user to select Quarters (March, June, Sept & Dec). 

I can only seem to disable by days of week. Is there anyway to disable by months of year?

Thank you

Lucy

Alex Hajigeorgieva
Telerik team
 answered on 11 Apr 2019
5 answers
265 views

I'm trying to get some dropdownlists in some columns in a non-editable grid (row), the reason is these column may contain more data than just 1 entry per row and a dropdown would let the user be able to quickly view the extra entries for that column.

All the examples I've seen are for editable grids (rows).

Is this even possible? 

Asking because everything I've tried to date just hasn't worked.

Thanks

Alex Hajigeorgieva
Telerik team
 answered on 10 Apr 2019
6 answers
1.2K+ views

Currently I group on a hidden field like

GridHelpers.FilterableColumn(columns, m => m.Id).Hidden() .ClientGroupHeaderTemplate(".  . . . .");

And as part of the DataSource I added

.DataSource(dataSource => 
{
dataSource
. . . . . .
.Group(g => g.Add(p => p.Id))
;
})

But this seems to alter the way the grid is sorted for display. Is there a hook that I can influence the sorting for the grid?

 

 


Viktor Tachev
Telerik team
 answered on 10 Apr 2019
2 answers
408 views

Our dropdownlist is in a popup editor of a kendogrid.

It has a databound event where we conditionally select the 1st item.

.Events(events => events.DataBound("function() { if (this.value() == '' && this.dataSource.data().length == 1) { this.select(1); } }"))

This works to change the dropdown (and it's hidden input), but when we post back the value is zero. 

If we manually select the 1st item then it binds and posts back correctly.

A similar databound event works on other screens, but it just seems to be only a problem the built-in popup editor of the kendo grid.

Any ideas how to get the .select to update the dataItem & post back correctly?

Dimitar
Telerik team
 answered on 09 Apr 2019
1 answer
1.5K+ views

Hello,

I'm using Kendo Grid that displays a set of data based on different filter criteria (Textboxes and DropDownLists values).

I was wondering if using CompositeFilterDescriptor is an ideal way of filtering data instead of using a standard LINQ approach. 

Examples provided below.

I've tested multiple queries with Kendo Filtering with lots of criteria and different kind of operators (equal, contains, greaterThan etc..) and everything looks fine. Will I face any limitations with this approach?

 

The standard LINQ approach:
(Controller)

 

var query =
(from x in products where
x.ProductName == textSearch ||                      
x.Model == textSearch ||                      
x.Category == dropDownValue||                      
x.Seller == dropDown2Value||                      
x.Country == textSearch ||                      
x.Description == textSearch
select new Product(){
ProductId = x.ProductId,
ProductName =  x.ProductName,
Category = x.Category,
Seller = x.Seller,
Country = x.Country,
Description = x.Description
}).ToDataSourceResult(request);

 

 

The Kendo Filtering approach:

(Controller)

CompositeFilterDescriptor filterDescriptor = new CompositeFilterDescriptor
            {
                LogicalOperator = FilterCompositionLogicalOperator.Or,
                FilterDescriptors = new FilterDescriptorCollection()
                {
                    new FilterDescriptor(){Member = "Product", Operator = FilterOperator.IsEqualTo, Value = textSearch},
                    new FilterDescriptor(){Member = "Model", Operator = FilterOperator.IsEqualTo, Value = textSearch},
                    new FilterDescriptor(){Member = "Category", Operator = FilterOperator.IsEqualTo, Value = dropDownValue},
                    new FilterDescriptor(){Member = "Seller", Operator = FilterOperator.IsEqualTo, Value = dropDown2Value},
                    new FilterDescriptor(){Member = "Country", Operator = FilterOperator.IsEqualTo, Value = textSearch},
                    new FilterDescriptor(){Member = "Description", Operator = FilterOperator.IsEqualTo, Value = textSearch},
                }
            };
 
request.Filters.Add(filterDescriptor);
 
 var query = (from x in products
select new Product()
{
ProductId = x.ProductId,
ProductName =  x.ProductName,
Category = x.Category,
Seller = x.Seller,
Country = x.Country,
Description = x.Description
}).ToDataSourceResult(request);

 

Thank you!

Georgi
Telerik team
 answered on 09 Apr 2019
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
Dialog
MultiColumnComboBox
DropDownTree
Checkbox
Slider
Switch
Notification
Accessibility
ListView (Mobile)
Pager
Security
ColorPicker
DateRangePicker
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
DropDownButton
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
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
SmartPasteButton
PromptBox
SegmentedControl
LLM Kit
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?