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

Hello, I followed the instructions here to create a new localization file for es, and set the text for spanish (es), and modified some of the text for english.

I built the application, and the text I put in for both english and spanish do not show.

I then changed the "build action" for the RadAsyncUpload.es.resx and RadAsyncUpload.resx to "Embedded Resource", which is what I've done with the other resource files included in this project.

Same result.  Neither the english or spanish text shows.

I have the culture set in the code to use the same culture another resource file is using, which is based on the detected culture of the browser:

this.RadAsyncUpload1.Culture = mainPage.Culture;

Even if that wasn't working, the english changes I made should show?

I made sure the satellite es resources dll for the project is deployed as well.

What am I missing?

Attila Antal
Telerik team
 updated answer on 25 Jun 2021
1 answer
190 views

Hello,
to test the input I would like to set default values for the form. I do that in the OnItemCommand. The values for the properties "ShortName" and "LegalForm" are displayed, the other values are not.

 

Codebehind:

 protected void rgCompanyies_OnItemCommand(object sender, GridCommandEventArgs e)
        {
            try
            {
                if (e.CommandName == "ViewCustomers")
                {
                    Response.Redirect(EditUrl("Id", e.CommandArgument.ToString(), "ViewCustomer"));
                }

                if (e.CommandName == RadGrid.InitInsertCommandName)
                {
                    if (IsDebugMode)
                    {
                        e.Canceled = true;
                        Hashtable values = new Hashtable();

                        string[] legalForms = { "GmbH", "AG", "Gbr", "OHG", "KG" };

                        Random rnd = new Random();
                        values["ShortName"] = $"A-Test{rnd.Next(10)}";
                        values["LegalForm"] = legalForms[rnd.Next(legalForms.Length)];
                        values["CompanyAddress.Street"] = $"Teststr. {rnd.Next(10)}";
                        values["CompanyAddress.Postalcode"] = $"{rnd.Next(10)}2345";
                        values["CompanyAddress.City"] = "Bonn";
                        values["CompanyPhone.Number"] = $"123456{rnd.Next(10)}";
                        values["CompanyEmail.Address"] = $"a.decke{rnd.Next(10)}@abc.de";

                        e.Item.OwnerTableView.InsertItem(values);
                    }
                }
            }
            catch (Exception exc)
            {
                Exceptions.ProcessModuleLoadException(this, exc);
            }
        }

 

Views.ascx:


 <EditFormSettings CaptionFormatString="Bearbeite &lt;strong&gt;{0}&lt;/strong&gt;" EditFormType="Template" InsertCaption="Firma bearbeiten..." CaptionDataField="ShortName">
                        <FormTemplate>
                            <div id="main" class="container">
                                <div class="row mt-4">
                                    <div class="col-12">

                                        <div class="card">
                                            <!--Firmendaten-->
                                            <div class="card-header">
                                                Firmendaten
                                            </div>
                                            <div class="card-body">
                                                <div class="row g-2">
                                                    <!--CompanyTitle & CompanyTyp-->
                                                    <div class="col-md-6">
                                                        <label for="inputTitle" class="form-label-required">Title</label>
                                                        <asp:RequiredFieldValidator runat="server" ID="rfvInputCompanyName" ControlToValidate="tbCompanyName" Display="Dynamic" SetFocusOnError="True" CssClass="form-label-error float-end" ErrorMessage="Ein Firmenname wird erwartet!" ValidationGroup="vgCompany"/>
                                                        <asp:CustomValidator ID="cuvCompanyName" ControlToValidate="tbCompanyName" runat="server" Display="Dynamic" ErrorMessage="Firmenname bereits vorhanden!" CssClass="form-label-error float-end" SetFocusOnError="True" ValidationGroup="vgCompany" OnServerValidate="cuvInputCompanyName_OnServerValidate"/>
                                                        <asp:TextBox autofocus ID="tbCompanyName" Text='<%# Bind("ShortName") %>' runat="server" CssClass="form-control" ValidationGroup="vgCompany" TabIndex="10" required/>
                                                    </div>
                                                    <div class="col-md-6">
                                                        <label for="inputType" class="form-label">Firmentyp</label>
                                                        <asp:TextBox ID="tbCompanyLeagalForm" runat="server" Text='<%# Bind("LegalForm") %>' CssClass="form-control"/>
                                                    </div>
                                                    <!--Postalcode & Location-->
                                                    <div class="col-md-6">
                                                        <label for="inputPostalcode" class="form-label-required">PLZ</label>
                                                        <asp:RequiredFieldValidator runat="server" ID="rfvCompanyPostalcode" ControlToValidate="tbCompanyPostalcode" Display="Dynamic" SetFocusOnError="True" CssClass="form-label-error float-end" ErrorMessage="Eine PLZ wird erwartet!" ValidationGroup="vgCompany"/>
                                                        <asp:TextBox ID="tbCompanyPostalcode" Text='<%# Bind("CompanyAddress.Postalcode") %>' runat="server" CssClass="form-control" ValidationGroup="vgCompany" TabIndex="20" required/>
                                                    </div>

 

