Telerik Forums
UI for ASP.NET MVC Forum
4 answers
615 views

I want to do something like what happens at http://demos.telerik.com/aspnet-mvc/treeview/checkboxes, where when you click a node, its parent nodes light up but are not checked. I've looked at the demo and can't figure out how to make this happen. Any ideas would be helpful.

It's the end of the day on Friday, so I don't really have time right now to come up with samples of my code. If no one has an idea by Monday, I will do that.

Thanks!

Laurie

Dharmangi
Top achievements
Rank 1
Iron
 answered on 03 Oct 2022
0 answers
138 views

Hi, after following the guide on setting the colour of tasks on data binding, which worked great, we have noticed an issue. If we have something like the following tree

Level 1

-- Level 2

---- Level 3

---- Level 4

Level 5

Level 6

 

If level 3 and 4 have a background colour set to say purple.... its working fine, but if we collapse Level 2, Level 5 and 6 have the background colour changed to purple as Level 3 and 4 would have been.

 

From looking at the source code, Levels 5 and 6 seem to replace the details in the rows for Level 3 and 4 but don't change the styling used. What we need to do is on collapsing the level, we need to repaint the rows to refresh the styling.

 

Is there any event we can use to detect the expanding / collapsing function so i can call another function which repaints the displayed tasks? I've included 2 screenshots which demonstrate the behaviour.

James
Top achievements
Rank 1
 asked on 03 Oct 2022
1 answer
115 views

I have set  a java script method

validatePhone

to be called for customeValidator against any change on a RadMaskedTextBox.  But its never gets called.

Can you please help whats wrong here?

 

<td>
<telerik:RadMaskedTextBox ID="sNumberPhoneMasked" runat="server" SelectionOnFocus="CaretToBeginning"
Text='<%# SafeEval(Container, "DataItem.Test") %>' ValidationGroup="PhoneValidationGroup1" ></telerik:RadMaskedTextBox>
<asp:Label ID="sNumberPhoneMaskedValidationIndicator" runat="server" class="WizardValidationRequired_Person vAdjustment" >*</asp:Label>


<asp:CustomValidator runat="server" ID="sNumberPhoneMaskedValidator" ValidationGroup="PhoneValidationGroup1" ErrorMessage="Phone Number is required."
SetFocusOnError="true" ControlToValidate="sNumberPhoneMasked" ClientValidationFunction="validatePhone"></asp:CustomValidator>
<asp:ValidatorCalloutExtender ID="sNumberPhoneMaskedPopupValidator" runat="server"
TargetControlID="sNumberPhoneMaskedValidator" Width="200px" />

</td>

 

<td align="right" colspan="2">
<asp:Button ID="sPhoneGridEditFormSubmit" CssClass="button-blue" Text='<%# (Container is GridEditFormInsertItem) ? "Add" : "Update" %>'
runat="server" CommandName='<%# (Container is GridEditFormInsertItem) ? "Add" : "Update" %>' ValidationGroup="PhoneValidationGroup1"
CausesValidation="True"></asp:Button>&nbsp;
<asp:Button ID="sCancel" CssClass="button-blue" Text="Discard" runat="server" CausesValidation="False"
CommandName="Cancel"></asp:Button>
</td>

 

<script type="text/javascript">
function validatePhone(Source, args) {
debugger;
alert('test');
args.IsValid=false;

}
</script>
Rumen
Telerik team
 answered on 30 Sep 2022
1 answer
250 views

Hi,

I'm looking for some guidance on the best way to pivot data that is being returned from a .NET MVC controller. I'm able to read it into the regular grid by doing the following :

 

 @(Html.Kendo().Grid<Project.Models.viewMyModel>()
    .Name("grid")
    .ToolBar(tools => tools.Excel())
    .Columns(columns =>
    {

        columns.Bound(p => p.Field1).Width("auto");
        columns.Bound(p => p.Field2).Width("auto");
        columns.Bound(p => p.Field3).Width("auto");
        columns.Bound(p => p.Field4).Width("auto");

    })
       .Excel(excel => excel
       .FileName("Report1.xlsx")
       .ProxyURL("Report?handler=Save")
       .AllPages(true)
       )
    .Height(550)
    .AutoBind(false)
    .Pageable() 
    .Sortable()
    .Scrollable()
    .Resizable(r => r.Columns(true))
    .Filterable()
    .DataSource(dataSource => dataSource
    .Ajax()
    .Read(read => read.Action("GetSummary", "Reports").Data("getParams"))
    .PageSize(100)
    .ServerOperation(false)
    )
    .Events(ev => ev.ExcelExport("onExcelExport"))
    .NoRecords(n => n.TemplateId("no-records-template-id"))
    )

The form post submits some date parameters to the 'GetSummary' controller and returns the json data source for the grid.

I would like to pivot these results so that Field1 results are my column headers and the other fields are my rows. Would PivotGrid be a good option or is that overkill? If so - I wasn't sure how to get it to read the json results as as I did with the grid above. Or would you suggest I pivot/manipulate the data beforehand and continue to read with the traditional grid method?

