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

I would like to be able to hide the spreadsheet formula bar as well as the row and column headers.  Is there any way to accomplish this?

Thanks,

Mark

Vessy
Telerik team
 answered on 15 Jun 2016
1 answer
77 views

I have a grid where a button on the form calls addRow().  So the row is in insert mode.  How do I prevent the user from leaving the row until the values entered have been entered and are valid.  Right now it is showing the hints when the user goes to another column without completing the cell but the user can completely leave the row and it remains empty of values.

 

Is there a way to call validate before calling grid.saveChanges()?

 

Eyup
Telerik team
 answered on 14 Jun 2016
3 answers
166 views

Hello,

I have the problem that one ForeignKey column depends on another ForeignKey column (see attached picture). As you can see the 
columns "Fachgruppe" depends on value in column "Sparte" - now this is not correct because I don't know how to display only the
values for "Fachgruppe" which depends on the current value of column "Sparte" in the row (for display and editing)?

these are sample values for that columns
Sparte     Fachgruppe
1             1
1             2
1             3
2             1
2             2
3             1
3             2

Is there a way to do this with MVC Grid?

robert

Konstantin Dikov
Telerik team
 answered on 14 Jun 2016
1 answer
103 views

I have a client side datasource grid with several count and sum aggregates that display their data correctly, but they doesn't update when a user filters a column that affects the result of such aggregates. Is it possible to do that? The only way I can think of is with an event that updates the footer, but I don't know how to achieve this.

My grid was created using razor.

Thanks in advance.

Viktor Tachev
Telerik team
 answered on 14 Jun 2016
1 answer
73 views

Hi,

I am trying to load SQL server data into a dropdownlist in an MVC project, database
first and it works fine as the long as the table is not joined in the
model diagram.

As soon as i bring other tables that are linked to the
one i need, the dropdown does not load data anymore.

Am I missing something?
How can i solve this?

Thx

Adrian

Nencho
Telerik team
 answered on 14 Jun 2016
3 answers
115 views
How to navigate through multilevel kendo mvc menu through keyboard. Right now tab only works for the first level items. The menu demos does not show keyboard navigation.
Ivan Danchev
Telerik team
 answered on 14 Jun 2016
1 answer
1.3K+ views

I am using kendo Grid of kendo of ASP.NET MVC 2016.1.412.

My code where I want to get selected is:

 

column.Bound(e => e.Username).Title("Username").Groupable(true).ClientTemplate("<a style='cursor:pointer' onclick=EditProductDataObject(Username)>#=Username#</a>");

 

Here instead of username I want to pass whole row object so I can read and use further the coming data.

Eyup
Telerik team
 answered on 14 Jun 2016
1 answer
180 views

I have a very basic grid that I built with the telerik mvc grid scaffolding.

 

I have a column called "parent"  that parent should display a 10 digit number, instead it displays "function (){return o}"

 

I have tried templating, toString and it shows the same thing.  every other column works as expected

 

 

@(Html.Kendo().Grid<AccountMove.act_trans_worktable>()
      .Name("grid")
      .Columns(columns =>
      {
          columns.Bound(c => c.customer_name);
          columns.Bound(c => c.reason);
          columns.Bound(c => c.parent);
      })
      .Pageable()
      .Navigatable()
      .Sortable(sortable =>
      {
          sortable.SortMode(GridSortMode.SingleColumn);
      })
      .Filterable()
      //.Scrollable()
      .DataSource(dataSource => dataSource
          .Ajax()
          .Read(read => read.Action("act_trans_worktable_Read", "mvcgrid"))
      )
)

Marin
Telerik team
 answered on 13 Jun 2016
9 answers
2.2K+ views

I have a editable Kendo grid with two datepicker inside, the kendo grid and it's controller are part an MVC Area. When i want to save a row the error is shown saying that the value introduced is not valid, i want the date format as dd/MM/yyyy. Those date fields have a template like this:

 

@(Html.Kendo().DatePicker()
        .Name("date")
        .Culture("es-MX")
        .Format("{0:dd/MM/yyyy}")
        .ParseFormats(new string[] { "dd/MM/yyyy" })
)

 

also in the columns definition have format and even a js function to get the value as i want

