Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
101 views

hi,

 

we are looking for a component (client side is preferred) that gets 2 inputs: a json schema and a json data fields that match the schema.

the component should generate a static html component (not inputs) to nicely display the data values according to the schema

for example in case we have 3 items of types string, number and boolean.

Name:  David the king

Age:      38

Married:    Yes

 

do you have such component?  maybe created as PDF?

Rumen
Telerik team
 answered on 03 Dec 2024
1 answer
75 views

Good afternoon,

I'm using a RadGrid with Batch Editing.  The grid is populated using OnNeedDataSource.

<telerik:RadGrid ID="RadGridEntries" runat="server" RenderMode="Lightweight" AllowSorting="True" CellSpacing="-1" GridLines="Horizontal"
    OnNeedDataSource="RadGridEntries_NeedDataSource" AllowAutomaticUpdates="false"
    AllowAutomaticInserts="false" AllowAutomaticDeletes="false" OnBatchEditCommand="RadGridEntries_BatchEditCommand"
    OnPreRender="RadGridEntries_PreRender">
    <ClientSettings>
        <Scrolling AllowScroll="true" UseStaticHeaders="true" SaveScrollPosition="true" />
    </ClientSettings>
    <MasterTableView Name="Authorities" AutoGenerateColumns="false" DataKeyNames="Index_id"
        CommandItemDisplay="Top" EditMode="Batch" BatchEditingSettings-OpenEditingEvent="DblClick" HeaderStyle-HorizontalAlign="Center">
        <CommandItemSettings ShowRefreshButton="false" />
        <BatchEditingSettings EditType="Row" HighlightDeletedRows="true" />
        <Columns>
            <telerik:GridBoundColumn DataField="Index_id" UniqueName="Index_id" ReadOnly="true" Visible="false" Exportable="false" />
            <telerik:GridBoundColumn DataField="Authority" SortExpression="Authority" UniqueName="Authority"
                HeaderText="Authority" MaxLength="2">
				<ColumnValidationSettings EnableRequiredFieldValidation="true">
					<RequiredFieldValidator ForeColor="Red" Text="*Authority is required" Display="Dynamic">
					</RequiredFieldValidator>
				</ColumnValidationSettings>
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="Short_description" SortExpression="Short_description" UniqueName="Short_description"
                MaxLength="30" HeaderText="Short Description" ItemStyle-HorizontalAlign="Left" HeaderStyle-Width="150px">
				<ColumnValidationSettings EnableRequiredFieldValidation="true">
					<RequiredFieldValidator ForeColor="Red" Text="*Short Description is required" Display="Dynamic">
					</RequiredFieldValidator>
				</ColumnValidationSettings>
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="Long_description" SortExpression="Long_description" UniqueName="Long_description"
                MaxLength="100" HeaderText="Long Description" ItemStyle-HorizontalAlign="Left" HeaderStyle-Width="200px" />
            <telerik:GridTemplateColumn DataField="Percentage" SortExpression="Percentage" UniqueName="Percentage" HeaderText="Percentage">
                <ItemTemplate>
                    <%#DataBinder.Eval(Container.DataItem, "Percentage","{0} %")%>
                </ItemTemplate>
                <EditItemTemplate>
                    <span>
                        <telerik:RadNumericTextBox RenderMode="Lightweight" Width="75px" runat="server" ID="txtPercentage"
                            MaxValue="100" MinValue="-100">
                            <NumberFormat DecimalDigits="3" NegativePattern="-n %" PositivePattern="n %" />
                        </telerik:RadNumericTextBox>
                        <span style="color: Red">
                            <asp:RequiredFieldValidator ID="rvPercentage"
                                ControlToValidate="txtPercentage" ErrorMessage="*Percentage is required" runat="server" Display="Dynamic">
                            </asp:RequiredFieldValidator>
                        </span>
                    </span>
                </EditItemTemplate>
            </telerik:GridTemplateColumn>
            <telerik:GridCheckBoxColumn DataField="IsPriceList" DataType="System.Boolean" SortExpression="IsPriceList"
                StringFalseValue="0" StringTrueValue="1" HeaderText="Price List" />
            <telerik:GridBoundColumn DataField="Date_amended" SortExpression="Date_amended" HeaderText="Date Amended" ReadOnly="true" />
        </Columns>
    </MasterTableView>
