Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
1.0K+ views

Hi, I'm trying to check all the checkboxes of a GridCheckboxColumn of a Radgrid that is using BatchEdit mode when a button is pressed.

This is my Radgrid:

<telerik:RadGrid ID="rgFTADatos" runat="server" AllowFilteringByColumn="True" AllowMultiRowEdit="True" AllowPaging="True" AutoGenerateColumns="False"
    CssClass="RadGrid_ModernBrowsers" OnNeedDataSource="rgDTOpciones_NeedDataSource" RenderMode="Lightweight" Skin="Simple" Height="100%"
    AllowSorting="True" OnBatchEditCommand="rgDTOpciones_BatchEditCommand" Width="100%">
    <GroupingSettings CollapseAllTooltip="Collapse all groups"></GroupingSettings>
    <ExportSettings>
        <Pdf PageWidth="">
        </Pdf>
    </ExportSettings>
    <ClientSettings>
        <Scrolling AllowScroll="true" SaveScrollPosition="true" UseStaticHeaders="true" FrozenColumnsCount="1" />
        <Resizing AllowColumnResize="false" ResizeGridOnColumnResize="false" AllowResizeToFit="false" />
        <ClientEvents OnGridCreated="" OnBatchEditOpened="OnBatchEditOpened" />
    </ClientSettings>
    <MasterTableView CommandItemDisplay="Bottom" CommandItemStyle-Font-Size="10" DataKeyNames="ID" EditMode="Batch" BatchEditingSettings-EditType="Row" Font-Names="Calibri" Font-Size="8" TableLayout="Fixed" PageSize="500">
        <NoRecordsTemplate>
            No se encontrarón registros para el criterio seleccionado.
        </NoRecordsTemplate>
        <CommandItemSettings
            CancelChangesText="Cancelar Operación"
            RefreshText="Refrescar"
            SaveChangesText="Guardar Cambios" />
        <Columns>
            <telerik:GridBoundColumn DataField="ID" FilterControlAltText="Filter column3 column" ForceExtractValue="Always" HeaderText="ID" UniqueName="column3" ReadOnly="True" FilterControlWidth="70%">
                <HeaderStyle Width="80px" />
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="DatoTecnicoGlosa" FilterControlAltText="Filter column2 column" HeaderText="Dato Técnico" UniqueName="OpcionGlosa" FilterControlWidth="70%" ReadOnly="True">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="EsTextoOpciones" FilterControlAltText="Filter column4 column" HeaderText="EsTextoOpciones" UniqueName="column4" AllowFiltering="False" Display="False">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="ID_FTE_Dato" Display="False" FilterControlAltText="Filter ID_FTE_Dato column" HeaderText="ID_FTE_Dato" UniqueName="ID_FTE_Dato" ForceExtractValue="Always" ReadOnly="True">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="ID_Opcion" Display="False" FilterControlAltText="Filter column5 column" ForceExtractValue="Always" HeaderText="ID_Opcion" UniqueName="column5">
            </telerik:GridBoundColumn>
            <telerik:GridCheckBoxColumn DataField="FTA_CDECCertificado" DataType="System.Boolean" FilterControlAltText="Filter column6 column" HeaderText="Certificado" UniqueName="column6">
                <HeaderStyle Width="80px" BackColor="#E8FFEA" />
                <ItemStyle HorizontalAlign="Center" />
            </telerik:GridCheckBoxColumn>
            <telerik:GridBoundColumn DataField="ID_DatoTecnico" Display="False" FilterControlAltText="Filter column7 column" ForceExtractValue="Always" HeaderText="ID_DatoTecnico" UniqueName="column7">
            </telerik:GridBoundColumn>
        </Columns>
        <BatchEditingSettings EditType="Row"></BatchEditingSettings>
 
        <PagerStyle PageSizes="500;1000;1500" />
 
        <CommandItemStyle Font-Size="10pt"></CommandItemStyle>
    </MasterTableView>
    <ClientSettings>
        <Scrolling AllowScroll="True" UseStaticHeaders="True" />
    </ClientSettings>
 
    <FilterMenu RenderMode="Lightweight"></FilterMenu>
 
    <HeaderContextMenu RenderMode="Lightweight"></HeaderContextMenu>
</telerik:RadGrid>

 

And this is the JavaScript that my button is using:

function CertificarRows()
{
    var grid = $find("<%=rgFTADatos.ClientID %>");
    var masterTable = grid.get_masterTableView();
 
    for(var row = 0; row < masterTable.get_dataItems().length; row++)
    {
 
        var currentRow = masterTable.get_dataItems()[0];
        var cell = masterTable.getCellByColumnUniqueName(currentRow, "column6");
 
        batchEditingManager.changeCellValue(cell, "true");
    }
         
}

 

I even tried altering the checkbox control itself but I couldn't get it to work, is there any way I can do this? Thank you for your help!

Diego
Top achievements
Rank 1
 answered on 22 Aug 2018
1 answer
839 views

I deployed my web app to Azure fine, then I attempted to deploy to GoDaddy and I got this compile error out of the blue. No new tools or GITs at all.

Error: Could not load file or assembly 'Telerik.Web.UI, Version=2017.2.711.45, Culture=neutral, PublicKeyToken=121fae78165ba3d4' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515)'SignupListC:\Users\George\OneDrive\SignupList\SignupList\LC

I run an up to date version Windows 10 64, Visual Studio Community 2017 Version 15.4.1, .Net Framework Version4.7.03056 using Telerik ASP.Net AJAX tools.

The Telerik.Web.UI.dll in bin and the reference are Version 2017.2.711.45.

I looked at lots of the solutions in the forum to 0x80131515 problems with Telerik DLLs.

My file properties do not have an Unblock button for Telerik.Web.UI.dll. (I do not run as with administrator abilities for security reasons).  I have a feeling this is the solution I need.

Removing the Properties/licenses.licx results in a compile error that the licenses.licx does not exist. Should be regenerated somehow?

Removing the reference to Telerik.Web.UI and re-adding it did not work.
My Web.config already had - <add tagPrefix="telerik" namespace="Telerik.Web.UI" assembly="Telerik.Web.UI" />

 

Update while writing this.  I managed after several tries to upgrade to ASP.Net Ajax version  4 so my Telerik.Web.UI.dll is now version v4.0.30319. The error message has stayed the same though, saying it cannot find 2017.2.711.45 which now does not exist. An extra problem,  how do I get my project to look for the right version.  There is no 2017.anything in my Web.config

Nothing works, I am dead in the water for development not being able to compile and deploy.

George
Top achievements
Rank 2
 answered on 22 Aug 2018
5 answers
166 views
When I used a RadScheduler, Internet Explorer has issues displaying the DatePicker control.  It appears, but under the schedule itself, mostly hidden.

I've done some research on some of the CSS bugs in IE, but everything says IE 8 fixed the bugs.  I am using IE8.

Has anyone see this and have a solution?
Guillermo
Top achievements
Rank 1
 answered on 21 Aug 2018
4 answers
101 views

I'm using Telerik controls in a legacy application that is forced to run in IE Compatibility Mode.  I'm using version 2015.2.826.40, as my understanding is that later versions don't support Compatibility Mode.

What I've noticed is that with this version, the root nodes on a radMenu are shifting slightly during animation.

I have a small video of the process:

https://youtu.be/lHO2EJO5HqQ

Any ideas on where I should start looking to try to debug or solve this issue?  By the way, changing the browser out of Compatility Mode solves the issue completely... the menu looks great.  But unfortunately that's not an option at this point.

Adam
Top achievements
Rank 1
 answered on 21 Aug 2018
2 answers
107 views

Can PersistenceManager store radCheckbox Checked property?
This control doesn't appears in supported controls list.

Thanks

Andres
Top achievements
Rank 1
Iron
 answered on 21 Aug 2018
1 answer
244 views

<telerik:GridTemplateColumn HeaderText="Tarikh Luput" HeaderStyle-HorizontalAlign="Center" UniqueName="ExpDate">
                                        <HeaderStyle Width="100px" />
                                        <ItemTemplate>
                                            <telerik:RadDatePicker ID="dtExp" runat="server" AutoPostBack="true" OnSelectedDateChanged="dtExp_TextChanged"
                                                DBSelectedDate='<%# IIf(IsDBNull(Eval("EXPIRY_DATE")), Nothing, Convert.ToDateTime(Eval("EXPIRY_DATE")))%>'>
                                                <DateInput
                                                        DateFormat="MM/dd/yyyy"
                                                        DisplayDateFormat="dd/MM/yyyy"
                                                        runat="server" >
                                                </DateInput>
                                            </telerik:RadDatePicker>
                                        </ItemTemplate>
                                    </telerik:GridTemplateColumn>  

 