Thanks,
Adam

     
Ivan Danchev
Telerik team
 answered on 29 Sep 2022
0 answers
206 views

At some point the telerik textbox has become a full widget and it generates a script.

I have a form where I need to have an input and it should look like the telerik textbox. I do not want to use the span / input template I just need to have the input alone.

I know I can define my own styling but I would need just a telerik class on the input that if I change something to be applied to all telerik textboxes.

Dan
Top achievements
Rank 1
Iron
Iron
Veteran
 asked on 27 Sep 2022
0 answers
613 views

Hi,

I have this code here inside the form and only code for the switch(), : 


<div class="create-section">
    @(
        Html.Kendo().Form<WeighmoreSouth32Web.Models.Role>()
            .Name("createForm")
            .HtmlAttributes(new { action = "Create", method = "POST" })
            .Validatable(v =>
            {
                v.ValidateOnBlur(true);
                v.ValidationSummary(vs => vs.Enable(true).TemplateId("validation-message"));
            })
            .Items(itemGroup =>
            {
                itemGroup.AddGroup().Layout("grid").Grid(g => g.Cols(3).Gutter(20)).Label("Role Info").Items(items =>
                {
                items.Add()
                .Field(f => f.RoleName)
                .Label(l => l.Text("Role Name"));
                items.Add()
                .Editor(e => e.Switch().Name("AddCustomer")).Field(f => f.AddCustomer)
                .Label(l => l.Text("Role Name*:"));
            });
        })

        )
   

</div>

 it is working fine for the textbox input but when I use switch to pass the true value it is passing it two times one true and other one false. But it does not do the same when switch is off, only passes the false value. Here is a picture of it. I did also tried some Js/Jquery code to bind it but it didn't worked as well. Please help. 

 

Rikki
Top achievements
Rank 1
 updated question on 26 Sep 2022
1 answer
118 views

https://docs.telerik.com/aspnet-mvc/html-helpers/data-management/listview/binding/ajax-binding

 

@(Html.Kendo().ListView<ListViewCore.Models.OrderViewModel>() .Name("ListView") .TagName("div") .ClientTemplateId("template") .DataSource(dataSource => dataSource .Ajax() .PageSize(6) .Read(read => read.Action("Orders_Read", "ListView").Data("additionalData")) ) .Pageable() ) <script> function additionalData() { return { firstName: "John", lastName: "Doe" }; } </script>

 

the .Ajax() instantly doenst work. EVERY sample fails !!!

 

Anyone have a listview<T> that actually works? the demos and samples all fail.

Eyup
Telerik team
 answered on 26 Sep 2022
1 answer
165 views
Hi everyone,

Need help, if it could be possible to turn off the slider of the drawer navigation. I mean when mouse is clicked and slide from left to right or right to left while clicking will open/close the drawer respectively. Is there any way I can disable it?  

Ivan Danchev
Telerik team
 answered on 22 Sep 2022
0 answers
162 views

Hi people,

I have a little big org chart.
https://dojo.telerik.com/OHoTuJiS/2

Does anyone have an idea how to optimize the chart ? How to make it more readable ? the free spaces are so big.

 

Thanks

Erich Čonka
Top achievements
Rank 1
 asked on 21 Sep 2022
1 answer
209 views

Is there anyway to use the DropDownTree without it having to make so many requests.

It looks like it is essentially building the tree one request at a time for each item inside it. This is ridiculously inefficient.

Why can't it be passed a single data structure in a request to build itself, after all a dropdownlist,  combobox even a grid can be built with a single request for the IList<data> to databind. 

There is little to no documentation on the DropDownTree control which is disappointing.

For a Data structure like this, it makes 6 request which makes no sense.

  • Item 1
    • Item 1A (parent=1)
    • Item 1B (parent=1)
  • Item 2
    • Item 2A (parent =2)
  • Item 3

 

Could someone at telerik please provide an example of how to create such a data structure that can be passed to the DropDownTree in one request to allow it to render this. Currently this control is not very usable if it needs one request per item.

A treeview will load all it's data with a single request that returns an

var data = (IList<DataModels>)object .ToTreeDataSourceResult(request, e => e.ID, e => e.Parent_ID, e => e);

Does the DropDownTree not have something similar to a TreeDataSource? Why can't it use the same TreeDataSourceResult Object?

Ivan Danchev
Telerik team
 answered on 20 Sep 2022
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
Edmond
Top achievements
Rank 1
Iron
fabrizio
Top achievements
Rank 2
Iron
Veteran
RobMarz
Top achievements
Rank 2
Iron
Fakhrul
Top achievements
Rank 1
Iron
Tejas
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Edmond
Top achievements
Rank 1
Iron
fabrizio
Top achievements
Rank 2
Iron
Veteran
RobMarz
Top achievements
Rank 2
Iron
Fakhrul
Top achievements
Rank 1
Iron
Tejas
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?