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

Hi Guys,

I have a site that is fixed width and fits perfectly on desktop and tablets.

I want the RadDeviceDeection Framework to discern if the device is a mobile phone and then redirect to a different set of web pages.(not responsive).

When testing on a desktop I get an output such as 

ScreenSize By Range : 3 : ScreenSize By UserAgent : 3
 
ScreenSize By Range TS : ExtraLarge : ScreenSize By UserAgent TS : ExtraLarge
 
Height : 0 Width : 0
 
Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36 OPR/45.0.2552.888

On a mobile phone, it detects the height & width and a small screen size.

The problem is,it also detects tablets with a small screen size - but no height & width.
No matter how small I make the custom range for screen size it always returns small for both mobile & tablet.

What would be the best way for me to detect a mobile phone only please?
I could do it if a height & width was found; but not sure if this would cover all.

Cheers,

Jon

 

Rumen
Telerik team
 answered on 09 Jun 2017
4 answers
187 views
Hi,
I have RadGrid Hierarchy at 3 level i want to apply Check/Uncheck all checkboxes Client Side and Server Side how can do it.
Please provide solutions
Please find Attachment.
Eyup
Telerik team
 answered on 09 Jun 2017
2 answers
194 views

Hi all,

I have simple RadWindow container one lable and one RadTabStrip, when i update Chrome to lastest version 58.0.3029.110 (64-bit), 

RadRabStrip show incorrect possition in RadWindow (before update is correct).

I have use IE to open RadWindow, it is OK.

Please help me.

 

 

The
Top achievements
Rank 1
 answered on 09 Jun 2017
2 answers
102 views

Hi,

My radgrid using auto ops with template. The update failed due to dropdownlist selectedvalue. If a record's field is null then a update with value will yield error for cannot convert DbNull to Int32. If a record's field has value then a update do nothing but no error.

Please help.

Thanks.

extracted codes from aspx:

    <telerik:RadGrid ID="rgInst" runat="server" CellSpacing="0" GridLines="None" RenderMode="Lightweight" AllowPaging="True" PageSize="10" AllowSorting="true"
      AllowAutomaticUpdates="True" AllowAutomaticInserts="True" AllowAutomaticDeletes="true" AutoGenerateColumns="false" DataSourceID="sdsInstitution"
      OnItemCreated="rgInst_ItemCreated" OnItemInserted="rgInst_ItemInserted" OnItemUpdated="rgInst_ItemUpdated" OnItemDeleted="rgInst_ItemDeleted" OnItemCommand="rgInst_ItemCommand">
      <PagerStyle Mode="NextPrevNumericAndAdvanced" />
      <MasterTableView AutoGenerateColumns="false" DataSourceID="sdsInstitution" DataKeyNames="InstID, InstTypeId" CommandItemDisplay="Top" EditMode="EditForms">       
        <Columns>
          <telerik:GridEditCommandColumn UniqueName="EditCommandColumn" />
          <telerik:GridBoundColumn UniqueName="InstName" DataField="InstName" HeaderText="Institution" />
          <telerik:GridBoundColumn UniqueName="CampusType" DataField="InstTypeDesc" HeaderText="Campus Type" />
          <telerik:GridButtonColumn Text="Deactivate" CommandName="Delete" />
        </Columns>
  
  <EditFormSettings EditFormType="Template">
          <FormTemplate>
            <br />
                  <table class="tableW100">
                    <tr>
                      <td class="td30R">Institution name:</td>
                      <td class="td70L">
                        <asp:TextBox ID="tbInstName" runat="server" CssClass="tbW100" Text='<%# Bind("InstName") %>' />
                      </td>
                    </tr>
                    <tr>
                      <td class="td30R">School/Department:</td>
                      <td class="td70L">
                        <asp:TextBox ID="tbInstOffice" runat="server" CssClass="tbW100" TextMode="MultiLine" Text='<%# Bind("InstOffice") %>' />
                      </td>
                    </tr>
                    <tr>
                      <td class="td30R">Campus Type:</td>
                      <td class="td70L">
                        <asp:DropDownList ID="ddlInstType" CssClass="tbW100" runat="server" DataSourceID="sdsInstType" DataTextField="InstTypeDesc" DataValueField="InstTypeID" SelectedValue='<%# Bind("InstTypeID") %>'
                          AppendDataBoundItems="True">
                          <asp:ListItem Selected="True" Text="Select..." Value="" />
                        </asp:DropDownList>
                      </td>
                    </tr>
              <tr>
                <td colspan="2" class="tr4Btn">
                  <asp:Button ID="btnUpdate" CssClass="flatbtnFlexSmall" Text='<%# (Container is GridEditFormInsertItem) ? "Insert" : "Update" %>' runat="server" CommandName='<%# (Container is GridEditFormInsertItem) ? "PerformInsert" : "Update" %>' />&nbsp;
                  <asp:Button ID="btnCancel" CssClass="flatbtnFlexSmall" Text="Cancel" runat="server" CausesValidation="False" CommandName="Cancel" />
                </td>
              </tr>
            </table>
          </FormTemplate>
        </EditFormSettings>
      </MasterTableView>
    </telerik:RadGrid>

 

