Telerik Forums
UI for ASP.NET MVC Forum
2 answers
311 views

Hi,

 

I am trying to implement same way as ASP.NET Core PDF Export Key Features Demo | Telerik UI for ASP.NET Core

but Its exporting in client side but it's not going to controller. Don't know what mistake I am doing. Is there a way to send the pad to controller and send it to email attachment. Below is my code.


        $("#btnSubmit").on("click", function (e) {
            e.stopPropagation();
            e.preventDefault();
            var sigval = signature.value();
            $('#lblSearchError').text('');
            if (sigval === undefined || sigval === '') {
                $('#lblSearchError').text('*Signature field is required.');
            } else {
                var data = $("#submitForm").serializeArray();
                var obj = { name: 'signature', value: sigval };
                data.push(obj);

                // Convert the DOM element to a drawing using kendo.drawing.drawDOM
                kendo.drawing.drawDOM($("#mainContect"))
                .then(function (group) {
                    // Render the result as a PDF file
                    return kendo.drawing.exportPDF(group, {
                        paperSize: "auto",
                        margin: { left: "1cm", top: "1cm", right: "1cm", bottom: "1cm" }
                    });
                })
                .done(function (data) {
                    // Save the PDF file
                    kendo.saveAs({
                        type: 'POST',
                        dataURI: data,
                        fileName: "Provider.pdf",
                        proxyURL: '@Url.Action("Submit", "Provider")'
                    });
                });
            }
        });

I tried proxyURL AND URL none of them worked. When I clicked on submit button it's just downloading the pdf file. But it not hitting controller.

and in controller 


        [HttpPost]
        public ActionResult Submit(string contentType, string base64, string fileName)
        {
            //if (!ModelState.IsValid)
            //{
            //    data.Id = 0;
            //    return Json(data, JsonRequestBehavior.AllowGet);
            //}

            //var providerData = portalServices.saveProviderData(data);
            //    return Json(providerData, JsonRequestBehavior.AllowGet);

            var fileContents = Convert.FromBase64String(base64);

            return File(fileContents, contentType, fileName);
        }

Babu
Top achievements
Rank 1
Iron
Iron
Iron
 answered on 23 Jun 2023
1 answer
130 views

I'm trying to use a menu helper in the drawer's Template and it's not working. Is this even possible?  Do you have any examples of using other controls with the helper? All the examples are pretty simple.

 

Ivan Danchev
Telerik team
 answered on 17 Nov 2022
1 answer
152 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
1 answer
383 views

Hi there,

I am using Kendo UI for ASP.NET MVC.

I am interested in using the Drawer as a side menu, but I can't seem to find a way to have it expanded by default when the page loads.  Is this possible?

 

Petar
Telerik team
 answered on 23 Jun 2021
3 answers
681 views

I tried to use fa icons in the drawer but it did not seem to resize / pad (in mini mode) properly. So some of the text was visible.

What am I missing?

Regards

Erwin

Tsvetomir
Telerik team
 answered on 03 Mar 2021
2 answers
297 views

Hi,

how can I toggle the drawer mini mode / expanded mode from within the drawer itself.

The samle code I found has the toggle button in some other control, for example the toolbar.

I would like to have the drawer in mini mode and one item  in the drawer to expand / collapse it.

When I expand the drawer from a handler function for itemClick, it expands but collapses at the end of the handler.

 

Regards

Erwin

erwin
Top achievements
Rank 1
Veteran
Iron
 answered on 07 Jun 2019
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
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?