</telerik:RadGrid>

In RadGridEntries_BatchEditCommand I'm capturing the old and new values:

Hashtable newValues = command.NewValues;
Hashtable oldValues = command.OldValues;

But the Percentage template column is missing from OldValues:

The Percentage column is stored as a decimal(6,3).  I'm trying to display the value with the 3 d.p and a % sign.  It's not stored as a percentage i.e. if the value is stored as 10.505 then it is displayed as 10.505 - I'm not storing it divided by 100.

I'm using the Command Item buttons to Save and Insert.

What can I do to make sure that the Percentage Old Value is stored so that I can compare it to the New Value?

Kind regards,

Richard

Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
 answered on 29 Nov 2024
1 answer
136 views

I just updated to ASP>NET AJAX 2024 Q4 and I get an error in the following code...

string fileName = "SampleFile.xlsx"; 
 
IWorkbookFormatProvider formatProvider = new XlsxFormatProvider(); 
 
using (Stream output = new FileStream(fileName, FileMode.Create)) 
{ 
    formatProvider.Export(workbook, output); 
} 

'formatProvider.Export(workbook, output);' is looking for an additional parameter now 'TimeSpan? timeout'.

I took a guess and entered null and it seems to work.

What are the options for this new parameter?

Rumen
Telerik team
 updated answer on 29 Nov 2024
2 answers
109 views

When you switch between the Design tab and the HTML tab in the RadEditor, it does not remember your position in the text/content.

It seems like this is a bug, but I am wondering if there is any way to tell the RadEditor to remember the position when switching between those two tabs.

If you have a large amount of content with many HTML tags it becomes quite difficult to find the exact position you were in on the other tab.

 

Rumen
Telerik team
 answered on 29 Nov 2024
1 answer
61 views

Hello,

 

I have the advanced template setup like so in the radscheduler:

 


                        <AdvancedEditTemplate> 
                        <div class="card" style="padding:10px" >
                            <div class="card-header corpsnet_panelPrimary" style="padding:10px">
                                <strong><h4><asp:Label ID="lblTitle"  runat="server" Text='<%# Bind("RosterDateStringLong") %>' ></asp:Label></h4></strong>
                            </div>
                            <div class="card-body smallscreensection" style="padding:10px">
                                <div class="container">
                                    <div class="row">
                                        <div class="col-md-4" >                                           
                                           CREW:</h5>
                                        </div>
                                        <div class="col-md-8" >
                                            <h5 class="card-title"><asp:Label ID="lblCrew" runat="server" Text='<%# Bind("CrewName") %>' ></asp:Label></h5>
                                        </div>
                                    </div>
                                    <div class="row">
                                        <div class="col-md-4" >                                           
                                           <h5>SUPERVISOR:</h5>
                                        </div>
                                        <div class="col-md-8" >
                                            <h5 class="card-title"><asp:Label ID="Label1" runat="server" Text='<%# Bind("SupervisorUserProfileName") %>' ></asp:Label></h5>
                                        </div>
                                    </div>
                                    <div class="row">
                                        <div class="col-md-4" >                                           
                                           <h5>MEETING POINT (Click for directions):
                                        </div>
                                        <div class="col-md-8" >
                                            <h5 class="card-title-link"><asp:HyperLink runat="server" ID="hyplnkMeetingPoint" Target="_blank" Text='<%# Bind("MeetingPointDescription") %>' NavigateUrl='<%# Bind("MeetingPointURL") %>' ></asp:HyperLink></h5>
                                        </div>
                                     </div>
                                    <div class="row">
                                        <div class="col-md-4" >                                           
                                           <h5>MEETING/START TIME:
                                        </div>
                                        <div class="col-md-8" >
                                            <h5 class="card-title"><asp:Label  ID="lblStartTime" runat="server" Text='<%# Bind("StartTimeString") %>' ></asp:Label></h5>
                                        </div>
                                     </div>
                                    <div class="row">
                                        <div class="col-md-4" >                                           
                                           <h5>PROJECT:</h5>
                                        </div>
                                        <div class="col-md-8" >
                                            <h5 class="card-title"><asp:Label  ID="lblProject" runat="server" Text='<%# Bind("Project") %>' ></asp:Label></h5>
                                        </div>
                                     </div>
                                    <div class="row">
                                        <div class="col-md-12" >                                           
                                           <asp:Button ID="btnClose" CssClass="btn btn-primary" runat="server" Text="Close" OnClientClick="closeEditForm(); return false;" />
                                        </div>
                                     </div>
                                </div>
                            </div>
                        </div>
                        </AdvancedEditTemplate>                         

