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

Hi,

I am using Rotator to display banner images in the home page. I need to enable reponsive design for the various dimensions of the mobile devices.

I have fixed the width to 100%, however for various screen size, the rotator does not seem to adjust.

Please advise how to solve this issue

 

 

RJ
Top achievements
Rank 1
 answered on 15 Sep 2016
7 answers
1.5K+ views
Hi,

I've been searching the forum for an answer to this question for days and it appears that no one has covered it before. I'm using InPlaceEdit mode for my RadGrid control. When I put it into edit mode, the size of the text fields that show up stretch the page I'm using quite a bit.

Question: Is there a way to customize the width of the textboxes that appear in the RadGrid edit mode's inplace edit mode?
Sabaratnam
Top achievements
Rank 1
 answered on 15 Sep 2016
2 answers
135 views

Hi,

I noticed in my web application that I was unable to select a .csv file to upload using the AsyncUpload control when using the MS Edge browser.

I initially though that it must have been excluded by the AllowedFileExtensions property, however found that it was working using Chrome.

I am not on the latest version of the RadControls but experienced the exact same issue on the demo site below

http://demos.telerik.com/aspnet-ajax/asyncupload/examples/draganddrop/defaultcs.aspx

I do have the anniversary update of Windows 10 installed and am wondering if it is related.

My version of Edge is as follows

Edge 38.14393.0.0

EdgeHTML 14.14393

 

Thanks,

Matt

Rumen
Telerik team
 answered on 15 Sep 2016
9 answers
1.0K+ views
Hi,
I am novice to telerik and getting some problem in radcombobox. my scenario is:
- A RadPanelBar
- A RadPanelItem inside the RadPanelBar
- In ItemTemplate of RadPanelItem, I have a RadGrid having columns for Institution, Grade, Degree.
- Inside RadGrid, I've a FormTemplate in which i've place text fields for Institution and Grade and a RadComboBox for Degree (MBA, BBA, etc. fetching from DB).
- My DB design is as I've a Candidate table in which there is a column for Degree (of number type, a foriegn key for my Degrees table).
- I want to show in my RadGrid the Institution, Grade, and Degree_Name (MBA, BBA, etc.), But i cannot understand how to achieve this.
- Another problem is that I am unable to use the selectedValue of RadComboBox.

Please refer to my code snippet.

 

<telerik:RadPanelItem runat="server" Text="Step 5: Qualification >>>">
  
<Items>
  
<telerik:RadPanelItem runat="server" Value="QualificationItem">
  
<ItemTemplate>
  
<div id="QualificationDetail" class="CVPanelGrid" >
  
<telerik:RadGrid ID="QualificationGrid" runat="server" AutoGenerateColumns="False" 
  
CellSpacing="0" GridLines="None" Skin="Web20" 
  
ondeletecommand="QualificationGrid_DeleteCommand" 
  
oninsertcommand="QualificationGrid_InsertCommand" 
  
onneeddatasource="QualificationGrid_NeedDataSource" 
  
onprerender="QualificationGrid_PreRender" 
  
onupdatecommand="QualificationGrid_UpdateCommand" 
  
onitemdatabound="QualificationGrid_ItemDataBound">
  
<HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Default">
  
</HeaderContextMenu>
  
  
<MasterTableView CommandItemDisplay="Top" EditMode="PopUp" EditFormSettings-EditColumn-CancelImageUrl="images/CancelRecord.gif" EditFormSettings-EditColumn-InsertImageUrl="images/InsertRecord.gif" EditFormSettings-EditColumn-ButtonType="ImageButton" DataKeyNames="PKEY" AllowAutomaticInserts="False">
  
  
<CommandItemSettings ExportToPdfText="Export to PDF" AddNewRecordText="Add Qualification" ShowAddNewRecordButton="true" ShowRefreshButton="false" >
  
  
</CommandItemSettings>
  
<RowIndicatorColumn FilterControlAltText="Filter RowIndicator column">
  
<HeaderStyle Width="20px" />
  
</RowIndicatorColumn>
  
<ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column">
  
