Telerik Forums
UI for ASP.NET AJAX Forum
0 answers
195 views

My grid works with aggregates (Count, Average, Max) or with grouping, but not with both.  When i try to add a group when i have any columns that display aggregates it misaligns the columns and the drag/drops column header gets stuck (see screenshot).  The only fix is to refresh the page.

[pre group screenshot]

[post group screenshot]

[Grid Code]


    @(Html.Kendo().Grid<FullResultsView>()
        .Name(Model.GridName)
        .Columns(columns =>
        {
       columns.Bound(c => c.Code).Width(200);
        columns.Bound(c => c.FacilityIdWithName).Width(250).Title("Facility");
        columns.Bound(c => c.SampleType).Title("Sample Type").Width(120);
        columns.Bound(c => c.Result).Width(120).ClientFooterTemplate("Max:#=max#, Avg:#=average#").ClientGroupFooterTemplate("Max:#=max#, Avg:#=average#");
        columns.Bound(c => c.SequenceNumber).Title("Sequence Number").Hidden(true).Width(120);
        columns.Bound(c => c.RequiresReTest).Title("Requires Re-Test").Hidden(true).Width(120);
        })
        .ToolBar(tools => tools.Excel())
        .Scrollable(s => s.Endless(true).Height(200))
        .Filterable()
        .Sortable()
        .Groupable()
        .ColumnMenu(cm => cm.Enabled(true))
        .Resizable(resize => resize.Columns(true))
        .Reorderable(reorder => reorder.Columns(true))
        .Excel(excel => excel
        .FileName("Data Export.xlsx")
        .Filterable(true)
        .ProxyURL(Url.Action("Report_Export", "Report"))
        )
        .Editable(editable => editable.Enabled(false))
        .DataSource(Model.GridName+"dataSource").AutoBind(false)
        )

[Datasource Code]


        @(Html.Kendo().DataSource<FullLeadResultsView>()
        .Name(Model.GridName+"dataSource").Ajax(dataSource => dataSource
        .Sort(s => s.Add(sa => sa.ResultCreatedOnLocal).Descending())
        .PageSize(1000)
        .Events(events =>
        {
        events.Error("function(e){error_handler(e,'" + Model.GridName + "');}");
        })
        .Model(model =>
        {
        model.Id(m => m.Id);
        model.Field(f => f.Id).Editable(false);
        })
        .Aggregates(ag =>
        {
        ag.Add(f => f.Code).Count();
        ag.Add(f => f.Result).Average().Max();
        })
        .Read(read => read.Action("Report_Read", "Report", Model.Search).Data("onGridRead"))
        )
        )

 

Logan
Top achievements
Rank 1
Veteran
 asked on 15 Feb 2022
1 answer
67 views

Hello.

Attacted File : Res27_aspx.txt, Res27_aspx_cs.txt, Problem.png

I wrote the code as you taught me. 

But, I wrote the code as you taught, But it doesn't work.

I have attached the file in question.

 

Question 1 ) Click the link below.

https://www.telerik.com/forums/in-radgrid-backcolor-of-selected-cell#1550610

I wrote the code as you taught me.
However, if I write the code as you taught, it doesn't work.
Please check the attached files Res27.aspx and Res27.aspx.cs to see what the problem is.
In Res27.aspx, The code below is written.
html body .RadGrid .pinkCell{
        background-image:none;
        background-color: lightpink;
    }
In Res27.aspx.cs, The code below is written.
item.CssClass = "pinkCell";

 

Question 2) Click the link below.

https://www.telerik.com/forums/radgrid#1552730

Please check the attached file (Res27.aspx, Res27.aspx.cs)

setTimeout(function() {  sender.get_masterTableView().fireCommand("cellSelected", output);})

In Attached file Res27.aspx, There is function cellSelected(sender, args).

In Attached file Res27.aspx.cs , There is if (e.CommandName == "cellSelected").

Please check the attached file Res27.aspx , Res27.aspx.cs.

 

Question 3) Click the link below.

https://www.telerik.com/forums/gap-between-radgrid-and-radtextbox#1553328

There is a gap between the Radgrid and RadTextbox.

I want there to be no gap between the grid and the box.

In Attached file Res27.aspx , There is 