It returns "Object cannot be cast from DBNull to other types." error. Help?

Tsvetomir
Telerik team
 answered on 20 Aug 2018
4 answers
345 views

Hi,

I'm trying to only allow users to only choose every second monday on the raddatepicker

Right now I have 

 

<SpecialDays>
    <telerik:RadCalendarDay Date="01/03/2017" Repeatable="Week" IsSelectable="false" IsDisabled="true"></telerik:RadCalendarDay>
    <telerik:RadCalendarDay Date="01/03/2017" Repeatable="Week" IsSelectable="false" IsDisabled="true"></telerik:RadCalendarDay>
    <telerik:RadCalendarDay Date="01/04/2017" Repeatable="Week" IsSelectable="false" IsDisabled="true"></telerik:RadCalendarDay>
    <telerik:RadCalendarDay Date="01/05/2017" Repeatable="Week" IsSelectable="false" IsDisabled="true"></telerik:RadCalendarDay>
    <telerik:RadCalendarDay Date="01/06/2017" Repeatable="Week" IsSelectable="false" IsDisabled="true"></telerik:RadCalendarDay>
    <telerik:RadCalendarDay Date="01/07/2017" Repeatable="Week" IsSelectable="false" IsDisabled="true"></telerik:RadCalendarDay>
    <telerik:RadCalendarDay Date="01/08/2017" Repeatable="Week" IsSelectable="false" IsDisabled="true"></telerik:RadCalendarDay>
</SpecialDays>

 

Which allows me to disable all days expect Monday. But then how do I only allow only every second monday to be clickable

And or is there another way which is better that can be done via server side coding?

Marin Bratanov
Telerik team
 answered on 20 Aug 2018
1 answer
198 views

I have a Radgrid where I am doing some extra validation on the InsertMethod. If that validation fails, I need to make sure that the editor stays open so that the user can still perform editing on the form. 

 

My radgrid is declared as follows:

<telerik:RadGrid
                ID="rgRuleExemptions"
                runat="server"
                AutoGenerateColumns="false"
                AllowPaging="true"
                AllowSorting="true"
                ClientSettings-EnableRowHoverStyle="true"
                EnableEmbeddedSkins="False"
                HeaderStyle-Wrap="False"
                RenderMode="Lightweight"
                HeaderStyle-ForeColor="White"
                PageSize="10"
                OnItemDataBound="RadGridRuleExemptions_ItemDataBound">
 
                <PagerStyle Mode="NextPrevAndNumeric" />
 
                <MasterTableView
                    AutoGenerateColumns="false"
                    DataKeyNames="Id"
                    SelectMethod="GetRuleExemptions"
                    InsertMethod="AddRuleExemption"
                    UpdateMethod="UpdateRuleExemption"
                    ItemType="RuleExemptions"
                    CommandItemDisplay="Top">
 
                    <CommandItemSettings />
 
                    <CommandItemTemplate>
                        <div class="text-right" style="background-color: transparent; padding: 5px 5px 5px 5px;">
                            <asp:Button
                                ID="btnAddRuleExemption"
                                runat="server"
                                CssClass="button button-teal button-medium"
                                Text="Add New Record"
                                CausesValidation="False"
                                CommandName="InitInsert" />
                        </div>
                    </CommandItemTemplate>
 
                    <Columns>
                        <telerik:GridButtonColumn
                            UniqueName="EditItem"
                            CommandName="Edit"
                            ItemStyle-Width="40"
                            ItemStyle-HorizontalAlign="Center"
                            ItemStyle-ForeColor="White"
                            Text="Edit"
                            ButtonType="LinkButton"
                            ButtonCssClass="button button-teal button-small">
                            <HeaderStyle Font-Bold="true" />
                        </telerik:GridButtonColumn>
                        <telerik:GridTemplateColumn UniqueName="Id" HeaderText="Id">
                            <ItemTemplate>
                                <asp:Label ID="lblId" runat="server" Text='<%# Item.Id %>'></asp:Label>
                            </ItemTemplate>
                        </telerik:GridTemplateColumn>
                        <telerik:GridTemplateColumn UniqueName="Category" HeaderText="Category">
                            <ItemTemplate>
                                <asp:Label ID="lblCategory" runat="server" Text='<%# Item.Category %>'></asp:Label>
                            </ItemTemplate>
                        </telerik:GridTemplateColumn>
                        <telerik:GridTemplateColumn UniqueName="RuleName" HeaderText="Rule Name">
                            <ItemTemplate>
                                <asp:Label ID="lblRuleName" runat="server" Text='<%# Item.RuleName %>'></asp:Label>
                            </ItemTemplate>
                        </telerik:GridTemplateColumn>
                        <telerik:GridTemplateColumn UniqueName="Version" HeaderText="Version">
                            <ItemTemplate>
                                <asp:Label ID="lblVersion" runat="server" Text='<%# Item.Version %>'></asp:Label>
                            </ItemTemplate>
                        </telerik:GridTemplateColumn>
                        <telerik:GridTemplateColumn UniqueName="NetworkId" HeaderText="Network Id">
                            <ItemTemplate>
                                <asp:Label ID="lblNetworkId" runat="server" Text='<%# Item.NetworkId %>'></asp:Label>
                            </ItemTemplate>
                        </telerik:GridTemplateColumn>
                        <telerik:GridTemplateColumn UniqueName="OperatorId" HeaderText="Operator Id">
                            <ItemTemplate>
                                <asp:Label ID="lblOperatorId" runat="server" Text='<%# Item.OperatorId %>'></asp:Label>
                            </ItemTemplate>
                        </telerik:GridTemplateColumn>
                        <telerik:GridTemplateColumn UniqueName="Justification" HeaderText="Justification">
                            <ItemTemplate>
                                <asp:Label ID="lblJustification" runat="server" Text='<%# Item.Justification %>'></asp:Label>
                            </ItemTemplate>
                        </telerik:GridTemplateColumn>
                    </Columns>
 
                    <EditFormSettings EditFormType="Template">
                        <FormStyle />
 
                        <FormTemplate>
                            <div class="form-horizontal" style="margin-top: 15px;">
                                <%--Category--%>
                                <div class="form-group">
                                    <label for="radDropDownCategory" class="col-md-2 control-label">Category <em class="requiredIndicator">*</em></label>
                                    <div class="col-md-5">
                                        <telerik:RadDropDownList runat="server"
                                            ID="radDropDownCategory"
                                            DataTextField="TextDescription"
                                            DataValueField="Value"
                                            RenderMode="Lightweight"
                                            SelectMethod="GetCategories"
                                            SelectedValue='<%# BindItem.Category %>'>
                                        </telerik:RadDropDownList>
                                    </div>
                                </div>
 
                                <%--Rule Name--%>
                                <div class="form-group">
                                    <label for="txtRuleName" class="col-md-2 control-label">Rule Name <em class="requiredIndicator">*</em></label>
                                    <div class="col-md-5">
                                        <asp:TextBox ID="txtRuleName" runat="server" ClientIDMode="Static" Text='<%# BindItem.RuleName %>'
                                            MaxLength="100"></asp:TextBox>
                                        <asp:RequiredFieldValidator ID="rfvRuleName" runat="server" ClientIDMode="Static" ControlToValidate="txtRuleName"
                                            ErrorMessage="Rule Name is Required" ValidationGroup="RuleExemptionGroup" CssClass="text-error" Display="Dynamic">
                                        </asp:RequiredFieldValidator>
                                    </div>
                                </div>
 
                                <%--Version--%>
                                <div class="form-group">
                                    <label for="txtVersion" class="col-md-2 control-label">Version <em class="requiredIndicator">*</em></label>
                                    <div class="col-md-3">
                                        <asp:TextBox ID="txtVersion" runat="server" ClientIDMode="Static" Text='<%# BindItem.Version %>'
                                            MaxLength="32"></asp:TextBox>
                                        <asp:RequiredFieldValidator ID="rfvVersion" runat="server" ClientIDMode="Static" ControlToValidate="txtVersion"
                                            ErrorMessage="Version is Required" ValidationGroup="RuleExemptionGroup" CssClass="text-error" Display="Dynamic">
                                        </asp:RequiredFieldValidator>
                                    </div>
                                </div>
 
                                <%--Network Id--%>
                                <div class="form-group">
                                    <label for="txtNetworkId" class="col-md-2 control-label">Network Id</label>
                                    <div class="col-md-3">
                                        <asp:TextBox ID="txtNetworkId" runat="server" ClientIDMode="Static" Text='<%# BindItem.NetworkId %>'
                                            MaxLength="32"></asp:TextBox>
                                    </div>
                                </div>
 
                                <%--Operator Id--%>
                                <div class="form-group">
                                    <label for="txtOperatorId" class="col-md-2 control-label">Operator Id</label>
                                    <div class="col-md-3">
                                        <asp:TextBox ID="txtOperatorId" runat="server" ClientIDMode="Static" Text='<%# BindItem.OperatorId %>'
                                            MaxLength="32"></asp:TextBox>
                                    </div>
                                </div>
 
                                <%--Justification--%>
                                <div class="form-group">
                                    <label for="txtJustification" class="col-md-2 control-label">Justification <em class="requiredIndicator">*</em></label>
                                    <div class="col-md-5">
                                        <asp:TextBox ID="txtJustification" runat="server" ClientIDMode="Static" Text='<%# BindItem.Justification %>'
                                            MaxLength="5000" TextMode="MultiLine" Rows="4"></asp:TextBox>
                                        <asp:RequiredFieldValidator ID="rfvJustification" runat="server" ClientIDMode="Static" ControlToValidate="txtJustification"
                                            ErrorMessage="Justification is Required" ValidationGroup="RuleExemptionGroup" CssClass="text-error" Display="Dynamic">
                                        </asp:RequiredFieldValidator>
                                    </div>
                                </div>
                            </div>
 
                            <div class="form-horizontal" style="margin-top: 15px;">
                                <%--Form Buttons--%>
                                <div class="form-group">
                                    <label class="col-md-2 control-label"></label>
                                    <div class="col-md-6">
                                        <asp:Button ID="btnSave" runat="server" Text="Save" CssClass="button button-blue btn-md" CommandName="PerformInsert" CausesValidation="true" Visible="false" ValidationGroup="RuleExemptionGroup" />
                                        <asp:Button ID="btnUpdate" runat="server" Text="Update" CssClass="button button-blue btn-md" CommandName="Update" CausesValidation="true" Visible="false" ValidationGroup="RuleExemptionGroup" />
                                        <asp:Button ID="btnCancel" runat="server" Text="Cancel" CssClass="button button-orange btn-md" CommandName="Cancel" CausesValidation="false" />
                                    </div>
                                </div>
                            </div>
                        </FormTemplate>
                    </EditFormSettings>
                </MasterTableView>
            </telerik:RadGrid>

 