<HeaderStyle Width="20px" />
  
</ExpandCollapseColumn>
  
  
<Columns>
  
<telerik:GridBoundColumn FilterControlAltText="Filter PKey column" 
  
UniqueName="PKey" DataField="PKEY" HeaderText="PKey" HeaderStyle-Width="250" Visible="false">
  
<HeaderStyle HorizontalAlign="Center" /> 
  
</telerik:GridBoundColumn>
  
  
<telerik:GridBoundColumn FilterControlAltText="Filter Institute column" 
  
UniqueName="Institute" DataField="INSTITUTION" HeaderText="Institute" HeaderStyle-Width="250">
  
<HeaderStyle HorizontalAlign="Center" /> 
  
</telerik:GridBoundColumn>
  
  
<telerik:GridBoundColumn FilterControlAltText="Filter Degree column" 
  
UniqueName="Degree" DataField="NAME" HeaderText="Degree" HeaderStyle-Width="150">
  
<HeaderStyle HorizontalAlign="Center" /> 
  
</telerik:GridBoundColumn>
  
  
<telerik:GridBoundColumn FilterControlAltText="Filter CompletionYear column" DataFormatString ="{0:yyyy}" 
  
UniqueName="CompletionYear" DataField="COMPLETION_YEAR" HeaderText="Year of Completion" HeaderStyle-Width="100">
  
<HeaderStyle HorizontalAlign="Center" /> 
  
</telerik:GridBoundColumn>
  
  
<telerik:GridBoundColumn FilterControlAltText="Filter Major column" 
  
UniqueName="Major" DataField="MAJOR" HeaderText="Major" HeaderStyle-Width="150">
  
<HeaderStyle HorizontalAlign="Center" /> 
  
</telerik:GridBoundColumn>
  
  
<telerik:GridBoundColumn FilterControlAltText="Filter Grade column" 
  
UniqueName="Grade" DataField="GRADE" HeaderText="Grade" HeaderStyle-Width="150">
  
<HeaderStyle HorizontalAlign="Center" /> 
  
</telerik:GridBoundColumn>
  
  
<telerik:GridEditCommandColumn ButtonType="ImageButton" UniqueName="EditCommandColumn" HeaderStyle-Width="15px">
  
<HeaderStyle Width="15px" />
  
<ItemStyle HorizontalAlign="Center" />
  
</telerik:GridEditCommandColumn>
  
<telerik:GridButtonColumn UniqueName="DeleteColumn" ButtonType="ImageButton" CommandName="Delete" HeaderStyle-Width="15px">
  
<HeaderStyle Width="15px" />
  
<ItemStyle HorizontalAlign="Center" /> 
  
</telerik:GridButtonColumn>
  
</Columns>
  
<EditFormSettings CaptionFormatString="Qualification Details" PopUpSettings-Modal="true" EditFormType="Template" PopUpSettings-Width="480px" >
  
<FormTemplate>
  
<div id="QualificationForm" >
  
<ul ID="QualificationInfo" class="formModalList">
  
<li>
  
<asp:Label ID="Label24" runat="server" CssClass="CVtextLabel" Text="Institution:" 
  
Width="120px"></asp:Label>
  
<asp:TextBox ID="txtInstitute" Text= '<%# Bind("INSTITUTION") %>' runat="server" CssClass="CVtextInput"></asp:TextBox
  
</li>
  
<li>
  
<asp:Label ID="Label25" runat="server" CssClass="CVtextLabel" 
  
Text="Degree:" Width="120px"></asp:Label>
  
<telerik:RadComboBox ID="cmbDegree" runat="server" Skin="Web20"
  
</telerik:RadComboBox
  
</li>
  
<li>
  
<asp:Label ID="Label26" runat="server" CssClass="CVtextLabel" 
  
Text="Year of Completion:" Width="120px"></asp:Label>
  
<telerik:RadMonthYearPicker ID="txtCompletionYear" Runat="server"
  
Culture="English (United States)" EnableTyping="False" Skin="Web20" 
  
DbSelectedDate='<%# Bind ("COMPLETION_YEAR") %>'>
  