the values for ShortName and LegalForm are displayed correctly (show image). The CompanyAddress.Street, CompanyAddress.Postalcode, etc. values are not displayed. Why doesn't the binding work there?

Attila Antal
Telerik team
 answered on 25 Jun 2021
3 answers
439 views

Hi there,

I would like to see the focus on the rows or just in the Visibility cell when I'm navigating through the grid using the keyboard and if I press enter, make a click on the toggle button to change the visibility. 

Also, I´m adding in the clientSettings 

 

Doncho
Telerik team
 answered on 25 Jun 2021
1 answer
438 views

I have a radgrid that is working as expected showing me the pencil and the X icon for the edit and delete controls shown below.

<telerik:GridEditCommandColumn />
      <telerik:GridButtonColumn CommandName="Delete" Text="Delete" UniqueName="DeleteColumn" />

 

When I add a second grid to the page, even just an empty grid with nothing specified about the grid, the icons for Edit and Delete disappear in the first grid.

Any ideas on what is happening here?

Doncho
Telerik team
 answered on 25 Jun 2021
1 answer
157 views

I have a Radgrid with a detail table (a sub-grid).  The sub-grid rows always have a border around them (see the attached image) and I would like to eliminate the top and bottom lines.

I have already tried setting BorderStyle="None" and BorderWidth="0" on both the main grid and the detail table, but that has not changed anything.

How would I accomplish this?

Doncho
Telerik team
 answered on 25 Jun 2021
0 answers
304 views

Ver : 2018.3.910.45

Hello,
How to change Radcombobox in Telerik Radcombobox Ver : 2018.3.910.45 ? 

i only can change the background of .radInputCell and text, but looks ugly like this :

 

I want the RadCombobox looks and feels the same as DropDownList above, but the text can be editable

 

Thanks.

Mozart
Top achievements
Rank 1
Iron
Veteran
 asked on 25 Jun 2021
3 answers
293 views

Hi, I am trying to use Persistence Framework in old existing project. The way RadGrid is used in that application, is by opening new aspx page for edit or add record, and then re open main page.

So when Add button is clicked I am saving Grid settings in Session

            RadPersistenceManager PersistenceManager1 = RadPersistenceManager.GetCurrent(Page);
            PersistenceManager1.StorageProviderKey = m_strPersistenceKey;
            SessionStorageProvider.StorageProviderKey = m_strPersistenceKey;
            PersistenceManager1.SaveState();
            Response.Redirect("TblMaint_TableDataForm_Tableau.aspx");

Then in OnNeededDataSource load back Grid state

            RadPersistenceManager PersistenceManager1 = RadPersistenceManager.GetCurrent(Page);
            PersistenceManager1.StorageProviderKey = tblName;
            PersistenceManager1.LoadState();

The problem is, that grid correctly displaying sorting, if it was used and correctly filtering records when filter was used for the column, but there is no visual notification that filtering is using. It only appears when clicking again on filter and selecting one of the options. For example "No filter". Since grid still persisting previous values, filtering stays the same, but visually it now correctly displaying value for filter and column that is used for filter.

 

UPDATE: [Attachment removed by Progress Admin]

Attila Antal
Telerik team
 answered on 24 Jun 2021
1 answer
428 views

Hi,

I would like to know if it is possible to cancel changes for specific rows in RadGrid in Batch Mode. I added a button for each row to cancel the editing operation but when i click on it, it cancel all changes and lose information of other cells that were modified.

i hope you can help me to solve this

Regards

 

Doncho
Telerik team
 answered on 24 Jun 2021
1 answer
296 views

I have a GridTemplateColumn with a EditItemTemplate. In the editItemTemplate there is a cmbDepartment RadCombobox. In the code behind I want to get the cmbDepartment RadComboBox and then check to see if one of the items is equal to a string. If the string is not one of the text values in the RadComboBox I want to add it.