Code behind:

public void AddRuleExemption()
{
            var item = new RuleExemptions();
            var context = new DomainContext();
            var domainObject = new RuleExemptions(context);
 
            TryUpdateModel(item);
            var add = domainObject.AddRuleExemption(item);
 
            if (!add.IsOperationSuccessful)
            {
                pnlErrorMessage.Visible = true;
                lblErrorMessage.Text = add.OperationReturnMessage;
                // I WANT TO KEEP THE EDITOR OPEN HERE...
            }
            else
            {
                lblErrorMessage.Text = "Operation Successful";
            }
        }

 

How can I keep the editor open the add operation was not successful? (Note the line // I WANT TO KEEP THE EDITOR OPEN HERE... above).

Please note that I am using Model Binding in this instance. 

Thanks

 

 

 

Marin Bratanov
Telerik team
 answered on 20 Aug 2018
3 answers
631 views

I am looking at the demo mail app and i noticed that all the menu icons come from the css content: "\e6XX" tag

Rather than looking through every single one is there somewhere that has a reference of them all?

Marin Bratanov
Telerik team
 answered on 20 Aug 2018
1 answer
490 views

     Hi, 

I have successfully got my Radhtmlchart dynamically creating column series based on some data coming from a SQLDataSource (using VB.net). However, the sql data structure (see attachment below) requires the data to be split across an x axis datetime and my series seems to be just adding the series into the first date value regardless of the value in the sql table. I am obviously doing something wrong here (possibly with my table structure or the code).

What I want to achieve is that the two figures for June appear in the June section of the chart (please see attachment below), and the remaining for July and that the chart knows not to repeat series items if they already exist (in the case of "Defect Undefined" and "Failure").

I have also attached my vb code below which shows how the dynamic series is currently being populated. Any help would be appreciated, i've searched high and low and can't seem to find an example close to what I am looking for. Help!

Marin Bratanov
Telerik team
 answered on 20 Aug 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?