Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
170 views

I am using VS 2017 and Telerik UI for ASP.NET AJAX R3 2018. When I create a new Telerik Project using the Telerik C# Web Forms Site Template (Blank) and I add the following snippet to the placeholder div tag in the Default.aspx page ...

<telerik:RadTextBox
            ID="RadTextBox1"
            runat="server"
            Skin="WebBlue">
        </telerik:RadTextBox>
        <asp:RequiredFieldValidator
            ID="TextBoxRequiredFieldValidator"
            runat="server"
            Display="Dynamic"
            ControlToValidate="RadTextBox1"
            ErrorMessage="The textbox can not be empty!">
        </asp:RequiredFieldValidator>

 

... then the client side validation is not working.

When I enter a text and remove it, then the error message is not shown.

 

When I add jQuery by <script src="Scripts/jquery.min.js"></script> then client side validation is working.

That is not the correct solution as jQuery is already loaded by the telerik web ui assembly.

Adding a ScriptReference or a script ressource mapping is not solving the issue.

So, how I have to set up a telerik project to get the asp validators working as expected?

Kai-Uwe
Top achievements
Rank 1
 answered on 02 Oct 2018
2 answers
97 views

I would like to filter the FileExplorer results by combining a Session variable id and the remainder of the string.  

We have a IssueID and a issue may have files associated with it.  Once a supporting document file is uploaded it will have "<issueID>_" appended to the front, ie. 1009_myfile.txt.  I need the search pattern to be something like Session("IssueID") & "_*.*".  

How do I go about doing this?  

Here is code the client-side control

<telerik:RadFileExplorer ID="RadFileExplorer1" runat="server"
    EnableCreateNewFolder="false" Height="225" Width="890" EnableAsyncUpload="false">
    <Configuration ViewPaths="/SupportingDocs/" DeletePaths="/SupportingDocs/" />
</telerik:RadFileExplorer>

 

Tried the following in my code behind in the Page Load to no avail.  

Dim searchPatterns As String() = RadFileExplorer1.Configuration.SearchPatterns
searchPatterns = Session("IssueID") & "_*"
RadFileExplorer1.Configuration.SearchPatterns = searchPatterns

 

Vessy
Telerik team
 answered on 02 Oct 2018
1 answer
250 views

I have a radgrid that's in a NestedViewTemplate.  Basically a details grid.  I'm trying to access a combo box  that's inside the grid in the NestedViewTemplate.   

 

How can I find that control inside the details grid that's in a NestedViewTemplate

 

Thanks in advance

 

Eyup
Telerik team
 answered on 02 Oct 2018
1 answer
297 views

Hi! Good Evennig, currently I work with Kend for MVC and JavaScript and I want to know if there is  anything like this : https://demos.telerik.com/aspnet-ajax/orgchart/examples/templates/defaultcs.aspx

 

Thanks

Rumen
Telerik team
 answered on 02 Oct 2018
2 answers
326 views
I need to display results in a RadGrid from the selected parameters inside a report viewer via a stored procedure.

Can someone please brifely explain how I can accomplish this based on the below stored procedure: The 4 parameters in the report viewer are selected and used in the stored procedure below:
ALTER PROCEDURE [dbo].[SelectProductInfoByShipAndDate]
    @CruiseLine nvarchar(max),
    @Ship nvarchar(max),
    @FromDate date,
    @ToDate date
AS
BEGIN
    SET NOCOUNT ON;
    Select *
        FROM dbo.Daily_Totals
        WHERE CruiseLine IN (SELECT * FROM dbo.SplitParameterValues(@CruiseLine, ','))
          AND Ship IN (SELECT * FROM dbo.SplitParameterValues(@Ship, ','))
          AND [Date] BETWEEN @FromDate AND @ToDate
         ORDER BY CruiseLine, Ship, [Date], Product1Cash, Product2Cash, Product3Cash, Product4Cash, Product5Cash, Product6Cash, Sales
END
Kathryn
Top achievements
Rank 1
 answered on 02 Oct 2018
2 answers
143 views

Is it possible to process a button click event prior to doing the upload of the file?  