The RadComboBox loads from the Department lookup table. The data for the Grid is from a MyTable where the Department Name is stored with the rest of the record/row. If the Department Name is deleted from the lookup table I want to add the Department to the RadcomboBox when I load, or after I load the RadGrid.

 

 

 

   <telerik:RadGrid ID="rdgrdADGroupsAdmin" runat="server" OnItemDataBound="OnItemDataBoundHandler" AutoGenerateColumns="false" AllowPaging="true" Width="900px" PageSize="25" AllowSorting="True" AllowFilteringByColumn="true" GridLines="Horizontal" CssClass="ctbGridHeader">
        <GroupingSettings CaseSensitive="False" />
        <SelectedItemStyle CssClass="MySelectedClass" />
        <ClientSettings>
            <Selecting AllowRowSelect="True" />
            <Resizing EnableNextColumnResize="false" />
        </ClientSettings>
        <MasterTableView DataKeyNames="ADGroupMappingID, ADGroupName, DepartmentID, DepartmentName,  DeletedFlag" EditMode="InPlace" CommandItemDisplay="Top">
            <CommandItemSettings ShowRefreshButton="False" ShowAddNewRecordButton="True" AddNewRecordText="Add Funder Type" />
            <EditFormSettings EditColumn-ButtonType="PushButton">
            </EditFormSettings>
            <AlternatingItemStyle CssClass="MyRowClass" />
            <CommandItemTemplate>
                <div id="divButtons" style="padding: 5px 0 5px 5px">
                    <telerik:RadButton ID="btnAddDurationType" OnClientClicking="RadAddADMapping" runat="server" Text="Add Duration Type" CommandName="InitInsert">
                    </telerik:RadButton>
                     <telerik:RadButton ID="btnTEST" OnClientClicking="RadAddADMapping" runat="server" Text="Test Get Combo box" CommandName="TestComboBox">
                    </telerik:RadButton>
                </div>
            </CommandItemTemplate>
            <Columns>
                <telerik:GridEditCommandColumn FilterControlAltText="Filter EditCommandColumn column" UniqueName="EditColumn"
                    ButtonType="imagebutton">
                    <ItemStyle Width="3%" />
                </telerik:GridEditCommandColumn>
                <telerik:GridBoundColumn DataField="ADGroupMappingID" Display="false" UniqueName="colADGroupMappingID" ReadOnly="true">
                    <HeaderStyle HorizontalAlign="Center" />
                </telerik:GridBoundColumn>
                <%--<telerik:GridBoundColumn DataField="ADGroupName" MaxLength="50" FilterControlAltText="Filter colADGroupName column" UniqueName="colADGroupName" HeaderText="Name" AutoPostBackOnFilter="true" CurrentFilterFunction="Contains" ShowFilterIcon="false"
                    FilterControlToolTip="Press Enter or Tab key to search for value entered." FilterControlWidth="90%">
                    <HeaderStyle HorizontalAlign="Center" VerticalAlign="Top" Width="150px" />
                     <ItemStyle  VerticalAlign="Top" Width="150px"  />
                    <ColumnValidationSettings EnableRequiredFieldValidation="true" EnableModelErrorMessageValidation="true">
                        <RequiredFieldValidator ForeColor="Red" ErrorMessage="This field is required"></RequiredFieldValidator>
                        <ModelErrorMessage BackColor="Red" />
                    </ColumnValidationSettings>
                </telerik:GridBoundColumn>--%>
                <telerik:GridTemplateColumn HeaderStyle-Width="200px" HeaderText="AD Group Name" DataType="System.String" DataField="ADGroupName" UniqueName="colADGroupName" FilterControlAltText="Filter colADGroupName column" AutoPostBackOnFilter="true" CurrentFilterFunction="Contains"
                    ShowFilterIcon="false" FilterControlToolTip="Press Enter or Tab key to search for value entered." FilterControlWidth="100%" SortExpression="ADGroupName">
                    <ItemTemplate>
                        <%#DataBinder.Eval(Container.DataItem, "ADGroupName")%>
                    </ItemTemplate>
                    <EditItemTemplate>
                        <asp:TextBox ID="rdTxtBxcolADGroupName" runat="server" MaxLength="64" TextMode="SingleLine" Rows="1" Wrap="true" Width="80%" Text='<%# Bind("ADGroupName") %>'></asp:TextBox>
                    </EditItemTemplate>
                    <HeaderStyle HorizontalAlign="Center" />
                </telerik:GridTemplateColumn>
                <telerik:GridTemplateColumn DataField="DepartmentName" HeaderText="Department" FilterControlAltText="Filter colDepartmentName column" UniqueName="colDepartmentName" AutoPostBackOnFilter="true" CurrentFilterFunction="Contains" ShowFilterIcon="false"
                    FilterControlToolTip="Press Enter or Tab key to search for value entered." FilterControlWidth="90%" SortExpression="DepartmentName">
                    <ItemTemplate>
                        <%#DataBinder.Eval(Container.DataItem, "DepartmentName")%>
                    </ItemTemplate>
                    <HeaderStyle HorizontalAlign="Center" />
                    <ItemStyle Width="250px" VerticalAlign="Top" />
                    <EditItemTemplate>
                        <telerik:RadComboBox RenderMode="Lightweight" runat="server" ID="cmbDepartment" Width="300" DropDownWidth="300" DataTextField="DeptName"
                            DataValueField="DEPTLKEY" DataSourceID="dsDepartments" SelectedValue='<%#Bind("DepartmentID") %>' AppendDataBoundItems="true">
                        </telerik:RadComboBox>
                    </EditItemTemplate>
                </telerik:GridTemplateColumn>
               <%-- <telerik:GridDropDownColumn UniqueName="DropDownListColumn" ListTextField="DeptName"
                    ListValueField="DEPTLKEY" DataSourceID="dsDepartments" HeaderText="DropDown Column"
                    DataField="DepartmentName"  AllowAutomaticLoadOnDemand="true" DropDownControlType="RadComboBox" AllowSorting="true">
                </telerik:GridDropDownColumn>--%>
                <telerik:GridCheckBoxColumn UniqueName="colIsEditor" AllowFiltering="false" HeaderText="Is Editor" DataField="IsEditor">
                    <HeaderStyle HorizontalAlign="Left" Width="6%" />
                </telerik:GridCheckBoxColumn>
                <telerik:GridCheckBoxColumn UniqueName="colIsAdmin" AllowFiltering="false" HeaderText="Is Admin" DataField="IsAdmin">
                    <HeaderStyle HorizontalAlign="Left" Width="6%" />
                </telerik:GridCheckBoxColumn>
                <telerik:GridCheckBoxColumn UniqueName="colIsAllRecordsOnly" AllowFiltering="false" HeaderText="View All Records" DataField="IsAllRecordsOnly">
                    <HeaderStyle HorizontalAlign="Left" Width="6%" />
                </telerik:GridCheckBoxColumn>
                <telerik:GridButtonColumn ConfirmText="Delete this Duration Type?" ButtonType="LinkButton"
                    CommandName="Delete" Text="Delete" UniqueName="DeleteColumn">
                    <ItemStyle HorizontalAlign="Center" CssClass="MyImageButton" Width="3%" />
                </telerik:GridButtonColumn>

            </Columns>
            <EditFormSettings EditColumn-ButtonType="ImageButton">
            </EditFormSettings>
        </MasterTableView>
    </telerik:RadGrid>
    <%--<asp:SqlDataSource ID="dsDepartments" runat="server" ConnectionString="<%$ ConnectionStrings:csAppDB %>" SelectCommand="GetAllActiveDepartments" SelectCommandType="StoredProcedure"></asp:SqlDataSource>--%>    
    <asp:SqlDataSource ID="dsDepartments" runat="server" ConnectionString="<%$ ConnectionStrings:csCTBUtility %>" SelectCommand="Select * from (select *, row_number() over(partition by DEPTLKEY order by DEPTSTARTDATE desc) as rn from DEPARTMENT WHERE DEPTSTARTDATE <= GETDATE() and (DEPTENDDATE IS NULL or DEPTENDDATE >= GETDATE())) as T where rn = 1 ORDER BY DEPTNAME"></asp:SqlDataSource>

 

 

 

 

 

Attila Antal
Telerik team
 answered on 24 Jun 2021
0 answers
190 views

Regarding the 'Strip All Formatting' , or stripping formatting in general, I'm wondering how this works, I wasn't able to find specific details in documentation. Is it expected to be able to all styling? I'm noticing it doesn't seem to strip styling from outermost tag. I'm wondering if this is expected behavior, or if there are any known issues with this?

Reproducible using the RAD Editor demo (https://demos.telerik.com/aspnet-ajax/editor/examples/overview/defaultcs.aspx)

1. Clearing all existing text.

2. Pasting the following HTML into the HTML view:

<h3 style="color: #27282a; margin: 0px 0px 0.5rem; border: 0px solid #f1efef;">Sample Text <h3 style="color: #888888; margin: 0px 0px 0.5rem; border: 0px solid #f1efef;">technology</span> More Sample Text</h3>

3. Switch back to Design view, select all text, and Strip All Formatting.

This doesn't look to strip formatting from outermost tag, where I'd expect it would.

Michael
Top achievements
Rank 1
 asked on 23 Jun 2021
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?