Telerik Forums
UI for ASP.NET MVC Forum
1 answer
88 views

Let' s say, there a mvc grid with a dropdown list inside it. The grid has three mode; view edit and add modes, in other words users are able to  view, edit, and add records.

The data source of this dropdown list changes dynamically depending on the modes; for example,

if in view mode, the ddl lists item1, item2, item3 item4, and item5,

if in Add mode, the ddl lists item2, item3.

if in Edit mode, the ddl lists item2, item5,

That means the ddl source from different linq queries depending on grid modes.

Is it possible to achieve it? Thanks

Boyan Dimitrov
Telerik team
 answered on 12 Jun 2015
4 answers
109 views

Hi

I am using a customized response for the grid which contains the default "data" JSON in a property, such as:

{
  "success": true,
  "result": {
    "data": [
      {
        "srtOrder": 60,
        "id": 1
      },
      {
        "srtOrder": 70,
        "id": 1
      },
      {
        "srtOrder": 30,
        "id": 5
      }
    ],
    "total": 96,
    "aggregateResults": null,
    "errors": null
  },
  "error": null,
  "unAuthorizedRequest": false
}

 

So the grid should use the data from the "result" property.

How can I define this using the MVC version of the grid?

My model which is attached to the grid matches the "data" property.

Thomas
Top achievements
Rank 1
 answered on 12 Jun 2015
1 answer
94 views
How do you create a ViewModel to prevent from getting a circular reference error without changing the database?

Project table:
ProjectID primary key
other fields
Updates navigation property

Updates table:
UpdateID primary key
other fields
Project navigation property
Tam
Top achievements
Rank 1
 answered on 11 Jun 2015
4 answers
525 views

Hi,

 I am bind the kendo grid @ Client side. Any idea of how to show the destroy delete command based on other column status? Appreciate your help on this.

 

Thanks,

Edwin

Edwin
Top achievements
Rank 1
 answered on 11 Jun 2015
2 answers
106 views

Hello,

 I am having three tree views named role, responsibility, function . I can able to drag and drop a function to responsibility and responsibility to role.

Step 1: I have dragged a responsibility over the role node and the dropped responsibility has been added in the role

Step 2: I dragged a function  and dropped over the responsibility.

Step 3: After the dropped function on responsibility, the role also refreshing with the function which we don't want. How to restrict
this functionality.

Thanks and Regards,

Dharma

 

 

Dharmalingam
Top achievements
Rank 1
 answered on 11 Jun 2015
1 answer
1.1K+ views

i have a module with additional "dynamic" propertys, stored in a dictionary (loaded from DB, style of Entity-Attribute-Value

the module like this:

public class Contact
{
    public int ContactID { get; set; }
    public string FullName { get; set; }
    //...more fixed properties
 
    #region "handel dynamic property"
 
    public Dictionary<int, string> ValuesForDynamicProps = PropsNameToSpcailParameter.Values.ToDictionary(x => x.IdParameter, x => "");
 
    private void intDicFromContact(DAL.Contact contact)
    {
        foreach (var item in contact.ContactsParameters)
        {
            ValuesForDynamicProps[item.Parameter] = item.GetString;
        }
    }
     
    static StudentVM()
    {
        PropsNameToSpcailParameter = DAL.Contact.SpecialParamertersTypes().ToDictionary(x => x.ID, x =>
            new ModelSpecialParameter(x));
    }
 
    public static Dictionary<int, ModelSpecialParameter> PropsNameToSpcailParameter;
    #endregion
}

the View:

 

@(Html.Kendo().Grid(Contact)
    .Name("grid")
    .Columns(columns =>
    {
        columns.Bound(e => e.FullName).Width(120).Title("Name");
        //...more
          
        foreach (var item in ShutafimOrganizationsWebApp.UI.Models.StudentVM.PropsNameToSpcailParameter)
        {
            columns.Bound(e => e.ValuesForDynamicProps[item.Key]).Title(item.Value.DisplayName);
        }

I receive an exeption ""Bound columns require a field or property access expression."

 

MY QUESTION: i serarch an elegant and easy way to show in grid an model with posibilty to add and remove "virtual" propertys.

 

Ps: i asked in stackoverflow: http://stackoverflow.com/questions/30650326.

Daniel
Telerik team
 answered on 10 Jun 2015
1 answer
87 views

Hi all:

 We have a functional requirement to be able to edit the data in a column inside a kendo grid, by selecting a different header.

 For example, let's say we have a kendo grid that has six columns. 

 Name City Class etc

We need the ability for a user (with the given permission) to select a different option for each header column. 

Let's say they decide that they don't want "Class" as the third header/column.  We'd like the user to be able to click into the header, a dropdown appear and then the user can select a different data source.  Once selected the grid would update with the new data in the third column.

 Anyone able to point me in the right direction?  We also need to be able to reorder the kendo columns but I see that already with the Grid/Column reordering drag drop feature which is perfect.

 Thanks!

 

Boyan Dimitrov
Telerik team
 answered on 10 Jun 2015
1 answer
155 views

Hi 

How can I hide the Excel Export button in runtime? Depending on the logged in user I have to hide and show the Export Excel button.

Would you have some sample code?

 

Dimiter Madjarov
Telerik team
 answered on 10 Jun 2015
5 answers
404 views
I did the same as tutorial http://demos.telerik.com/aspnet-mvc/grid/excel-export . But as you can see in the tutorial, when you export the excel, it contains only page 1. 
I want to export all the the pages. How should i do ? 

Regards.
Dimiter Madjarov
Telerik team
 answered on 10 Jun 2015
9 answers
2.9K+ views
Hi! I'm using the KendoUI Grid with MVC 4.  I'm trying to figure out how to automagically save the cell data when I step out of the cell.  I can get it to save using a "Save" button and batch editing, but my requirements are such that they don't want to have to press the "Save" button.

Thanks for your help in advance.
Dimiter Madjarov
Telerik team
 answered on 10 Jun 2015
Narrow your results
Selected tags
Tags
Grid
General Discussions
Scheduler
DropDownList
Chart
Editor
TreeView
DatePicker
Upload
ComboBox
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
MultiColumnComboBox
Dialog
DropDownTree
Checkbox
Slider
Switch
Notification
ListView (Mobile)
Pager
Accessibility
ColorPicker
DateRangePicker
Wizard
Security
Styling
Chat
MediaPlayer
TileLayout
DateInput
Drawer
SplitView
Barcode
ButtonGroup (Mobile)
Drawer (Mobile)
ImageEditor
RadioGroup
Sparkline
Stepper
TabStrip (Mobile)
GridLayout
Template
Badge
LinearGauge
ModalView
ResponsivePanel
TextArea
Breadcrumb
ExpansionPanel
Rating
ScrollView
ButtonGroup
CheckBoxGroup
NavBar
ProgressBar
QRCode
RadioButton
Scroller
Timeline
TreeMap
TaskBoard
OrgChart
Captcha
ActionSheet
Signature
DateTimePicker
AppBar
BottomNavigation
Card
FloatingActionButton
Licensing
Localization
MultiViewCalendar
PopOver (Mobile)
Ripple
ScrollView (Mobile)
Switch (Mobile)
PivotGridV2
FlatColorPicker
ColorPalette
DropDownButton
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
+? more
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Iron
Iron
Andrey
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Iron
Iron
Andrey
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?