Telerik Forums
UI for ASP.NET AJAX Forum
10 answers
446 views

Hello,
since I downloaded the latest version of Firefox, a few days ago, I see the checkboxes "duplicated" (2 squares for each checkbox).
How can I solve the problem?
Many thanks
Kurt

Rumen
Telerik team
 answered on 15 Nov 2018
1 answer
101 views

Hi,

We deployed a page with the editor with Document Manager in a shared hosting.

We can add/delete file but when try to move file, we get the error Nopermissionstomovefile.

Please refer to the attachment.

How can we fix this issue?

Thanks.

Rumen
Telerik team
 answered on 15 Nov 2018
6 answers
284 views

I am trying to consume a JSON service for client-side data binding.

The service requires a JWT token to be included in a 'Authorization' http header.

I'm assuming i need to implement something on <ClientEvents OnDataBinding="">, but i have little idea where to start.             

Any help would be appreciated.

 

the dataservice is setup as follows

<DataService Location="http://localhost:39338/" DataPath="/list/notifications" EnableCaching="true" ResponseType="JSON" HttpMethod="Get" CountPropertyName="Count" DataPropertyName="Data" />

Jason
Top achievements
Rank 1
 answered on 14 Nov 2018
1 answer
179 views

I have a Grid with a Binary Image and a Description field. Inserts work great, both binary image and description are saved correctly.

On updates, though, the description field is not getting updated, the "old" value is passed to the SqlDataSource, not the new edited value from the grid.

In other words... I add a record, with an image and a description (say, 'testing'). Verified it is saved in the database correctly (query in SQL Management Studio).

I then edit the record and change the description to 'Testing1234', tab off description field, click save, the new value is not saved, the old value 'testing' is.

I added some code to the SQL Datasources' OnInserting and OnUpdating events (see code below.)

On insert, the value of the @Description parameter is 'Testing' (when Testing is typed in the description.)

On update, changing the value in the Grid to 'Testing1234' and clicking the save button yields 'Testing' for the value of the @Description parameter in the OnUpdating event, not the new 'Testing1234' value entered in the Grid.

Any thoughts on why this is happening would be helpful. I've been staring at it now for 6 hours w/ no success, and other, similar Grids work fine (although this is my only grid which uses an Binary Image.)

 

My code:

<asp:SqlDataSource ID="SqlDataSource_Receipts" runat="server"
    ConflictDetection="CompareAllValues"
    OnInserting="SqlDataSource_Receipts_Inserting"
    OnUpdating="SqlDataSource_Receipts_Updating"
    ConnectionString="<%$ ConnectionStrings:Receipts %>"
    DeleteCommand="DELETE FROM Receipts WHERE Receipt_GUID = @Receipt_GUID"
    InsertCommand="INSERT INTO Receipts (Receipt_GUID, Employee_GUID, Description, ReceiptImage) VALUES (NEWID(), @Employee_GUID, @Description, @ReceiptImage)"
    SelectCommand="SELECT * FROM Receipts WHERE Employee_GUID = @Employee_GUID"
    UpdateCommand="UPDATE Receipts  SET Description = @Description, ReceiptImage = CASE WHEN ISNULL(DATALENGTH(CONVERT(varbinary(MAX), @ReceiptImage)), -1) = -1 THEN ReceiptImage ELSE CONVERT(VARBINARY(MAX), @ReceiptImage) END WHERE Receipt_GUID = @Receipt_GUID">
    <DeleteParameters>
        <asp:Parameter Name="Receipt_GUID" />
    </DeleteParameters>
    <InsertParameters>
        <asp:ControlParameter ControlID="RadGrid_Employees" Name="Employee_GUID" PropertyName="SelectedValues['Employee_GUID']" DbType="Guid" />
        <asp:Parameter Name="Description" />
        <asp:Parameter Name="ReceiptImage" />
    </InsertParameters>
    <SelectParameters>
        <asp:ControlParameter ControlID="RadGrid_Employees" Name="Employee_GUID" PropertyName="SelectedValues['Employee_GUID']" DbType="Guid" />
    </SelectParameters>
    <UpdateParameters>
        <asp:Parameter Name="Receipt_GUID" />
        <asp:Parameter Name="Description" />
        <asp:Parameter Name="ReceiptImage" />
    </UpdateParameters>
</asp:SqlDataSource>

 

The radgrid definition:

<telerik:RadGrid ID="RadGrid_Receipts" runat="server" AutoGenerateColumns="False" DataSourceID="SqlDataSource_Receipts" GridLines="None" Width="100%" AllowAutomaticUpdates="True" AllowAutomaticInserts="True" AllowAutomaticDeletes="True" AllowSorting="True" OnItemDataBound="RadGrid_Receipts_ItemDataBound" CellSpacing="0" ShowStatusBar="True" ShowFooter="true" AutoGenerateDeleteColumn="False" AutoGenerateEditColumn="False">
 <MasterTableView CommandItemDisplay="Bottom" AllowPaging="True" EditMode="InPlace" DataKeyNames="Receipt_GUID, Employee_GUID">
  <Columns>
   <telerik:GridEditCommandColumn ButtonType="ImageButton" UniqueName="EditCommandColumn">
    <HeaderStyle Width="50px" />
    <ItemStyle CssClass="MyImageButton" Width="50px" />
   </telerik:GridEditCommandColumn>
   <telerik:GridButtonColumn ButtonType="ImageButton" CommandName="Delete" ConfirmDialogType="RadWindow" ConfirmText="Delete this Receipt?" ConfirmTitle="Delete" Text="Delete" UniqueName="DeleteColumn">
    <HeaderStyle Width="25px" />
    <ItemStyle CssClass="MyImageButton" HorizontalAlign="Center" Width="25px" />
   </telerik:GridButtonColumn>
   <telerik:GridBinaryImageColumn DataField="ReceiptThumb" HeaderText="Receipt Image" UniqueName="ReceiptThumb" ResizeMode="Fit" ImageWidth="100" ImageHeight="100"  />
   <telerik:GridBoundColumn DataField="Description" HeaderText="Description" SortExpression="Description" UniqueName="Description" ItemStyle-Width="500px" HeaderStyle-HorizontalAlign="Center" />
  </Columns>
 </MasterTableView>
</telerik:RadGrid>

My Datasource onInserting/Updating events:

protected void SqlDataSource_Receipts_Inserting(object sender, SqlDataSourceCommandEventArgs e)
{
      SqlParameter d = (SqlParameter)e.Command.Parameters["@Description"];
      // d.Value = 'Testing' , correct, this is what I enter on the form.
}
protected void SqlDataSource_Receipts_Updating(object sender, SqlDataSourceCommandEventArgs e)
{
      SqlParameter d = (SqlParameter)e.Command.Parameters["@Description"];
      // d.Value = 'Testing' despite having typed 'Testing1234' in the RadGrid before clicking Save
}
Eyup
Telerik team
 answered on 14 Nov 2018
2 answers
129 views

I'm using the code from the Telerik documentation to maintain the selected row, but it's not working properly.  Instead of keeping the selected row, it's jumping to the top row in the table after each postback.

 

Here's the markup for the grid:

<telerik:RadGrid runat="server" ID="rgAdList" DataSourceID="sdsRgAdList" AutoGenerateColumns="False" AllowPaging="True" AllowSorting="True" AllowFilteringByColumn="True" ShowGroupPanel="True" OnSelectedIndexChanged="rgAdList_OnSelectedIndexChanged" OnPreRender="rgAdList_OnPreRender" OnItemCommand="rgAdList_OnItemCommand">
        <ClientSettings AllowDragToGroup="True" AllowColumnsReorder="True" ReorderColumnsOnClient="True">
            <Selecting AllowRowSelect="True"></Selecting>
            <ClientEvents OnRowSelected="RowSelected"></ClientEvents>
            <ClientEvents OnFilterMenuShowing="filterMenuShowing" OnRowSelected="rgAdList_RowSelected" OnRowCreated="rgAdList_RowCreated" OnRowDeselected="rgAdList_RowDeselected" />
        </ClientSettings>
        <FilterMenu OnClientShown="MenuShowing" />
        <GroupingSettings CaseSensitive="False"></GroupingSettings>
        <PagerStyle AlwaysVisible="True"></PagerStyle>
        <MasterTableView DataKeyNames="mail" DataSourceID="sdsRgAdList">
            <PagerStyle PageSizes="5, 10, 25, 50, 100, 200, 300, 400"></PagerStyle>
            <Columns>
                <telerik:GridBoundColumn DataField="givenName" HeaderText="First Name" SortExpression="givenName" UniqueName="givenName" FilterControlAltText="Filter givenName column" HeaderStyle-Font-Bold="true" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center"></telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="sn" HeaderText="Last Name" SortExpression="sn" UniqueName="sn" FilterControlAltText="Filter sn column" HeaderStyle-Font-Bold="true" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center"></telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="mail" ReadOnly="True" HeaderText="Email" SortExpression="mail" UniqueName="mail" FilterControlAltText="Filter mail column" HeaderStyle-Font-Bold="true" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center"></telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="title" HeaderText="Title" SortExpression="title" UniqueName="title" FilterControlAltText="Filter title column" HeaderStyle-Font-Bold="true" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center"></telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="department" HeaderText="Department" SortExpression="department" UniqueName="department" FilterControlAltText="Filter department column" HeaderStyle-Font-Bold="true" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center"></telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="manager" HeaderText="Manager" SortExpression="manager" UniqueName="manager" FilterControlAltText="Filter manager column" HeaderStyle-Font-Bold="true" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center"></telerik:GridBoundColumn>
            </Columns>
        </MasterTableView>
    </telerik:RadGrid>

 