<DatePopupButton HoverImageUrl="" ImageUrl=""
  
ToolTip="Open the year view popup." />
  
<DateInput DateFormat="yyyy" DisplayDateFormat="yyyy" ReadOnly="True" runat="server">
  
</DateInput>
  
</telerik:RadMonthYearPicker>
  
</li>
  
  
<li>
  
<asp:Label ID="Label20" runat="server" CssClass="CVtextLabel" Text="Major:" 
  
Width="120px"></asp:Label>
  
<asp:TextBox ID="txtMajor" Text= '<%# Bind("MAJOR") %>' runat="server" CssClass="CVtextInput"></asp:TextBox>
  
</li>
  
  
<li>
  
<asp:Label ID="Label22" runat="server" CssClass="CVtextLabel" Text="Grade:" 
  
Width="120px"></asp:Label>
  
<asp:TextBox ID="txtGrade" Text= '<%# Bind("GRADE") %>' runat="server" CssClass="CVtextInput"></asp:TextBox>
  
</li>
  
  
<li class="lastListItem"
  
<telerik:RadButton ID="BtnAddQualification" runat="server" Text='<%# IIf (TypeOf Container is GridEditFormInsertItem, "Insert", "Update") %>'
  
Skin="Web20" Width="50px" CssClass="btnInsertItem" 
  
CommandName='<%# IIf (TypeOf Container is GridEditFormInsertItem, "PerformInsert", "Update") %>'>
  
</telerik:RadButton
  
<telerik:RadButton ID="BtnCancelQualification" runat="server" Text="Cancel"
  
Skin="Web20" Width="50px" CssClass="btnCancelItem" CommandName="Cancel" 
  
>
  
</telerik:RadButton>
  
</li>
  
</ul>
  
</div>
  
</FormTemplate>
  
  
  
<FormTableButtonRowStyle HorizontalAlign="Right" /> 
  
<EditColumn FilterControlAltText="Filter EditCommandColumn column">
  
  
</EditColumn>
  
<PopUpSettings Modal="True" Width="480px" />
  
</EditFormSettings>
  
</MasterTableView>
  
<FilterMenu EnableImageSprites="False">
  
</FilterMenu>
  
  
  
  
</telerik:RadGrid>
  
<br /> 
  
</div>
  
</ItemTemplate>
  
</telerik:RadPanelItem>
  
</Items>
  
</telerik:RadPanelItem>

Here you can see that I've not bind my cmbDegree combobox with the DB. I am performing this task in code.

 

 

 

Protected Sub QualificationGrid_ItemDataBound(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridItemEventArgs)
        If TypeOf e.Item Is GridEditFormItem And e.Item.IsInEditMode Then
            Dim editedItem As GridEditFormItem = CType(e.Item, GridEditFormItem)
            Dim cmbDegree As RadComboBox = editedItem.FindControl("cmbDegree")
  
            Dim srv As New PICT.Web.Services.Careers.CareersClient
            Dim dSet As Global.PICT.Web.CVDataSet = srv.GetDegrees()
  
            cmbDegree.DataSource = dSet.Degree
            cmbDegree.DataTextField = "NAME"
            cmbDegree.DataValueField = "PKEY"
            cmbDegree.DataBind()
        End If
    End Sub

The above code sets the data source of cmbDegree and correctly shows when i add new record in the grid through Pop-up modal box. But when i hit insert button, the selected value of combo box not saved in my datatable and not reflect in my grid. (Remember i want to show the Degree Name in the grid, not the selectedvalue of combo.)

Kindly help me out in this matter.

Regards,
Ovais

Majoy
Top achievements
Rank 1
 answered on 15 Sep 2016
1 answer
33 views
There are 15 different downloads available and no description. Fortunately I have a Virtual so I can go through the tedious process of downloading, installing & reverting back to my snapshot. But this is entirely unnecessary and would save your support team and your customers consider time just to add a short description.
Yana
Telerik team
 answered on 15 Sep 2016
1 answer
67 views