I want the close button to revert to the weekview from the edit form.  I can get the form to close but it's then blank.  How do I show the radscheduler weekview view again on close.  here is my closeEditForm javascript function


        function closeEditForm() {
            var scheduler = $find("<%= RadScheduler1.ClientID %>");
            scheduler.hideAdvancedForm();
            // Switch the view to Month View
            scheduler.set_selectedView(Telerik.Web.UI.SchedulerViewType.MonthView);
            scheduler.navigateToDate(new Date()); // Optional: Navigate to today's date 
            return false;
        }
thanks!!
Rumen
Telerik team
 answered on 27 Nov 2024
4 answers
93 views

I try to use

         <telerik:RadFileExplorer ID="RadFileExplorer1" Runat="server" EnableEmbeddedSkins="True"
             InitialPath="\\network\EL00394132">
             <Configuration ViewPaths="\\network\EL00394132" 
                 DeletePaths="\\network\EL00394132" 
                 UploadPaths="\\network\EL00394132" SearchPatterns="*.*"/>
        </telerik:RadFileExplorer>

 

access a network shared folder by creating my own FileBrowserContentProvider 

            this.RadFileExplorer1.Configuration.ContentProviderTypeName = typeof(Extensions.NetworkShareProvider).AssemblyQualifiedName;

It can view files

 

But when I try to upload a file

 

After click Upload button, it triggers my own FileBrowserContentProvider class

but no files are being uploaded, then get an error

 

it dose not trigger

 

How to fix? Please help !

Rumen
Telerik team
 answered on 22 Nov 2024
1 answer
86 views

When I try to open a file I'd like to be able to click on a link to an Excel file and have it open directly in Excel on my computer, without any intermediate popup windows. Is this possible? or download to local?

Rumen
Telerik team
 answered on 22 Nov 2024
1 answer
71 views
How to make this "Drop Files Here" zone bigger?



Rumen
Telerik team
 answered on 22 Nov 2024
1 answer
202 views
Hello

I have a grid with many columns, for this I created a horizontal and vertical scroll bar, but I would also like to fix the header, but when I need to scroll vertically and horizontally and the header follows, it only works vertically, horizontally the header does not follow the columns.

Thank you in advance
Vasko
Telerik team
 answered on 22 Nov 2024
1 answer
56 views
Hello,

I have two projects with very similar code and I can identify the properties that concern the reordering of columns on the client:

<ClientSettings AllowColumnsReorder="True" ReorderColumnsOnClient="True" EnableRowHoverStyle="true">

The difference between the projects is that one uses a masterpage.

Any suggestions?
Vasko
Telerik team
 answered on 21 Nov 2024
Narrow your results
Selected tags
Tags
+? 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?