Here's the script I'm trying to get to work?

<script type="text/javascript">
 
    function rgAdList_RowSelected(sender, args) {
        var id = args.getDataKeyValue("mail");
 
        var selected = (JSON.parse(sessionStorage.getItem("selectedItems")) != null) ? JSON.parse(sessionStorage.getItem("selectedItems")) : {};
 
        if (!selected[id]) {
            selected[id] = true;
 
            sessionStorage.setItem("selectedItems", JSON.stringify(selected));
        }
    }
 
    function rgAdList_RowDeselected(sender, args) {
        var id = args.getDataKeyValue("mail");
        var selected = JSON.parse(sessionStorage.getItem("selectedItems"));
 
        if (selected[id]) {
            selected[id] = null;
 
             sessionStorage.setItem("selectedItems", JSON.stringify(selected));
        }
    }
 
    function rgAdList_RowCreated(sender, args) {
        var id = args.getDataKeyValue("mail");
        var selected = JSON.parse(sessionStorage.getItem("selectedItems"));
 
        if (selected && selected[id]) {
            args.get_gridDataItem().set_selected(true);
        }
    }

 

Thanks, J

Eyup
Telerik team
 answered on 14 Nov 2018
1 answer
75 views
I have used  sender._calendar.set_datesInRange(new Date(minDate), new Date(maxDate)); to set the range in client popupopening event. but its not working . it si not retaining value if we use navigation adn come back to same month.
Eyup
Telerik team
 answered on 14 Nov 2018
2 answers
152 views

I'm hoping this is a silly error

this is the markup

<telerik:RadClientDataSource ID="ClaimsDataSource" runat="server" EnableServerPaging="true" EnableServerSorting="true" AllowPaging="true"  >
    <DataSource>                              
        <WebServiceDataSourceSettings BaseUrl="http://localhost:39338/" >
            <Select Url="ui/list/claims" RequestType="Get" DataType="JSON" EnableCaching="true"  />
        </WebServiceDataSourceSettings>
    </DataSource>           
    <Schema DataName="Data">
        <Model>
            <telerik:ClientDataSourceModelField FieldName="DateofLoss" DataType="Date" />
        </Model>
    </Schema>
</telerik:RadClientDataSource>
 
<telerik:RadGrid ID="grdCLaims" runat="server" ClientDataSourceID="ClaimsDataSource" AllowPaging="true" PageSize="2" AllowSorting="true"  >
    <MasterTableView ClientDataKeyNames="ClaimItemID" DataKeyNames="ClaimItemID">
        <Columns>                       
            <telerik:GridBoundColumn DataField="PolicyNumber" HeaderText="Policy Number" />
            <telerik:GridBoundColumn DataField="ClientName" HeaderText="Client" />
            <telerik:GridBoundColumn DataField="DateofLoss" HeaderText="Date of Loss" DataFormatString="{0:dd MMM yyyy}" />
        </Columns>
    </MasterTableView>
    <ClientSettings>
        <Selecting AllowRowSelect="true" />           
        <Scrolling AllowScroll="true" UseStaticHeaders="true" />
    </ClientSettings>
</telerik:RadGrid>

 

this is the JSON that the service is returning

{
   "Data":[
      {
         "ClientName":"Ethan McWindsor",
         "PolicyNumber":"PUMA100558",
         "DateofLoss":"2015-12-09T00:00:00",
         "ClaimItemID":256,
      },
      {
         "ClientName":"Ethan McWindsor",
         "PolicyNumber":"PUMA100558",
         "DateofLoss":"2016-11-25T00:00:00",
         "ClaimItemID":413,
      }
   ],
   "Count":2
}

no matter what i do, the service is getting called three times on the in initial page load

from the network log in chrome

http://localhost:39338/ui/list/claims?take=2&skip=0&page=1&pageSize=2
 
http://localhost:39338/ui/list/claims?take=2&skip=0&page=1&pageSize=2
 
http://localhost:39338/ui/list/claims?take=10&skip=0&page=1&pageSize=10

 

(there is nothing in the code-behind)

any ideas?

Attila Antal
Telerik team
 answered on 13 Nov 2018
4 answers
115 views
Hi there,