<asp:SqlDataSource ID="sdsInstitution" runat="server" ConnectionString="<%$ ConnectionStrings:MainDB %>"
    SelectCommand="sprInstitutionGet" SelectCommandType="StoredProcedure"
    UpdateCommand="sprInstitutionUpdate" UpdateCommandType="StoredProcedure"
    InsertCommand="sprInstitutionAdd" InsertCommandType="StoredProcedure"
    <InsertParameters>
      <asp:Parameter Name="InstName" Type="String" />
      <asp:Parameter Name="InstOffice" Type="String" />
      <asp:Parameter Name="InstTypeID" Type="Int32" />
      <asp:SessionParameter Name="ModBy" SessionField="AdmNetID" Type="String" />
    </InsertParameters>
    <UpdateParameters>
      <asp:Parameter Name="InstID" Type="Int32" />
      <asp:Parameter Name="InstName" Type="String" />
      <asp:Parameter Name="InstOffice" Type="String" />
      <asp:Parameter Name="InstTypeID" Type="Int32" />
      <asp:SessionParameter Name="ModBy" SessionField="AdmNetID" Type="String" />
    </UpdateParameters>
</asp:SqlDataSource>

 

<asp:SqlDataSource ID="sdsInstType" runat="server" ConnectionString="<%$ ConnectionStrings:MainDB %>" SelectCommand="sprInstitutionTypeGet" SelectCommandType="StoredProcedure" />

 

 

 

 

 

 

 

 

 

 

Eyup
Telerik team
 answered on 09 Jun 2017
3 answers
135 views
The editor does not seem to use the actual height on iOS. Height is set to 400. See attachments. How do we fix?
Rumen
Telerik team
 answered on 09 Jun 2017
1 answer
113 views

Hi,

    I need to disable edit mode for a specific column in a gantt control regarding to some criteria. Could you help me? 

regards

Peter Milchev
Telerik team
 answered on 09 Jun 2017
4 answers
391 views
Hello

I have a RadAutoCompleteBox and a datasource associated.

<telerik:RadAutoCompleteBox ID="RadAutoCompleteBox1" runat="server" DataSourceID="EntityDataSource1" DataTextField="Name" DataValueField="ID">

This works. if i insert on RadAutoCompleteBox values that doesnt exist in the datasource, they will disapear. it is possible to add extra fields like:

i filter names like John, Peter --> OK!
i want to filter by group like 1990, 1991 and then manipulate the values on codebehind to only get people that are born on 1990 or 1991.

it is possible to do something like that?

thanks in advance
Bhavin
Top achievements
Rank 1
 answered on 09 Jun 2017
3 answers
81 views
I would like to return an error or status message from the server after a file is uploaded and processed based on the contents of the file.  Is there a way to send a message back to the onClientFileUploaded event handler without extending a custom handler for each upload control I want on my website?
Peter Milchev
Telerik team
 answered on 09 Jun 2017
0 answers
86 views

I have a scenario where I am binding Radgrid at server side in Page Load with default filter criteria and additionally there are some tile buttons for the user to filter the Radgrid list.

Now I have filter enabled in the Radgrid, so whenever the user uses the filter in the Radgrid, it triggers the pageload databinding of the radgrid and uses the default criteria.

Is there a way for the Radgrid not to use the Pageload binding and still apply the filter with the list it has.

Note:I am using the server side binding

Kris
Top achievements
Rank 1
 asked on 09 Jun 2017
1 answer
443 views

Hi, I'm trying to make my Checkbox clickable if that's a word.. I am having trouble because when I try to change it into a <telerik:GridTemplateColumn> with a the ItemTemplate stuff data does not get fetched from the server. To clear it up when I change it to a TemplateColumn the data from the server does not transfer and the checkboxes ARE clickable but checks do not appear where they should be. What I want is the checkboxes to appear as "clickable" and data appears where it should be, and also when a checkbox is checked the data will go to the SQL server. Sorry, if I'm asking for too much.... I'm still learning.:)

 

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
 
