Hello,
I've created a small page with a RadGrid on it. Now the problem is, that the event OnNeedDataSource is only fired if i set ViewState=false(I found this solution on an other thread). Now the grid does work, but if I also habe 2 GridButtonColumn's in the grid. Now if I click them, the OnNeedDataSource event is only called bevore the method "RadGrid1_ItemCommand". So any changes I make to the database are not shown in the grid!
aspx code:
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="QU_R17_ASP_Testproject.WebForm1" %><%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %><%@ Register TagPrefix="a" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI, Version=2017.2.711.45, Culture=neutral, PublicKeyToken=121fae78165ba3d4" %><!DOCTYPE html><html xmlns="http://www.w3.org/1999/xhtml"><head runat="server"> <title></title></head><body> <form runat="server"> <asp:ScriptManager ID="ScriptManager1" runat="server" /> <div class="demo-container"> <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server"> </telerik:RadAjaxLoadingPanel> <telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server"> <telerik:RadDatePicker ID="StartDateTimePicker" runat="server" AutoPostBack="false" Culture="en-US" > <Calendar UseRowHeadersAsSelectors="False" UseColumnHeadersAsSelectors="False" EnableWeekends="True" FastNavigationNextText="<<"></Calendar> <DateInput DisplayDateFormat="yyyy-MM-dd" DateFormat="yyyy-MM-dd" LabelWidth="40%" AutoPostBack="True" runat="server"> <EmptyMessageStyle Resize="None" /> <ReadOnlyStyle Resize="None" /> <FocusedStyle Resize="None" /> <DisabledStyle Resize="None" /> <InvalidStyle Resize="None" /> <HoveredStyle Resize="None" /> <EnabledStyle Resize="None" /> </DateInput> <DatePopupButton ImageUrl="" HoverImageUrl=""></DatePopupButton> </telerik:RadDatePicker> <telerik:RadDatePicker ID="EndDateTimePicker" runat="server" AutoPostBack="false" Culture="en-US" > <Calendar UseRowHeadersAsSelectors="False" UseColumnHeadersAsSelectors="False" EnableWeekends="True" FastNavigationNextText="<<"></Calendar> <DateInput DisplayDateFormat="yyyy-MM-dd" DateFormat="yyyy-MM-dd" LabelWidth="40%" AutoPostBack="True"> <EmptyMessageStyle Resize="None" /> <ReadOnlyStyle Resize="None" /> <FocusedStyle Resize="None" /> <DisabledStyle Resize="None" /> <InvalidStyle Resize="None" /> <HoveredStyle Resize="None" /> <EnabledStyle Resize="None" /> </DateInput> <DatePopupButton ImageUrl="" HoverImageUrl=""></DatePopupButton> </telerik:RadDatePicker> <telerik:RadTextBox ID="ResultTextBox" BorderStyle="None" runat="server" Resize="Both" Width="1000px"></telerik:RadTextBox> <telerik:RadGrid RenderMode="Lightweight" ID="RadGrid2" runat="server" AllowPaging="True" AllowSorting="True" AllowFilteringByColumn="True" ShowGroupPanel="True" DataKeyNames="ID" OnItemCommand="RadGrid1_ItemCommand" OnNeedDataSource="RadGrid2_NeedDataSource" EnableViewState="False"> <MasterTableView AutoGenerateColumns="false" ShowFooter="True"> <PagerStyle AlwaysVisible="true" /> <CommandItemSettings ShowAddNewRecordButton="False" ShowRefreshButton="False" /> <Columns> <telerik:GridBoundColumn FilterControlWidth="120px" DataField="Status" HeaderText="Status" AutoPostBackOnFilter="false" CurrentFilterFunction="Contains" ShowFilterIcon="false"> <FilterTemplate> <telerik:RadComboBox RenderMode="Lightweight" ID="RadComboBoxStatus" Width="110px" SelectedValue='<%# ((GridItem)Container).OwnerTableView.GetColumn("Status").CurrentFilterValue %>' runat="server" OnClientSelectedIndexChanged="StatusIndexChanged"> <Items> <telerik:RadComboBoxItem Text="All" /> <telerik:RadComboBoxItem Text="Assigned" Value="Assigned" /> <telerik:RadComboBoxItem Text="Idle" Value="Idle" /> <telerik:RadComboBoxItem Text="CLOSED" Value="CLOSED" /> </Items> </telerik:RadComboBox> <telerik:RadScriptBlock ID="RadScriptBlock1" runat="server"> <script type="text/javascript"> function StatusIndexChanged(sender, args) { var tableView = $find("<%# ((GridItem)Container).OwnerTableView.ClientID %>"); tableView.filter("Status", args.get_item().get_value(), "EqualTo"); } </script> </telerik:RadScriptBlock> </FilterTemplate> </telerik:GridBoundColumn> <telerik:GridBoundColumn FilterControlWidth="150px" DataField="System" HeaderText="System" AutoPostBackOnFilter="true" CurrentFilterFunction="Contains" ShowFilterIcon="false"> <FilterTemplate> <telerik:RadComboBox RenderMode="Lightweight" ID="RadComboBoxSystem" Width="150px" AppendDataBoundItems="true" SelectedValue='<%# ((GridItem)Container).OwnerTableView.GetColumn("System").CurrentFilterValue %>' runat="server" OnClientSelectedIndexChanged="SystemIndexChanged"> <Items> <telerik:RadComboBoxItem Text="All" /> <telerik:RadComboBoxItem Text="Printing" Value="Printing" /> <telerik:RadComboBoxItem Text="Wet" Value="Wet" /> <telerik:RadComboBoxItem Text="Assembly" Value="Assembly" /> </Items> </telerik:RadComboBox> <telerik:RadScriptBlock ID="RadScriptBlock2" runat="server"> <script type="text/javascript"> function SystemIndexChanged(sender, args) { var tableView = $find("<%# ((GridItem)Container).OwnerTableView.ClientID %>"); tableView.filter("System", args.get_item().get_value(), "EqualTo"); } </script> </telerik:RadScriptBlock> </FilterTemplate> </telerik:GridBoundColumn> <telerik:GridMaskedColumn DataField="SystemId" HeaderText="SystemId" Display="False" /> <telerik:GridMaskedColumn DataField="JobId" HeaderText="JobId" FilterControlWidth="80px" AutoPostBackOnFilter="false" CurrentFilterFunction="EqualTo" FilterDelay="2000" ShowFilterIcon="false" Display="False"> <ItemStyle HorizontalAlign="Right" /> </telerik:GridMaskedColumn> <telerik:GridBoundColumn FilterControlWidth="80px" DataField="Job" HeaderText="Job" AutoPostBackOnFilter="true" CurrentFilterFunction="Contains" ShowFilterIcon="false"> <ItemStyle HorizontalAlign="Right" /> </telerik:GridBoundColumn> <telerik:GridMaskedColumn DataField="UniqueID" HeaderText="UniqueID" FilterControlWidth="110px" AutoPostBackOnFilter="false" CurrentFilterFunction="EqualTo" FilterDelay="1000" ShowFilterIcon="false"> </telerik:GridMaskedColumn> <telerik:GridBoundColumn FilterControlWidth="70px" DataField="Lot" HeaderText="Lot" AutoPostBackOnFilter="true" CurrentFilterFunction="Contains" ShowFilterIcon="false"> <ItemStyle HorizontalAlign="Right" /> </telerik:GridBoundColumn> <telerik:GridBoundColumn FilterControlWidth="95px" DataField="LogDateTime" HeaderText="LogDateTime" ShowFilterIcon="false" AllowFiltering="False"> <ItemStyle HorizontalAlign="Right" /> </telerik:GridBoundColumn> <telerik:GridMaskedColumn DataField="ProductID " HeaderText="ProductID " FilterControlWidth="50px" AutoPostBackOnFilter="false" CurrentFilterFunction="EqualTo" FilterDelay="2000" ShowFilterIcon="false"> <ItemStyle HorizontalAlign="Right" /> </telerik:GridMaskedColumn> <telerik:GridBoundColumn FilterControlWidth="310px" DataField="Product" HeaderText="Product" AutoPostBackOnFilter="true" CurrentFilterFunction="Contains" ShowFilterIcon="false"> </telerik:GridBoundColumn> <telerik:GridButtonColumn ButtonType="PushButton" CommandName="DeleteItem" Text="DeleteItem" UniqueName="DeleteItem" HeaderText="DeleteItem"> </telerik:GridButtonColumn> <telerik:GridButtonColumn ButtonType="PushButton" CommandName="VerifyItem" Text="VerifyItem" UniqueName="VerifyItem" HeaderText="VerifyItem" > </telerik:GridButtonColumn> </Columns> <HeaderStyle Font-Bold="True" /> </MasterTableView> <ExportSettings> <Pdf PageWidth=""> </Pdf> </ExportSettings> <ClientSettings EnableRowHoverStyle="true" AllowDragToGroup="True"> <Selecting AllowRowSelect="True" /> </ClientSettings> <GroupingSettings CollapseAllTooltip="Collapse all groups" /> <SortingSettings SortedBackColor="#FFF6D6" EnableSkinSortStyles="false" /> <HeaderStyle Width="100px" /> <FilterMenu RenderMode="Lightweight" /> <HeaderContextMenu RenderMode="Lightweight" /> </telerik:RadGrid> </telerik:RadAjaxPanel> </div> </form></body></html>
aspx.cs code:
public partial class WebForm1 : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { StartDateTimePicker.SelectedDate = DateTime.Now.AddDays(-14); EndDateTimePicker.SelectedDate = DateTime.Now; LoadDataForRadGrid1(); } } private void LoadDataForRadGrid1() { RadGrid2.DataSource = GetDataTable(StartDateTimePicker.FocusedDate, EndDateTimePicker.FocusedDate); RadGrid2.DataBind(); } public DataTable GetDataTable(DateTime startDateTime, DateTime endDateTime) { string query = @"select * from [dbo].[ufGetList]()"; String connectionString = ConfigurationManager.ConnectionStrings["ProjectConnectionString"].ConnectionString; DataTable myDataTable = new DataTable(); using (SqlConnection conn = new SqlConnection(connectionString)) { SqlCommand cmd = new SqlCommand(query, conn); conn.Open(); SqlDataAdapter adapter = new SqlDataAdapter { SelectCommand = new SqlCommand(query, conn) }; adapter.Fill(myDataTable); conn.Close(); } return myDataTable; } protected void RadGrid1_ItemCommand(object sender, GridCommandEventArgs e) { if (e.CommandName == "DeleteItem") { } } protected void RadGrid2_NeedDataSource(object sender, Telerik.Web.UI.GridNeedDataSourceEventArgs e) { (sender as RadGrid).DataSource = GetDataTable(StartDateTimePicker.SelectedDate.Value, EndDateTimePicker.SelectedDate.Value); } }
Thanks.
Hello,
we are using a RadEditor to save from content dynamically inserted into web pages.
Recently, some html tags inserted into the Html window of the RadEditor have started to be stripped (was working before). I have tried all options suggested around, and I finally found where the problem is coming from.
We upgraded our version of Word. Word now seems to have switched to html content, so some html code (<iframe> code) is now stripped away from the text.
This happens during the javascript call to OnClientSubmit :
function OnClientSubmit(editor) {
alert(editor.get_html()); // code is here
editor.fire("FormatStripper", { value: "WORD" });
alert(editor.get_html()); // code is not here anymore
}
The code typed in the editor is this :
<b>Before Iframe</b>
<iframe src="http://alpedhuez.roundshot.com/3060/" scrolling="no" seamless="" webkitallowfullscreen="" mozallowfullscreen="" allowfullscreen="" width="640" height="360" frameborder="0"></iframe>
<b>After Iframe</b>
The first javascript alert gives this :
<b>Before Iframe</b>
<iframe src="http://alpedhuez.roundshot.com/3060/" scrolling="no" seamless="" webkitallowfullscreen="" mozallowfullscreen="" allowfullscreen="" width="640" height="360" frameborder="0"></iframe>
<b>After Iframe</b><br class="t-last-br">
The second alert, after the FormatStripped, gives this :
<b>Before Iframe</b>
<b>After Iframe</b><br class="t-last-br">
Is there a way so that the stripped does not remove html tags, and only REAL Word formating ?
I tried several FormatStripped options without success.
We cannot switch back to old Word versions, the editing window is used by several of our customers and we do not have control over their Word version.
Do you have any solution to make the stripper work properly (because I don't think the way it is working now is normal).
Regards and thanks
Eric
Hi All,
I have the following requirement, and looking for some help to see if possible to achieve.
I have an Hierarchy Grid (Declartive Hierarchy).
We need, when the user click add new record on the parent it need to open a row on the parent and child simultaneously (and make the relation between the parent and child).
Moreover we need to be able to add more rows on the child grid (DetailTable) and keep them all open for edit (including the parent grid).
Is it possible to that?
Hello,
I have a radeditor on my page and I am utilizing the image upload feature. Works fine and speedy when running local, but when I run off of our production server, I can select an image to upload from the image manager that pops up from the rad editor.
I select my image, and then the image name is on the Upload control, but has a Yellow circle to the left of the image name (see attached). There appears to be a progress bar (thin line under the image name) that goes to the end, yet the system just hangs there. Only think I can do is to cancel out of the upload.
Any ideas why this would hang?
Thank you - Lynn

I have defined a RadGrid code behind completely only using a PlaceHolder in the aspx file that adds the myRadGrid objects. I Also definde the event handlers for "NeedDataSource" and "DetailTableDataBind":
myRadGrid.NeedDataSource += new GridNeedDataSourceEventHandler(needDataSource);
myRadGrid.DetailTableDataBind += new GridDetailTableDataBindEventHandler(detailTableDataBind);
I also want to define the event handler for PreRender, however, I cannot find the appropriate initialisation class handler to set myRadGrid.PreRender += ...?
I suppose it must be something like GridPRerenderEventHandler(...) but I do not find it in the RadGrid.. !?!?!?!?
Any help is appreciated.
Many Thanks!

Is there a way to connect shapes to connectors, rather than simply shapes to shapes? I have a requirement that needs a shape to connect to the mid-point of a connector between two shapes. I've tried a work around having 2 connectors from the same point on one shape without any success.
Attached is a rough idea of what I want to do, so want to connect the vertical line from the horizontal connector to the bottom shape.
Any suggestions gratefully received! Thanks.

Use Case: Client has 3D files and Video Files.
1. Is uploading 900 GB (Yes GB) file possible with this, AsyncUpload control?
2. In case of such a large file, what would happen to the server resources - does it directly write to the IO stream or keeps the file in memory?