What I am hoping to do is have a user submit a support ticket and have the ability to add a supporting document at the same time.  When they submit the ticket it returns the new ID.  I then need to upload the file and append the issueID to the front of the file name.  Currently I click the button and it processes the file upload first and then finishes the button onclick event.  

 

Kurt Kluth
Top achievements
Rank 1
 answered on 01 Oct 2018
1 answer
207 views

Using the following code I found in one of the demos. The radgrid is bound to a sqldatasource.

When I update or insert, there is no parameter created for the binary image to send data to the database ( I have added onUpdating and onInserting events to the sql data source, and have inspected the DBParameters collection, and there is no parameter passed containing the binary data of the image.) other columns from the grid are passed as parameters correctly, there is simply no sqlparameter for the image data.

How can I rectify this?

Also, the radupload dialog to select a image does not seem to work with the allowedfileextensions option. Also I specify jpg only, I see all file types in the selection dialog. Is there a way to only show those files w/ the allowed extensions?

 

<telerik:GridTemplateColumn DataField="Data" HeaderText="Image" UniqueName="Upload">
 <ItemTemplate>
  <telerik:RadBinaryImage runat="server" ID="RadBinaryImage1" DataValue='<%#Eval("Data") %> AutoAdjustImageControlSize="false" Height="80px" Width="80px" ToolTip='<%#Eval("Name", "Photo of {0}") %>' AlternateText='<%#Eval("Name", "Photo of {0}") %>'> 
  </telerik:RadBinaryImage>
 
</ItemTemplate>
 <EditItemTemplate>
  <telerik:RadAsyncUpload RenderMode="Lightweight" runat="server" ID="AsyncUpload1" AllowedFileExtensions="jpg" >
  
</telerik:RadAsyncUpload>
 </EditItemTemplate>
 </telerik:GridTemplateColumn>

 

Marin Bratanov
Telerik team
 answered on 01 Oct 2018
1 answer
1.1K+ views

Hi

how to find row values of a selected row in a radgrid? c#

I have a radbutton inside a radgrid.

 

<telerik:RadGrid ID="dg" runat="server" AllowSorting="true" Width="100%"
                        RenderMode="Auto" PageSize="10" AutoGenerateColumns="false" 
                        AllowPaging="true">
                        <PagerStyle Mode="NextPrevAndNumeric" Position="TopAndBottom" PageSizeControlType="RadComboBox"
                            AlwaysVisible="true"></PagerStyle>
                        <MasterTableView HierarchyDefaultExpanded="false">
                            <CommandItemSettings AddNewRecordText="Nuevo" CancelChangesText="Cancelar" RefreshText="Actualizar"
                                ShowRefreshButton="false" />
                            <Columns>                                
                                <telerik:GridTemplateColumn HeaderText="Id" Visible="false">
                                    <ItemTemplate>
                                        <asp:Label ID="lblID" runat="server" Text='<%# Eval("Idtip") %>'></asp:Label>
                                    </ItemTemplate>
                                    <EditItemTemplate>
                                        <asp:Label ID="lblIDEd" runat="server" Text='<%# Eval("Idtip") %>' Visible="false"></asp:Label>
                                    </EditItemTemplate>
                                </telerik:GridTemplateColumn>
                                <telerik:GridTemplateColumn HeaderText="Tipo">
                                    <ItemTemplate>
                                        <asp:Label ID="lblDescr" runat="server" Text='<%# Eval("Nombre") %>'></asp:Label>
                                    </ItemTemplate>
                                    <EditItemTemplate>
                                        <asp:TextBox ID="txtEditDescr" runat="server" Text='<%# Eval("Nombre") %>' Width="220px"></asp:TextBox>
                                    </EditItemTemplate>
                                </telerik:GridTemplateColumn>
                                <telerik:GridTemplateColumn>
                                    <ItemTemplate>
                                        <telerik:RadButton ID="btnEditlist" runat="server" OnClick="btnEditlist_Click" Text="" RenderMode="Auto" CausesValidation="false">
                                            <Icon PrimaryIconCssClass="rbEdit" />
                                        </telerik:RadButton>
                                    </ItemTemplate>
                                </telerik:GridTemplateColumn>
                                <%--<telerik:GridEditCommandColumn UniqueName="EditCommandColumn">
                                </telerik:GridEditCommandColumn>--%>
                                <telerik:GridButtonColumn Text="Delete" CommandName="Delete" />
                            </Columns>
                        </MasterTableView>
                        <ClientSettings EnableRowHoverStyle="true">
                        </ClientSettings>
                    </telerik:RadGrid>

