Telerik Forums
UI for ASP.NET MVC Forum
3 answers
240 views

Is there a way to localize the optionlabel text a bit like that:

....

  .OptionLabel(@Localizer["MyLocalizedOptionLabel"].Value)

....

Thanks

Nencho
Telerik team
 answered on 16 Feb 2017
3 answers
343 views

I'm using a grid with a popup editor and use bootstrap layout.

I have done the right styling override but the right margin is not there. Any suggestions.

In the Razor view of the grid

<style>
  .k-edit-form-container {
    width: auto;
    padding:10px;
  }
 
    .k-edit-form-container div {
      box-sizing: border-box;
    }
</style>

In the popup editor

<div class="row">
  <div class="col-md-3">
    <div class="form-group form-group-sm">
      <label asp-for="NAME_RES" class="control-label"></label>
      <div>
        <input asp-for="NAME_RES" class="form-control" />
        <span asp-validation-for="NAME_RES" class="text-danger" />
      </div>
    </div>
  </div>
  <div class="col-md-3">
    <div class="form-group form-group-sm">
      <label asp-for="TYPE_RES" class="control-label"></label>
      <div>
        <select asp-for="TYPE_RES" asp-items=@ViewBag.arType class="form-control"></select>
      </div>
    </div>
  </div>
  <div class="col-md-3">
    <div class="form-group form-group-sm">
      <label asp-for="ROLE_RES" class="control-label"></label>
      <div>
        <select asp-for="ROLE_RES" asp-items=@ViewBag.arRole class="form-control"></select>
      </div>
    </div>
  </div>
  <div class="col-md-3">
    <div class="form-group form-group-sm">
      <label asp-for="IDENTNUMBER_RES" class="control-label"></label>
      <div>
        <input asp-for="IDENTNUMBER_RES" class="form-control" />
        <span asp-validation-for="IDENTNUMBER_RES" class="text-danger" />
      </div>
    </div>
  </div>
</div>

 

Thanks

 

Konstantin Dikov
Telerik team
 answered on 16 Feb 2017
1 answer
143 views

Is there a way to localize field in the popup editor of a grid.
I've try to use the legacy way but it does not work.

I've tried using appropriate resource file

...
@inject IViewLocalizer Localizer
@using Microsoft.AspNetCore.Mvc.Localization
...
        <div>
          <label class="control-label">@Localizer["idsResidents"]</label>
        </div>

Or

...
@inject IViewLocalizer Localizer
@using Microsoft.AspNetCore.Mvc.Localization
...
        <div>
          <label class="control-label">@Localizer["idsResidents"].Value</label>
 </div>
Stefan
Telerik team
 answered on 16 Feb 2017
10 answers
885 views
Could you provide a sample of how to get the data item for a row?
Carlos
Top achievements
Rank 1
 answered on 15 Feb 2017
1 answer
907 views
I have a grid setup to show a popup editor for creating items.  The problem I am running into is that depending on what the user selects in the popup editor, the code might create more than one item.  The controller method is returning all of the created items but only the first one gets added to the grid.  How do I either a) get the grid to show all of my added items or b) refresh the grid?  I can't just reload the page because there are other items on that page that I don't want to reload.
Stefan
Telerik team
 answered on 15 Feb 2017
6 answers
2.3K+ views

I have a ClientDetailsTemplate where the details grid contains InCell editing.  I have added the Toolbar Create and Save buttons to the grid, but I'd like to add a title to the toolbar to the left of the buttons.

Example:

Sub-Departments   [ Save Changes ]  [ Cancel Changes ] [ Add New record ]

I tried using the Toolbar.Template which gave me the title, but I lost the buttons.

What is the best way to achieve this?  If I need to use the Template, how to I get the 3 buttons included into the template along with the Title text?

 

Thanks,

Shawn

Shawn
Top achievements
Rank 1
 answered on 14 Feb 2017
1 answer
4.0K+ views

I have an inline grid, containing cascading foreign key drowdownlists with custom templates.

When selected value of one of the dropdownlist changes, I have to change the selected value of another foreign key dropdownlist within the grid.

 

I have subscribed to both Change and Select events of the source dropdownlist. Change event is working correctly. However Change event is also fired at initial load of the dropdownlist since the existing value of the foreign key is assigned to the dropdownlist. This isn't suitable for my scenario, since I want to get the event only when user manually changes the selection of the dropdownlist.

When I subscribe to Select Event, the event firing timing is exactly as I expect. It is only fired, when user manually changes the selection. However, the selected item's Text and Value properties are returned as "Undefined". I am accessing the properties as in the dropdownlist demo.

function onVehicleSelect(e) {
        if (e.item) {
            var dataItem = e.dataItem(e.item);
            console.log("event :: select (" + dataItem.Text + " : " + dataItem.Value + ")");
        }
    }

I am stuck in this problem since long time. Urgent help would be appreciated.

 

Konstantin Dikov
Telerik team
 answered on 14 Feb 2017
2 answers
119 views

Hi,

I would like to know if we can have a sort of foreign key mechanism in the Group method of the DropDownlist.

My goal is to group the item using a PrimaryKey (that is an Id of my records) but displaying the value of the record instead

of the Id in the label of the group displayed when the Dropdownlist is expanded.

Thanks.

Michel
Top achievements
Rank 1
 answered on 14 Feb 2017
1 answer
65 views
When I load data into a grid via a DataSourceRequest based Read action, I would like a column to always show a dropdown.  As it stands currently, in my limited experience, you either have to double click a row for InCell editing or click an Edit button for the PopUp editor, all interaction with the DataSourceRequest based Update action.  But I don't want my users to have to clikc a button, nor double click a row.  How can I show a dropdown in a specific column, for all rows without having to activate an edit mode?  Is it possible?  And I assume, I would have to use the Batch mode?
Konstantin Dikov
Telerik team
 answered on 14 Feb 2017
4 answers
1.3K+ views
Is it possible to prevent a postback from occurring when clicking the button, but still be able to to the click event to call a client-side javascript function?
Ivan Danchev
Telerik team
 answered on 13 Feb 2017
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
Licensing
Rating
ScrollView
ButtonGroup
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
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
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
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
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?