Does anyone know how to get a Weighted Average Aggregate out of the PivotGrid?

 

Thanks,

 

Erik

Maria Ilieva
Telerik team
 answered on 15 Sep 2016
4 answers
143 views

version 2013.3.1015.45

I will try and keep this simple we are working on moving our product into foreign markets. To do so means we need to start supporting dates in different formats. In the test I am working with I am attempting to use GridDateTimeColumn to present editable data in an Australian format (ie. dd/mm/yyyy).
The Date is displayed correctly, however when you attempt to batch edit the cell by clicking the date the date in the input field of the RadDatePicker.

In short "31/8/2016" becomes "8/7/2018". Any thoughts?

Eric
Top achievements
Rank 1
 answered on 15 Sep 2016
3 answers
61 views

Hello,

I have a radeditor on a basic page and it works fine so I know the issue is not with my computer, browser, etc.  However, I have one page where the editor loads and I can type, but none of the formatting buttons make any difference and nothing I copy and paste into the editor shows up.  All the other controls (grids, buttons, dropdowns, etc.) appear to work fine on the page.  Here is my code:

    <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
 
        <script type="text/javascript">
 
            function rowDblClick(sender, eventArgs) {
                sender.get_masterTableView().editItem(eventArgs.get_itemIndexHierarchical());
            }
 
            function onPopUpShowing(sender, args) {
                args.get_popUp().className += " popUpEditForm";
            }
 
            function clientClose(sender, args) {
                if (args.get_argument() != null) {
                    //alert("'" + sender.get_name() + "'" + " was closed and returned the following argument: '" + args.get_argument() + "'");
                }
            }
 
        </script>
    </telerik:RadCodeBlock>
 
    <telerik:RadScriptManager runat="server" ID="RadScriptManager1" />
    <telerik:RadSkinManager ID="RadSkinManager1" runat="server" ShowChooser="false" />
 
    <telerik:RadAjaxManager runat="server" ID="RadAjaxManager1" DefaultLoadingPanelID="RadAjaxLoadingPanel1">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="grdPrice">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="grdPrice" />
                    <telerik:AjaxUpdatedControl ControlID="RadInputManager1" />
                     
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>
 
    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" />
    <telerik:RadStyleSheetManager ID="RadStyleSheetManager1" runat="server" />
 
 
 
    <telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server">
 
        <div class="div-table">
 
            <telerik:RadDropDownList Width="400px" runat="server" ID="ddlStrategies" RenderMode="Lightweight"
                DataTextField="Name" DataValueField="StrategyID" AutoPostBack="true" OnSelectedIndexChanged="ddlStrategies_SelectedIndexChanged" />
              <telerik:RadButton Skin="Office2010Silver" ID="btnSaveStrategy" runat="server" Text="Save Strategy" OnClick="btnSaveStrategy_Click" />
            <br /><br /><br />
 
            Supplier: <asp:Label ID="lblSupplier" runat="server" /><br />
 
        </div>
         
 
        <div style="display: inline-block;">
            <div>
                <telerik:RadTabStrip RenderMode="Lightweight" runat="server" ID="RadTabStrip1"  Orientation="HorizontalTop" Width="100%" SelectedIndex="0" MultiPageID="RadMultiPage1" Skin="Telerik">
                    <Tabs>
                        <telerik:RadTab Text="Background" />
                        <telerik:RadTab Text="Tab2" />
                        <telerik:RadTab Text="Tab3" />
                        <telerik:RadTab Text="Tab4" />
                        <telerik:RadTab Text="Tab5" />
                    </Tabs>
                </telerik:RadTabStrip>
 
 
                <telerik:RadMultiPage runat="server" ID="RadMultiPage1"  SelectedIndex="0" CssClass="multiPage" Width="100%">
                    <telerik:RadPageView runat="server" ID="RadPageView1">
                        <br />
                        <telerik:RadButton runat="server" ID="btnSaveBackground" Skin="Office2010Silver" AutoPostBack="true" Text="Save" OnClick="btnSaveBackground_Click" /><br /><br />
 
                        <telerik:RadEditor ContentAreaMode="Div"  MaxHtmlLength="1450" RenderMode="Lightweight" Skin="Office2010Silver" ID="edtBackground" runat="server" Width="950px" Height="500px"></telerik:RadEditor
 
                         
 
                    </telerik:RadPageView>
 