<telerik:GridTemplateColumn DataField="D0_T1" HeaderText="1T"  Visible="true" ColumnGroupName="D0">
                                        <HeaderStyle Width="65px" CssClass="main_column_header2"  HorizontalAlign="Center" VerticalAlign="Middle" Font-Size="11px"/>
                                 <ItemStyle Width="65px"  CssClass="rgAltRow" HorizontalAlign="Center" VerticalAlign="Middle" Height="22px" BackColor="White" />
                                        <ItemTemplate> 
                                            <telerik:RadTextBox ID="D0_T1" runat="server" Text='<%#Bind("D0_T1")%>' MaxLength="4" Style="text-align: center" Width="60px" ></telerik:RadTextBox> 
    </ItemTemplate>
                                    </telerik:GridTemplateColumn>

 

 

Still not resolved.
Telerik is so inconvenient.
keep waiting for an answer.

 

Attila Antal
Telerik team
 answered on 15 Feb 2022
1 answer
613 views

My grid have one column it's start with 0 (As example:001120435)

Here's my grid data


Here's my excel export code,

 Protected Sub btnExcel_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnExcel.Click
        radgrid.ExportSettings.FileName = "ListofApplicant"
        radgrid.ExportSettings.IgnorePaging = True
        radgrid.ExportSettings.ExportOnlyData = True
        radgrid.ExportSettings.OpenInNewWindow = True
        radgrid.ExportSettings.Excel.Format = GridExcelExportFormat.Xlsx
        radgrid.MasterTableView.ExportToExcel()
    End Sub

Here's my excel result,

Doncho
Telerik team
 answered on 14 Feb 2022
1 answer
123 views

I did the two latest upgrades and I cannot compile my project now. Every Telerik reference gives "The type or namespace name 'Telerik' could not be found"

I am always nervous when I do Telerik upgrades.

I emptied the licenses.licx file, which is frequently the problem.

In the Webconfig

    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
      <dependentAssembly>
        <assemblyIdentity name="Telerik.Web.UI" publicKeyToken="121FAE78165BA3D4" />
        <bindingRedirect oldVersion="1.0.0.0-2018.3.909.45" newVersion="2020.1.114.45" />
      </dependentAssembly>
      <dependentAssembly>

The version is now 2022.1.19.45. Why does the upgrade not set the correct settings?

Should it be

      <dependentAssembly>
        <assemblyIdentity name="Telerik.Web.UI" publicKeyToken="121FAE78165BA3D4" />
        <bindingRedirect oldVersion="0.0.0.0-2022.1.19.45" newVersion="2022.1.19.45" />
      </dependentAssembly>

  like all the other dependenticies?

This change gives the same errors.  I assume the publicKeyToken is unchanged.

Vessy
Telerik team
 answered on 14 Feb 2022
1 answer
175 views

Hello!

Using RadGrid client side batch editing.

Is there a way to capture when the updates are complete when using the saveTableChanges?  Adding a callback function maybe?

I need to display a "saving" layer/message to let users know something is happening and prevent them from interacting with the grid.

Here is my code snippet:

                    var batchManager = grid1.get_batchEditingManager();
                    showLoadingPanel(true, 'Saving...');
                    batchManager.saveTableChanges(tables) ;
                    showLoadingPanel(false);

I would like to be able to ShowLoadingPanel before saving the table changes and hide it after the changes have been saved.

Thanks

Attila Antal
Telerik team
 updated answer on 14 Feb 2022
1 answer
147 views

Is it possible to hide specific rows but still have access to them client side?  I need to pull and update cell data from the hidden rows.  My updates are handled in batch edit value changed function.  Any ideas or advise would be great.  

I have tried to hide/show with batch edit opening and closing but this makes the rows visible to the user while they are editing fields.

If I hide the rows server side in pre render event I can't seem to access client side, unless I am doing something incorrectly.

Thanks!

Attila Antal
Telerik team
 updated answer on 14 Feb 2022
1 answer
164 views

Hi Team,

How can we restrict the auto correction of Raddatepicker input.?

Say example, if I enter 25/10/2020 in raddatepicker (if format  is MM/DD/YYYY) it is automatically changes to 10/25/2020 when I click outside!.

I don't want to rearrange the date. Instead it should warn depends on the date format.

Also if we enter date as "00" and month as "00" , it shows an invalid date!. Instead can we make it as a warning as we enter invalid date in RaddatePicker ?

Please suggest your thoughts or comments.

 

Note : we are using a bit old dll version shown below

RadControls for ASP.NET AJAX Q1 2013


Regards,

Ramesh.

Rumen
Telerik team
 answered on 14 Feb 2022
0 answers
140 views