.Columns(columns =>
    {
        columns.Bound(p => p.InicioVigencia).Format("{0:dd/MM/yyyy}").ClientTemplate("#=getDate(InicioVigencia)#");
        columns.Bound(p => p.FinVigencia).Format("{0:dd/MM/yyyy}").ClientTemplate("#=getDate(FinVigencia)#");

}

function getDate(object) {
            if (object == null || object == "null" || object == "NULL" || object == "Null")
                return "";
            return kendo.toString(object, "dd/MM/yyyy");
        }

 

In the global.asax i set this properties in order to have the date format i want.

CultureInfo threadCultureInfo = (CultureInfo)CultureInfo.CurrentCulture.Clone();
            CultureInfo uiCultureInfo = (CultureInfo)CultureInfo.CurrentUICulture.Clone();

            threadCultureInfo.DateTimeFormat.ShortDatePattern = "dd/MM/yyyy";
            threadCultureInfo.DateTimeFormat.LongDatePattern = "dd/MM/yyyy hh:mm:ss tt";
            uiCultureInfo.DateTimeFormat.ShortDatePattern = "dd/MM/yyyy";
            uiCultureInfo.DateTimeFormat.LongDatePattern = "dd/MM/yyyy hh:mm:ss tt";

            Thread.CurrentThread.CurrentCulture = threadCultureInfo;
            Thread.CurrentThread.CurrentUICulture = uiCultureInfo;

But the system still showing the error, i have other datepickers defined as js in orther controller just like this

$(function () {
        $(".date-picker").kendoDatePicker({
            animation: {
                close: {
                    effects: "fadeOut zoom:out",
                    duration: 300
                },
                open: {
                    effects: "fadeIn zoom:in",
                    duration: 300
                }
            },
            format: "dd/MM/yyyy",
            culture: "es-MX"
        });
    });

And everyting is working fine, so i don't know why it is not working properly. if i change global.asax like this

CultureInfo threadCultureInfo = (CultureInfo)CultureInfo.CurrentCulture.Clone();
            CultureInfo uiCultureInfo = (CultureInfo)CultureInfo.CurrentUICulture.Clone();

            threadCultureInfo.DateTimeFormat.ShortDatePattern = "MM/dd/yyyy";
            threadCultureInfo.DateTimeFormat.LongDatePattern = "MM/dd/yyyy hh:mm:ss tt";
            uiCultureInfo.DateTimeFormat.ShortDatePattern = "dd/MM/yyyy";
            uiCultureInfo.DateTimeFormat.LongDatePattern = "dd/MM/yyyy hh:mm:ss tt";

            Thread.CurrentThread.CurrentCulture = threadCultureInfo;
            Thread.CurrentThread.CurrentUICulture = uiCultureInfo;

the grid that use the templates work properly but the view with the js stop working

Victor
Top achievements
Rank 1
 answered on 13 Jun 2016
5 answers
117 views

I have a scenario where I need a way for the user to cancel an insert once they have chose to insert a new row.

The configuration is InCell editing with a custom "save" button and a custom "add" on top of the view.  So the grid is in batch edit mode and is working fine other than when the user decides to insert a row.  If I place a default "Cancel" command that cancel button will be in every row.  That is one problem.

So I decided to have a hidden column at the end of the grid with a client template containing a "Cancel" button.

When they insert a new row I hook the onEdit event of the grid and make the column visible.  But in doing so all of the column widths get whacked out.  I searched a bit to find a resize row method but it is not working.

 

function resizeColumnDefaults() {
    debugger;
    resize(0, 250);
    resize(2, 100);
    resize(3, 100);
    resize(5, 100);
    resize(6, 100);
    resize(8, 120);
    resize(9, 300);
    resize(10, 75);
    resize(11, 75);
    resize(13, 75);
}
 
 
function resize(idx, width) {
    $("#Grid .k-grid-header-wrap") //header
       .find("colgroup col")
       .eq(idx)
       .css({ width: width });
 
    $("#Grid .k-grid-content") //content
       .find("colgroup col")
       .eq(idx)
       .css({ width: width });
}
 
 
function onEdit(e) {     
    var grid = $("#Grid").data("kendoGrid");
    grid.showColumn(11);
    resizeColumnDefaults();      
 
    }

 

Can someone offer a solution?

 

Thanks,

Reid

 

 

Galin
Telerik team
 answered on 13 Jun 2016
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
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
DateTimePicker
TimePicker
StockChart
RadialGauge
ContextMenu
ArcGauge
+? more
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?