...

 

Any help would be greatly appreciated.  I even tried taking out the ajax panel and that didn't work. 

 

Ianko
Telerik team
 answered on 15 Sep 2016
1 answer
161 views

Hello I am trying to have a RadMaskedTextBox allow the user to type an SSN, with the caveat that they must be allowed to hit spacebar (whitespace) or the prompt character X.  The idea is to  have a wildcard search.

So I tried with the simple example:

<telerik:RadMaskedTextBox ID="txtSearchSSN" DisplayMask="XXX-XX-XXXX" Mask="###-##-####" PromptChar="X" runat="server" />

However this did *not* allow whitespace like the documentation suggested, and instead would fire a validator off in the control and disallow it.  So I rewrote it lengthier but more explicit so it will include a range from 0-9, X, or a whitespace, like this:

<telerik:RadMaskedTextBox ID="txtSearchSSN" DisplayMask="XXX-XX-XXXX" Mask="<0|1|2|3|4|5|6|7|8|9| |X><0|1|2|3|4|5|6|7|8|9| |X><0|1|2|3|4|5|6|7|8|9| |X>-<0|1|2|3|4|5|6|7|8|9| |X><0|1|2|3|4|5|6|7|8|9| |X>-<0|1|2|3|4|5|6|7|8|9| |X><0|1|2|3|4|5|6|7|8|9| |X><0|1|2|3|4|5|6|7|8|9| |X><0|1|2|3|4|5|6|7|8|9| |X>" PromptChar="X" AllowEmptyEnumerations="true" runat="server"  />

Now it appears to validate and handle the way I would want, but now whenever I use spacebar (whitespace) to indicate a wildcard it changes the input value to Zero (0) rather than leaving it as the prompt character X.

Am I missing something obvious with this control to do what I want?

So if the user types 548 and then all X or Spaces, I want it to show in the input box as 548-XX-XXXX, but now it shows 548-00-0000 if I use spaces.  Using X as input has it showing properly though.

Any help is appreciated

Thanks!

Maria Ilieva
Telerik team
 answered on 15 Sep 2016
1 answer
72 views

So I have a hierarchical RadGrid with 1 master table and 1 detail table.

The detail table has the property 

<EditFormSettings EditFormType="Template">

The TemplateForm has 1 TextBox and 1 RadAsyncTable and the submit button (insert, update).

Now when I choose a file to upload and hit "insert" the file is uploaded and everything works correctly.

The problem is that when the file exists, I want to display an error message : "the file already exists". So I have a method to verify if the file exists. If this is the case, I want to keep the EditForm opened and display the error message. But when I choose another file that doesn't exist and hit submit again, it looks like the RadAsyncUpload loses its value and the file is gone.

Here is my code:

try {
 UploadedFile file = btn.UploadedFiles[0];
 bool exists = BDD.CheckIfDocumentExists(fileName);
 if (!exists) file.SaveAs(Path.Combine(targetFolder, fileName));
} catch (Exception ex) {
  // log the error
}
 
if (exists) {
 GridEditableItem item = (GridEditableItem) e.Item;
 Label RadTextBox1 = (Label) item.FindControl("lbl_detailerror");
 RadTextBox1.Text = "the file already exists";
 e.Canceled = true;
} else {
 // insert the file in db
}

Konstantin Dikov
Telerik team
 answered on 15 Sep 2016
Narrow your results
Selected tags
Tags
+? more
Top users last month
Anislav
Top achievements
Rank 6
Silver
Bronze
Bronze
Jianxian
Top achievements
Rank 1
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Jim
Top achievements
Rank 2
Iron
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Anislav
Top achievements
Rank 6
Silver
Bronze
Bronze
Jianxian
Top achievements
Rank 1
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Jim
Top achievements
Rank 2
Iron
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?