Hi,
My Scenario is I have to export a RadGrid,
I have created a grid name grdExport in aspx file and binding datasource in aspx.vb file.
My problem is i have to assign datasource dynamically,
For example, I have 5 different datasources ie A,B,C,D,E
First i assign "A" datasource to grdExport i will prepare a workbook for that,
then i assign "B" datasource to grdExport i will prepare a workbook for that.
I will repeat the same above process for all the datasources,
my issue is data exporting but the datasource "A" is repeating for rest of the datasources,
I dont know what i have missed and where i missed,
Here is my code,
NOTE: GetProcessDataForExport() is inside the for loop, i have to assign different datasources based on parameter(ModuleId) i got.
Public Function GetProcessDataForExport(ByVal ModuleId As Integer) As xlsx.Workbook
Try
Dim Shift As New ShiftSettings(TabId)
Dim ds As DataSet
ds = SqlDataProvider.phdag_GetShiftTags(ModuleId, KPIModuleId)
grdExportData.MasterTableView.GetColumn("Description").Visible = CType(SgsSettings("show_Description"), Boolean)
grdExportData.MasterTableView.GetColumn("Tag").Visible = CType(SgsSettings("show_Tag"), Boolean)
grdExportData.MasterTableView.GetColumn("UOM").Visible = CType(SgsSettings("show_UOM"), Boolean)
grdExportData.MasterTableView.GetColumn("Limits").Visible = CType(SgsSettings("show_Range"), Boolean)
grdExportData.MasterTableView.GetColumn("Target").Visible = CType(SgsSettings("show_Plan"), Boolean)
grdExportData.MasterTableView.GetColumn("Current").Visible = CType(SgsSettings("show_CurrV"), Boolean)
grdExportData.MasterTableView.GetColumn("ShiftAvg").Visible = CType(SgsSettings("show_ShiftAvgV"), Boolean)
grdExportData.MasterTableView.GetColumn("Shift24HrAvg").Visible = CType(SgsSettings("show_Shift24HrV"), Boolean)
grdExportData.MasterTableView.GetColumn("ShiftMinVal").Visible = CType(SgsSettings("show_ShiftMinV"), Boolean)
grdExportData.MasterTableView.GetColumn("ShiftMaxVal").Visible = CType(SgsSettings("show_ShiftMaxV"), Boolean)
grdExportData.MasterTableView.GetColumn("TimeStamp").Visible = CType(SgsSettings("show_TimeStamp"), Boolean)
grdExportData.MasterTableView.GetColumn("CorrectiveAction").Visible = CType(SgsSettings("show_CorrAct"), Boolean)
'Add Row Values
Dim dt As DataTable = GetTagsByTagType(ds.Tables(1), TagType, DeviationType)
grdExportData.ExportSettings.IgnorePaging = True
grdExportData.ExportSettings.FileName = ModuleId
grdExportData.ExportSettings.Excel.Format = GridExcelExportFormat.Xlsx
grdExportData.DataSource = New String() {}
grdExportData.DataSource = dt
grdExportData.Rebind()
Return TryCast(grdExportData.MasterTableView.GenerateXlsxOutput(Of xlsx.Workbook)(), xlsx.Workbook)
Catch ex As Exception
End Try
End Function
Thanks.
I have 2 question Related to 508 compliancy of RadGrid . Screen Reader used is Jaws.
Visual studio 2019
VB.NET
Framework version 4.8
Product: Telerik ASP.NET Ajax controls
Browser: Edge and Chrome
As I said, how to define style to export GridImageColumn from RadGrid?
I have a GridImageColumn, and the real size of pic is 100px*100px, and I set both ImageHeight and ImageWidth are 40px, it works fine to show on UI, no issues. my question is, when I export the RadGrid to Excel, GridImageColumn is also export successful, but the size is 100px*100px, how do I define some styles to change the size in Excel when exoprting? because I would like to be same size as shown as on UI. thank you very much.
Hi,
When currentpageindex = 1, grid retrieve only 1 row but if currentPageIndex <> 1 returns the rows excepted.
I ajaxified the grid.
<telerik:RadAjaxManager ClientEvents-OnResponseEnd="AjaxResponseEnd" ID="ramRepostasConsentimentos" runat="server">
<AjaxSettings>
<telerik:AjaxSetting AjaxControlID="rgListagem">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="rgListagem" />
</UpdatedControls>
</telerik:AjaxSetting>
</AjaxSettings>
</telerik:RadAjaxManager>
I set pageSize to 20 and i am using custom paging.
<telerik:RadGrid ID="rgListagem" runat="server" RenderMode="Lightweight" Width="100%" CellSpacing="0" BorderWidth="0" GridLines="None" PageSize="20" EnableViewState="true">
<MasterTableView TableLayout="Fixed" AutoGenerateColumns="false" AllowCustomPaging="true" AllowPaging="true" PageSize="20" ShowHeadersWhenNoRecords="true">
<Columns>
<telerik:GridBoundColumn DataField="numMec" HeaderText="Nº Mec.">
<HeaderStyle CssClass="TextIndent" Width="100px" />
<ItemStyle CssClass="TextIndentRight" />
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="descColaborador" HeaderText="Colaborador">
<HeaderStyle CssClass="TextIndent" Width="30%" />
<ItemStyle CssClass="TextIndent" />
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="descConsentimentoInformado" HeaderText="Consentimento Informado">
<HeaderStyle CssClass="TextIndent" Width="70%" />
<ItemStyle CssClass="TextIndent" />
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="consentimento" HeaderText="Consentimento">
<HeaderStyle CssClass="TextIndent" Width="100px" />
<ItemStyle CssClass="TextIndent" />
</telerik:GridBoundColumn>
</Columns>
</MasterTableView>
<HeaderStyle VerticalAlign="Middle" HorizontalAlign="Left" />
<AlternatingItemStyle CssClass="TLookUpsRowBlue" VerticalAlign="Middle" />
<ItemStyle CssClass="TLookUpsRowGrey" VerticalAlign="Middle" />
<PagerStyle Mode="NextPrevAndNumeric" Position="Bottom" PageSizeControlType="None" PagerTextFormat="{4} Pag. {0} de {1}, Registos {2} até {3} de {5}." CssClass="TLookupsFooter" PageButtonCount="5" />
<ClientSettings>
<Scrolling UseStaticHeaders="true" AllowScroll="true" />
</ClientSettings>
</telerik:RadGrid>
I am using OnNeedDataSourceEvent.
Protected Sub rgListagem_NeedDataSource(sender As Object, e As Telerik.Web.UI.GridNeedDataSourceEventArgs) Handles rgListagem.NeedDataSource Dim SqlCmd As SqlCommand, SqlDa As SqlDataAdapter, Data As DataTable SqlCmd = fGetClsFunc.fGetCommand(StoredProcedureName, CommandType.StoredProcedure, True) SqlCmd.Parameters("@strAction").Value = "R" SqlCmd.Parameters("@skip").Value = rgListagem.MasterTableView.CurrentPageIndex * rgListagem.MasterTableView.PageSize SqlCmd.Parameters("@take").Value = rgListagem.MasterTableView.PageSize +
rgListagem.MasterTableView.CurrentPageIndex * rgListagem.MasterTableView.PageSize
SqlDa = New SqlDataAdapter(SqlCmd) Data = New DataTable() SqlDa.Fill(Data) rgListagem.DataSource = Data rgListagem.VirtualItemCount = SqlCmd.Parameters("@Contador").Value End Sub
if CurrentPageIndex = 1, Query returns 20 rows but only appear one.
Is there a better way, or built-in way, when an Item gets Filtered using the drop-down menu, to show it in the header cell like it does when you sort.
I found an old thread and copied it to my Item Command, so an image is shown for now.
Am I missing a setting to do it automatically? I let them choose the Theme, so I can't arbitrarily impose a syle on the Header.
Thanks
David
if (e.CommandName == RadGrid.HeaderContextMenuFilterCommandName)
{
Triplet arguments = e.CommandArgument as Triplet;
Pair filter1 = arguments.Second as Pair;
Pair filter2 = arguments.Third as Pair;
GridColumn column = (rgCOREPARTS as RadGrid).MasterTableView.GetColumn(arguments.First.ToString());
if (filter1.First.ToString() == "NoFilter" && filter2.First.ToString() == "NoFilter")
{
column.HeaderText = column.UniqueName;
}
else
{
column.HeaderText = column.HeaderText + "<img src = 'https://hq.certifiedtransmission.com/ufo/Images/Filter02.png' style='float: right;'>";
}
}
I'm using Sitecore 9.3 and the RTE is currently removing HTML entities that needs to be kept in content.
The issue is with the word joiner entity:
⁠
⁠
https://www.screencast.com/t/nL1ufw7s
Is there anything that can be done to fix that behavior?
Thanks!
Radsearchbox is working fine when user input is by typing or copy-paste but when the input is from barcode reader radsearchbox not fire Search event.
¿Can i use an alternative event?
We have a couple of grids in which we use drag and drop to move content between the grids. However in a recent update, we needed to add a hyperlink column to the grids. The problem is when you want to drag and you click on the hyperlink column, it does not select and drag the row, it appears to try and drag a link(and no drag/drop events fire). Of course we would like the single click to continue to launch a detail page from hyperlink, but click and drag to move the row to the other grid.
Is is possible to distinguish between a single click to launch the hyperlink content, but also recognize the click and hold for dragging to move the row to the other grid ???
Hello,
Radgrid combined filter options not showing in Mobile/Responsive Device
When I click on filter icon in RadGrid than sub menu of filter options are not showing in Mobile/Responsive device.
FYI - In web its working fine.
Please do the needful for the same and Let me know if anyone wants more details.
Thanks,
Mukesh Prajapati