<!DOCTYPE html>
 
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server"></telerik:RadScriptManager>
     <telerik:RadGrid ID="CGRUnPaidFees2017" runat="server" AllowAutomaticInserts="True" CGRUnPaidFees2017_Init="true" OnItemDeleted="CGRUnPaidFees2017_ItemDeleted" OnItemInserted="CGRUnPaidFees2017_ItemInserted"
            OnItemUpdated="CGRUnPaidFees2017_ItemUpdated" OnPreRender="CGRUnPaidFees2017_PreRender" AllowAutomaticUpdates="True" AllowPaging="True"
            AutoGenerateColumns="True" DataSourceID="UnPaidFees2017" Height="945px" Width="1380px">
<GroupingSettings CollapseAllTooltip="Collapse all groups" CaseSensitive="False"></GroupingSettings>
    <SortingSettings EnableSkinSortStyles="False" />
 
<ExportSettings ExportOnlyData="True"></ExportSettings>
 
    <ClientSettings>
        <Scrolling AllowScroll="True" UseStaticHeaders="True" />
    </ClientSettings>
    <MasterTableView AutoGenerateColumns="False" DataKeyNames="Paid" DataSourceID="UnPaidFees2017" PageSize="34" AllowFilteringByColumn="True" ShowGroupFooter="True" GridLines="Both">
        <Columns>
            <telerik:GridBoundColumn DataField="School" HeaderButtonType="PushButton" FilterControlAltText="Filter School column" HeaderText="School" SortExpression="School" UniqueName="School">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="Student_Matric" HeaderButtonType="PushButton" FilterControlAltText="Filter Student_Matric column" HeaderText="Student_Matric" SortExpression="Student_Matric" UniqueName="Student_Matric" DataType="System.Double">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="Name" HeaderButtonType="PushButton" FilterControlAltText="Filter Name column" HeaderText="Name" SortExpression="Name" UniqueName="Name">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="Fee_Amount" HeaderButtonType="PushButton" FilterControlAltText="Filter Fee_Amount column" HeaderText="Fee_Amount" SortExpression="Fee_Amount" UniqueName="Fee_Amount" DataType="System.Double">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="Fee" FilterControlAltText="Filter Fee column" HeaderButtonType="PushButton" HeaderText="Fee" SortExpression="Fee" UniqueName="Fee">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="Date_Issued" DataType="System.DateTime" HeaderButtonType="PushButton" FilterControlAltText="Filter Date_Issued column" HeaderText="Date_Issued" SortExpression="Date_Issued" UniqueName="Date_Issued">
            </telerik:GridBoundColumn>
            <telerik:GridCheckboxColumn DataField="Paid" FilterControlAltText="Filter Paid column" HeaderText="Paid" HeaderButtonType="PushButton" SortExpression="Paid" UniqueName="Paid" AutoPostBackOnFilter="True">
            </telerik:GridCheckboxColumn>
        </Columns>
        <EditFormSettings>
         
        </EditFormSettings>
    </MasterTableView>
 
    <FilterItemStyle HorizontalAlign="Left" VerticalAlign="Middle" />
 
    <PagerStyle PageSizes="30;60;90;120" PageButtonCount="30" />
 
</telerik:RadGrid>
         <asp:SqlDataSource ID="UnPaidFees2017" runat="server" ConnectionString="<%$ ConnectionStrings:pedrolConnectionString %>"
                SelectCommand="SELECT School, [Student Matric] AS Student_Matric, Name, [Fee Amount] AS Fee_Amount, Fee, [Date Issued] AS Date_Issued, Paid FROM UnPaidFees2017"
                UpdateCommand="UPDATE UnPaidFees2017 SET Paid = @Paid" OnSelecting="UnPaidFees2017_Selecting" InsertCommand="INSERT INTO UnPaidFees2017(Paid) VALUES (@Paid)">
              <InsertParameters>
                  <asp:Parameter Name="Paid" Type="Boolean" />
              </InsertParameters>
          
              <UpdateParameters>
                  <asp:Parameter Name="Paid" Type="Boolean" />
              </UpdateParameters>
          
         </asp:SqlDataSource>
    </div>
    </form>
</body>
</html>

 

I know there's a bunch of junk in my <telerik:RadGrid /> I was trying to solve my issue and couldn't, let me know if you need more info, I'll send whatever I can.

Peter
Top achievements
Rank 1
 answered on 08 Jun 2017
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
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
Iron
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?