and the button event 

protected void btnEditlist_Click(object sender, EventArgs e)
        {
             GridItem reng = sender as RadButton.NamingContainer as GridItem;
             GridDataItem Info = sender as RadButton.NamingContainer as GridDataItem;
             string Id = reng.FindControl("lblID") as Label.Text;
        }

 

But I can´t find the row values.

 

 

Marin Bratanov
Telerik team
 answered on 01 Oct 2018
1 answer
261 views

Running 2018.3.910

request, 

function RefreshGrid() {
    $find("ctl00_cphMain_RadAjaxManager1").ajaxRequest("Rebind");
    getClientCart();
}

 

Manager,

<telerik:RadScriptManager ID="RadScriptManager1" runat="server"></telerik:RadScriptManager>
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" OnAjaxRequest="RadAjaxManager1_AjaxRequest">
      <AjaxSettings>
         <telerik:AjaxSetting AjaxControlID="RadAjaxManager1">
            <UpdatedControls>
               <telerik:AjaxUpdatedControl ControlID="grCart" />
            </UpdatedControls>
         </telerik:AjaxSetting>
         <telerik:AjaxSetting AjaxControlID="grCart">
            <UpdatedControls>
               <telerik:AjaxUpdatedControl ControlID="grCart" />
            </UpdatedControls>
         </telerik:AjaxSetting>
          <telerik:AjaxSetting AjaxControlID="RadAjaxManager1">
            <UpdatedControls>
               <telerik:AjaxUpdatedControl ControlID="lvDelMethods" />
            </UpdatedControls>
         </telerik:AjaxSetting>
      </AjaxSettings>
    </telerik:RadAjaxManager>

 

server side,

protected void RadAjaxManager1_AjaxRequest(object sender, Telerik.Web.UI.AjaxRequestEventArgs e)
    {
        if (e.Argument == "Rebind")
        {
            grCart.Rebind();
            lvDelMethods.Rebind();
        }
    }

 

Error in Firefox - works just fine in Chrome, Edge and IE.

TypeError: access to strict mode caller function is censored

_doPostBack http://localhost/Telerik.Web.UI.WebResource.axd:15:13769Function.createDelegate/< http://localhost/Telerik.Web.UI.WebResource.axd:6:305__doPostBack http://localhost/Telerik.Web.UI.WebResource.axd:30710:1__doPostBack http://localhost/Telerik.Web.UI.WebResource.axd:30710:1__doPostBack http://localhost/Telerik.Web.UI.WebResource.axd:30710:1ajaxRequest http://localhost/Telerik.Web.UI.WebResource.axd:1930:27RefreshGrid http://localhost/Scripts/cart.js:129:5<anonymous> http://localhost/Scripts/cart.js:117:9dispatch http://localhost/Scripts/plugins/jquery-3.3.1.min.js:2:41720add/y.handle http://localhost/Scripts/plugins/jquery-3.3.1.min.js:2:39774

 

Seems to be working if the request comes from the grid itself but not from the ajaxmanager request.

Any idea what causes this?

 

Christian

 

Marin Bratanov
Telerik team
 answered on 01 Oct 2018
0 answers
125 views

Hello, 

I am using the pop-up editing on one of my grids where the user will then be able to edit the pre-existing record displayed on the list, however, by default, the pop-up windows width is too small to use as there will be a lot of fields the user can edit so they can not be in a single column meaning I will have to change the width of the window, I can set the width in the TagHelper (Inline styling) however i do not want to do this, is there for the kendo window to take around 80% of the screen space without any inline styling? 

Max
Top achievements
Rank 1
 asked on 01 Oct 2018
Narrow your results
Selected tags
Tags
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?