I have master detail radgrid ,and I am looking to customize the grid as the following : When I expand a parent item I need to repeat the master table header item after the detail table of this item  as the following example ..... thank you for any help


    MasertHeader1    MasertHeader2    MasertHeader3
  - Mrecord1                Mrecord1                Mrecord1
              DetailHeader1    DetailHeader2
              Drecord1              Drecord1
              Drecord2              Drecord2
              Drecord3              Drecord3
    MasertHeader1    MasertHeader2    MasertHeader3
 + Mrecord2                Mrecord2                Mrecord2
 + Mrecord3                Mrecord3                Mrecord3



 
Eyup
Telerik team
 answered on 13 Nov 2018
1 answer
990 views

Hi ,

The telerik version we are using is : 2016.1.225.45.

We are facing an out of memory exception while trying to export close to 200k records using Telerik spreadsheet. 

The for each loop snippet shown below executes for each of the 200k records.It is taking more than 5 mins. Is there any way to reduce the time consumption ?

 Dim currentRow As Integer = 6
        For Each row As DataRow In data.Rows
            sheet1.Cells(currentRow, 0).SetFormat(New CellValueFormat("@"))
            sheet1.Cells(currentRow, 0).SetValue(Convert.ToString(row("ClientID")))
            sheet1.Cells(currentRow, 0).SetIsWrapped(True)
            sheet1.Cells(currentRow, 1).SetFormat(New CellValueFormat("@"))
            sheet1.Cells(currentRow, 1).SetValue(Convert.ToString(row("ShortName")))
            sheet1.Cells(currentRow, 1).SetIsWrapped(True)
            sheet1.Cells(currentRow, 2).SetFormat(New CellValueFormat("@"))
            sheet1.Cells(currentRow, 2).SetValue(Convert.ToString(row("KnowledgeCategory")))
            sheet1.Cells(currentRow, 2).SetIsWrapped(True)
            sheet1.Cells(currentRow, 3).SetFormat(New CellValueFormat("@"))
            sheet1.Cells(currentRow, 3).SetValue(Convert.ToString(row("AuthoredBy")))
            sheet1.Cells(currentRow, 3).SetIsWrapped(True)
            sheet1.Cells(currentRow, 4).SetFormat(New CellValueFormat("@"))
            If IsDBNull(row("AuthoringDate")) Or String.IsNullOrEmpty(row("AuthoringDate").ToString()) Then
                AuthoringDate = ""
            Else
                AuthoringDate = Convert.ToDateTime(row("AuthoringDate")).ToString("dd/MM/yyyy")
            End If
            sheet1.Cells(currentRow, 4).SetValue(AuthoringDate)
            sheet1.Cells(currentRow, 4).SetIsWrapped(True)
            sheet1.Cells(currentRow, 5).SetFormat(New CellValueFormat("@"))
            sheet1.Cells(currentRow, 5).SetValue(Convert.ToString(row("IndustryName")))
            sheet1.Cells(currentRow, 5).SetIsWrapped(True)
            If ChangeType <> "Deleted Records" Then
                sheet1.Cells(currentRow, 6).SetFormat(New CellValueFormat("@"))
                sheet1.Cells(currentRow, 6).SetValue(Convert.ToString(row("TranslationChange")))
                sheet1.Cells(currentRow, 6).SetIsWrapped(True)
                sheet1.Cells(currentRow, 7).SetFormat(New CellValueFormat("@"))
                sheet1.Cells(currentRow, 7).SetValue(Convert.ToString(row("Comment")))
                sheet1.Cells(currentRow, 7).SetIsWrapped(True)
            Else
                sheet1.Cells(currentRow, 6).SetFormat(New CellValueFormat("@"))
                sheet1.Cells(currentRow, 6).SetValue(Convert.ToString(row("Comment")))
                sheet1.Cells(currentRow, 6).SetIsWrapped(True)
            End If

            currentRow = currentRow + 1
        Next

Also while exporting the worksheet, an out of memory exception is thrown. Please provide some help over the issue.

 

 

 

 

Anna
Telerik team
 answered on 13 Nov 2018
3 answers
198 views

Hello amazing Telerik folks! 

Let me start by sharing my appreciation for your wonderful products; in case you already didn't know it, they are REALLY nice :)

Coming to the issue that I'm trying to resolve -

Summary - How to enable touch drag and drop for appointments?

Details -

We've incorporated the RadScheduler control in a solution that we're building. The solution involves a lot of dragging and dropping including moving appointments around on the scheduler.

Everything is working as we expect when we drag and drop using the mouse. 

While testing our solution on touch enabled laptops, we see that most of the functionality (clicking on an appointment, scrolling etc.) works with touch, but when we try to touch and drag and drop appointments on the scheduler (from say 8 am to 10 am) we're unable to do so, the appointment just does not move and it looks like the scheduler tries to scroll instead. Please let us know that the best practices/ways are to enable this. 

Thanks in advance!

Abhishek

 

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 13 Nov 2018
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?