Hello

Attacted File : Res27_aspx.txt, Res27_aspx_cs.txt

 

In Attacted File Res27_aspx.txt,

<telerik:RadListBox ID="listAssign" runat="server" DataTextField="ORDER_NO" DataValueField="PLAN_TIME" Height="550px" SelectionMode="Multiple" Width="550px">
<ItemTemplate> 
<telerik:RadLabel ID="lbOrderNo" runat="server" Text='<%# Eval("ORDER_NO") %>'  ></asp:Label> 
<telerik:RadLabel ID="lbPlanTime" runat="server" Text='<%# Eval("PLAN_TIME") %>' ></asp:Label>
</ItemTemplate>
</telerik:RadListBox>

 

In Attacted File Res27_aspx.cs.txt,

DataTable dt = bzobj.GetWorkOrderList(sShopCd, sLineCode, sPlanDate);

listAssign.DataSource = dt;

 

Why not?
waiting for answer

anna
Top achievements
Rank 1
Bronze
Iron
 updated question on 11 Feb 2022
0 answers
137 views

 

 

Attacted File : problem.png

 

There is a gap between the Radgrid and RadTextbox.

I want there to be no gap between the grid and the box.

Please Help me.

 

 <div class="content_table_box1 div_Width grid_outer_line_td" style="text-align: right; border-top: 2px solid #1b409b; height: 610px;">
       <telerik:radgrid id="gv" runat="server" allowpaging="true" allowsorting="true" enableembeddedskins="false" height="610px"
              cellspacing="0" autogeneratecolumns="false" gridlines="Both" pagesize="100" onneeddatasource="gv_NeedDataSource" onexcelexportcellformatting="gv_ExcelExportCellFormatting">
                       <ClientSettings>
                               <Selecting AllowRowSelect="True" />
                               <Resizing AllowColumnResize="True" AllowRowResize="false" ResizeGridOnColumnResize="false" ClipCellContentOnResize="true" EnableRealTimeResize="false" AllowResizeToFit="false" />
                             
  <Scrolling AllowScroll="True" UseStaticHeaders="True" FrozenColumnsCount="5"></Scrolling>
                             </ClientSettings>
                               <MasterTableView AlternatingItemStyle-Wrap="true" EnableNoRecordsTemplate="true" ShowHeader="true" ShowHeadersWhenNoRecords="true" Width="100%" ItemStyle-Wrap="false" HeaderStyle-Wrap="false" HeaderStyle-Font-Bold="true" TableLayout="Fixed">
                                 <ColumnGroups>
                                    <telerik:GridColumnGroup HeaderText="D" Name="D0" HeaderStyle-HorizontalAlign="Center" HeaderStyle-Height="22"></telerik:GridColumnGroup>                                   
                                 </ColumnGroups>
                                 <Columns> 
                                 
                                     <telerik:GridBoundColumn  DataField="ALC_CODE" HeaderText="ALC" Visible="true">
                                      <HeaderStyle Width="100px" CssClass="main_column_header2"  HorizontalAlign="Center" VerticalAlign="Middle" />
                                      <ItemStyle Width="100px"  CssClass="rgAltRow" HorizontalAlign="Center" VerticalAlign="Middle" Height="22px" BackColor="White" />
                                    </telerik:GridBoundColumn>

<telerik:GridTemplateColumn DataField="D0_T1" HeaderText="1T"  Visible="true" ColumnGroupName="D0">
<HeaderStyle Width="65px" CssClass="main_column_header2"  HorizontalAlign="Center" VerticalAlign="Middle" Font-Size="11px"/>
<ItemStyle Width="65px"  CssClass="rgAltRow" HorizontalAlign="Center" VerticalAlign="Middle" Height="22px" BackColor="White" />
<ItemTemplate> 
<telerik:RadTextBox ID="D0_T1" runat="server" Text='<%#Bind("D0_T1")%>' MaxLength="4" Style="text-align: center" Width="60px" ></telerik:RadTextBox> 
</ItemTemplate>
</telerik:GridTemplateColumn>
anna
Top achievements
Rank 1
Bronze
Iron
 asked on 10 Feb 2022
1 answer
159 views

Hi,

I'm using a RadComboBox but I'm having some problems when the width is more than 1000 pixels. (see capture)

Does anyone knows how to fix that ? Or should I limit the RadComboBox width to 1000 pixels ?

Thanks.

Vessy
Telerik team
 answered on 09 Feb 2022
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?