Hi
Im using Visual Studio 2022 and c#
I have a telerik RadGrid within my apsx page and I have set editMode="batch"
One of the columns SOStatus is a raddropdownList, with set items. When I select from the dropdown list and click on saveChanges within BatchEditCommand the SOStatus is blank, even though I have selected something. Not sure why?
Here is my ASPX
<telerik:GridTemplateColumn UniqueName="SOStatus" DataField="SOStatus" HeaderText="SO Status">
<HeaderStyle Width="80px" />
<ItemStyle Width="80px" />
<ItemTemplate>
<%# Eval("SOStatus") %>
</ItemTemplate>
<EditItemTemplate>
<telerik:RadDropDownList ID="rdSOStatus" runat="server" DataValueField="SOStatus" DataTextField="SOStatus" Width="110%">
<Items>
<telerik:DropDownListItem Text="" />
<telerik:DropDownListItem Text="Sale" />
<telerik:DropDownListItem Text="Pull Forward" />
<telerik:DropDownListItem Text="Risk" />
<telerik:DropDownListItem Text="Drop for this week" />
<telerik:DropDownListItem Text="Drop" />
</Items>
</telerik:RadDropDownList>
</EditItemTemplate>
</telerik:GridTemplateColumn>
and here is the BatchEditCommand c# code
protected void rg_SalesPlan_BatchEditCommand(object sender, GridBatchEditingEventArgs e)
{
var batchEditingCommands = (List<GridBatchEditingCommand>)e.Commands;
foreach (GridBatchEditingCommand batchCommand in batchEditingCommands)
{
Hashtable oldValues = batchCommand.OldValues;
Hashtable newValues = batchCommand.NewValues;
string SOStatus = newValues["SOStatus"].ToString();
string OrigSOStatus = oldValues["SOStatus"].ToString();
}
Hi
Im using visual studio 2019 .netframework using c#
I have a telerik Rad grid that is in Batch Mode and works great. Within rg_SalesPlan_BatchEditCommand it goes through each edited row and does an update to the database, if one of the records fails to update the error message is added to a variable which collects any other errors. One finished in the foreach loop if any errors occured a popup alert is displayed with the errors.
My problem is once I click OK to the alert to acknowledge the errors, the grid refreshes but Im unable to continue editing any other rows, If I click on a row nothing happen, until I click on Cancel or Save Changes button, then the grid goes back to normal.
Whats the best way to refresh the state of the grid so its back to normal please?
Thanks
Rakhee
Good morning
Was there issues with any recent updated to Telerik? I have just noticed that in Design View of my visual studio project, none of my Telerik RadGrds are displayed anymore. Instead I get a control box on each grid with the error "Sysem.NullReferenceException"
I'm using a Telerik RadGrid with nested grids (using NestedViewTemplate
) inside an ASP.NET Web Forms page. I've enabled scrolling with AllowScroll="true"
and UseStaticHeaders="true"
, and set a fixed width for the outer container with horizontal scrolling.
The issue is that when I scroll horizontally to the right and then expand a nested row, the inner RadGrid
(in the nested view) does not align properly or its scroll resets to the left. I want both the parent and child grids to stay aligned and scroll consistently, especially when expanding/collapsing rows.
Has anyone faced a similar issue or found a good way to synchronize scrolling between parent and nested grids?
I have created an application within Visual Studio 2019 and using c#.
The project has a page which uses a telerik RadGrid. It is populated on page load and I have filtering enabled on 3 of the columns. I have set the aspx for the columns to have AutoPostBackOnFilter="true" AllowFiltering="true" ShowFilterIcon="true"
The runs perfectly when ran in development environment but when I publish my application to the web server the filter does not work at all. Nothing happens if I tab out of the filter text box or if I select anything from the filter icon.
Can anyone advise what the issue could be please? I am using Telerik.web.ui version 2024.1.131.45
Thanks
RR
I have a radgrid with a standard modal popup for making entries. Everything works as it should. However, I have been trying to modify the field in the popup window so the user would see a multiline box to make entries.
I've tried css, asp:textbox, and other ideas. but they all failed. Here is my code.....
any help would be appriciated.
<div style="width:95%; margin:2%; display:inline-block">
<telerik:RadGrid ID="RadGrid1" runat="server" OnNeedDataSource="RadGrid1_NeedDataSource" AutoGenerateColumns="False"
CellSpacing="-1" GridLines="Both" RenderMode="Lightweight" OnItemCommand="RadGrid1_ItemCommand" MasterTableView-ExpandCollapseColumn-CommandName="Insert">
<GroupingSettings CollapseAllTooltip="Collapse all groups" />
<MasterTableView CommandItemDisplay="Top" EditFormSettings-PopUpSettings-Modal="true" EditMode="PopUp" DataKeyNames="Line">
<CommandItemSettings ShowSaveChangesButton="False" />
<RowIndicatorColumn ShowNoSortIcon="False" Visible="False">
</RowIndicatorColumn>
<ExpandCollapseColumn Created="True" ShowNoSortIcon="False">
</ExpandCollapseColumn>
<Columns>
<telerik:GridBoundColumn DataField="Line" ReadOnly="true" FilterControlAltText="Filter Line column" HeaderText="Line" ShowNoSortIcon="False" UniqueName="Line">
<HeaderStyle Width="15px" HorizontalAlign="Center" />
<ItemStyle CssClass="lineNo" />
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="Description" ReadOnly="false" FilterControlAltText="Filter Description column" HeaderText="Description" ShowNoSortIcon="False" UniqueName="Description">
<HeaderStyle Width="50%" />
<ItemStyle CssClass="description" />
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="Created_by" ReadOnly="true" FilterControlAltText="Filter Created_by column" HeaderText="Created By" ShowNoSortIcon="False" UniqueName="Created_by">
<HeaderStyle Width="10%" />
<ItemStyle CssClass="empNo" />
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="Created_Name" ReadOnly="true" FilterControlAltText="Filter Created_by column" HeaderText="Created Name" ShowNoSortIcon="False" UniqueName="Created_Name">
<HeaderStyle Width="20%" />
<ItemStyle CssClass="empName" />
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="Created_Date" ReadOnly="true" FilterControlAltText="Filter Created_Date column" HeaderText="Created Date" ShowNoSortIcon="False" UniqueName="Created_Date">
<HeaderStyle Width="15%" />
</telerik:GridBoundColumn>
</Columns>
<EditFormSettings InsertCaption="Add new item" CaptionFormatString="Edit Line: {0}" CaptionDataField="Line">
<EditColumn FilterControlAltText="Filter EditCommandColumn column">
</EditColumn>
<PopUpSettings Modal="True" />
</EditFormSettings>
</MasterTableView>
<FilterMenu RenderMode="Lightweight">
</FilterMenu>
<HeaderContextMenu RenderMode="Lightweight">
</HeaderContextMenu>
</telerik:RadGrid>
</div>
I'm using the latest version of the ASP.NET Ajax tools with .NET framework 4.8. I'm attempting to change the color and add a tooltip on grid's row selector based on value of one it's columns. The color of the row selector changes as expected. However, the tooltip or title doesn't display at all on the mouseover. No error is shown in the browser's Dev Tools. Below is the HTML markup and JS.
FYI: I have successfully done this before not sure why it not working in this instance. Also, the grid is contained withing an TabStrip MultiPageview. Not sure if that would make a difference.
Thanks in advance for any help on this.
Markup<telerik:RadScriptManager ID="RadScriptManager1" runat="server" EnablePageMethods="True"></telerik:RadScriptManager>
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"></telerik:RadAjaxManager>
<telerik:RadSkinManager ID="RadSkinManager1" runat="server" RenderMode="Lightweight" Skin="Bootstrap"></telerik:RadSkinManager>
<telerik:RadToolTipManager ID="RadToolTipManager1" runat="server" AutoTooltipify="true" Skin="Bootstrap"></telerik:RadToolTipManager>
<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel2" runat="server" RenderMode="Lightweight" Skin="Bootstrap"></telerik:RadAjaxLoadingPanel>
<telerik:RadAjaxPanel ID="Grid3Panel" runat="server" LoadingPanelID="RadAjaxLoadingPanel2">
<telerik:RadGrid ID="Grid3" runat="server" Width="100%" Skin="Bootstrap" RenderMode="Lightweight" AutoGenerateColumns="false" DataSourceID="dsGrid3" AllowPaging="true" PagerStyle-AlwaysVisible="true" PageSize="50" CssClass="Gridheight2">
<ClientSettings>
<Scrolling AllowScroll="true" UseStaticHeaders="true" />
<Selecting AllowRowSelect="true" CellSelectionMode="SingleCell" />
<Resizing AllowRowResize="true" EnableRealTimeResize="True" ResizeGridOnColumnResize="true" AllowColumnResize="True" />
<ClientEvents OnGridCreated="Grid3_OnGridCreated" />
</ClientSettings>
<MasterTableView DataKeyNames="Check_Number" HeaderStyle-Font-Bold="true" HeaderStyle-Width="200px" ItemStyle-Font-Size="8pt" CommandItemDisplay="Top" CommandItemSettings-ShowRefreshButton="true" CommandItemSettings-ShowAddNewRecordButton="false">
<Columns>
<telerik:GridBoundColumn DataField="Check_Number" UniqueName="Check_Number" HeaderText="Check Number" DataType="System.String"></telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="Member_Name" UniqueName="Member_Name" HeaderText="Payee Name" DataType="System.String"></telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="Member_ID" UniqueName="Member_ID" HeaderText="Payee ID" DataType="System.String"></telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="SSN" UniqueName="SSN" HeaderText="SSN" DataFormatString="{0:###-##-####}"></telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="Payment_Amount" UniqueName="Payment_Amount" HeaderText="Check Amount" DataType="System.Double" DataFormatString="{0:c}"></telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="Payment_Date" UniqueName="Payment_Date" HeaderText="Check Date" DataType="System.DateTime" DataFormatString="{0:d}"></telerik:GridBoundColumn>
</Columns>
</MasterTableView>
</telerik:RadGrid>
</telerik:RadAjaxPanel>
function Grid3_OnGridCreated(s, e) {
var masterview = s.get_masterTableView();
var datarows = masterview.get_dataItems();
for (i = 0; i < datarows.length; i++) {
var rowselector3 = '';
if (datarows[i]._element.cells['0'].className == 'rgResizeCol') {
rowselector3 = datarows[i]._element.cells['0'];
if (rowselector3 !== null) {
var ssn = datarows[i].get_cell("SSN").innerText.replace("-", "");
ssn = ssn.trim()
if (ssn.length == 0) {
rowselector3.title = "Member has no SSN - This may cause an issue with payment.";
rowselector3.bgColor = '#ffc107';
}
}
}
}
}
Hello,
I have a RadGrid embedded in a RadTabStrip. This is defined in a UserControl with a RadAjaxManagerProxy. It displays content from a DB server. I have a GridButtonColumn that is defined below. Everything works fine except that when I try to delete a row by clicking on the icon it won't work initially. A second click results in a callback to the server's RgAttachments_ItemCommand appropriately. This behaviour happens consistently. I took a look at the generated code and noticed a difference in the button's clientside onclick handler
This following generated javascript works
if(!$find('ctl00_MainContent_ctlRqstAttachments_RgAttachmentRevision').confirm('Are you sure you wish to delete this file attachment?', event, 'ctl00_MainContent_ctlRqstAttachments_RgAttachmentRevision', 'Delete'))return false;__doPostBack('ctl00$MainContent$ctlRqstAttachments$RgAttachmentRevision$ctl00$ctl14$ctl00','')
This generated code doesn't
if(!$find('ctl00_MainContent_ctlRqstAttachments_RgAttachmentRevision').confirm('Are you sure you wish to delete this file attachment?', event, 'ctl00_MainContent_ctlRqstAttachments_RgAttachmentRevision', 'Delete'))return false;__doPostBack('ctl00$MainContent$ctlRqstAttachments$RgAttachmentRevision$ctl00$ctl12$ctl01','')
The column in question
<telerik:GridButtonColumn HeaderText="Delete" ConfirmText="Are you sure you wish to delete this file attachment?" ConfirmDialogType="RadWindow" ButtonCssClass="btn btn-outline-danger btn-sm rounded" ConfirmTitle="Delete" ButtonType="FontIconButton" CommandName="Delete" Text="Delete" UniqueName="DeleteColumn" ItemStyle-ForeColor="Red">
<ItemStyle HorizontalAlign="Center"></ItemStyle>
</telerik:GridButtonColumn>
Any help to resolve this is greatly appreciated
I've set
<telerik:GridTemplateColumn ... ShowFilterIcon="True">
but no icon appears when I apply a filter. Conversely, a sort icon does appear when I apply a sort.
Sorting is achieved by clicking on the column header, but for filtering, I am using a header context menu. Is that the source of the problem?