<TELERIK:RADEDITOR stripformattingoptions="NoneSupressCleanMessage, Span" id="FTBGoal" visible="true" enabled="true" editmodes="Design" height="140px" width="650px" toolsfile="~/App_Themes/RadEditorTools.xml" dialoghandlerurl="Telerik.Web.UI.DialogHandler.axd" spellchecksettings-ajaxurl="Telerik.Web.UI.SpellCheckHandler.axd" runat="server" bordercolor="#333333" borderstyle="Solid" borderwidth="1px" spellchecksettings-spellcheckprovider="PhoneticProvider"> <CSSFILES> <TELERIK:EDITORCSSFILE value="~/App_Themes/RadEditor.css" /> </CSSFILES> </TELERIK:RADEDITOR> <TELERIK:RADSPELL id="RadSpell1" runat="server" buttontype="none" /> <script type="text/javascript"> function check(b) { Telerik.Web.UI.Editor.CommandList.SpellCheck = function(commandName, editor) { var spell = GetRadSpell('<%= RadSpell1.ClientID %>'); spell.spellCheck(new PrometheusTextSource(editor)); return false; } var PrometheusTextSource = function(editor) { this._editor = editor; this.get_text = function() { return this._editor.get_html(); }; this.set_text = function(value) { this._editor.set_html(value); }; } }</script>I have a dashboard web application. It contains some controls on it which are sized based on the browser and are also resizeable by the user. They are dynamically created and, as such, I persist their dimensions through page postbacks by storing their state in Session and in a database.
When my dashboard first loads there is a chance that I am pulling data out of the Database onto a monitor which is not the same size as when the data was written to the Database. The controls need to be resized proportional to how they were before. Fortunately, it appears that the controls are able to resize themselves to the correct, proportional dimensions if they believe they need to re-calculate their dimensions.
As such, on first page load, I would like to simulate the browser resizing. Is it possible to do something like this in javascript?
protected void Page_Load(object sender, EventArgs e){ RegenerationManager.Instance.RegenerateDockContents(); //Reload controls once to have them auto-detect browser settings. if (!IsPostBack) ScriptManager.RegisterStartupScript(Page, Page.GetType(), "KEY01", "ForceResize();", true);}function ForceResize() { setTimeout(function () { window.onresize = function () { alert('Thanks, its resized!!'); }; $(window).resize(); }, 100);}
protected void RadGrid1_InsertCommand(object sender, GridCommandEventArgs e)
{
//insert something here
}
after inserting, the grid stays within the edit mode. Please let me know of the setting to exit and refresh the grid....also to refresh the grid after deletion.
thanks,
Minh Bui
<telerik:RadGrid ID="RadGrid1" runat="server" EnableAJAX="True" GridLines="None" OnNeedDataSource="RadGrid1_NeedDataSource" OnItemCreated="RadGrid1_ItemCreated" OnItemCommand="RadGrid1_ItemCommand" AllowPaging="False" AllowSorting="True" BorderColor="Gray" BorderWidth="1px" Width="700px" PageSize="5" OnItemDataBound="RadGrid1_ItemDataBound" ShowStatusBar="True" Title="Report Queue" GroupingEnabled="False" AllowMultiRowSelection="True" AutoGenerateColumns="False" AllowMultiRowEdit="True" Skin="WebBlue"> <MasterTableView CommandItemDisplay="Top"> <RowIndicatorColumn Visible="False"> <HeaderStyle Width="20px"/> </RowIndicatorColumn> <ExpandCollapseColumn Visible="False"> <HeaderStyle Width="19px" /> </ExpandCollapseColumn> <CommandItemSettings AddNewRecordText="" RefreshImageUrl="../RadControls/Refresh_new.gif" /> <Columns> <telerik:GridButtonColumn HeaderText="Cancel ?" UniqueName="KillProcesses" AutoPostBackOnFilter="True" Text="Cancel" ButtonType="PushButton" CommandName="remove"> </telerik:GridButtonColumn> <telerik:GridBoundColumn UniqueName="JobID" DataField="JobID" HeaderText="Job Id"> </telerik:GridBoundColumn> <telerik:GridBoundColumn UniqueName="SubmittedBy" DataField="SubmittedBy" HeaderText="Submitted By"> </telerik:GridBoundColumn> <telerik:GridBoundColumn UniqueName="TimeSubmitted" DataField="TimeSubmitted" HeaderText="Time Submitted"> </telerik:GridBoundColumn> <telerik:GridBoundColumn UniqueName="JobStatus" DataField="JobStatus" HeaderText="Job Status"> </telerik:GridBoundColumn> <telerik:GridBoundColumn UniqueName="ReportName" DataField="ReportName" HeaderText="Report"> </telerik:GridBoundColumn> </Columns> </MasterTableView> <ClientSettings > <Selecting AllowRowSelect="True" AllowCellSelect="True" AllowColumnSelect="True" /> <Scrolling AllowScroll="True" UseStaticHeaders="True" SaveScrollPosition="True"/> </ClientSettings> <SelectedItemStyle BackColor="#00C0C0" /> </telerik:RadGrid><script language="javascript"> function SessionTimeoutOnShowing(sender, args) { } function ContinueSession() { var notification = $find("rnSessionTimeout"); notification.update(); notification.hide(); }</script> <telerik:RadNotification ID="rnSessionTimeout" runat="server" Position="Center" Width="300" Height="125" LoadContentOn="PageLoad" AutoCloseDelay="10000" ShowInterval="15000" Title="Session Expiration" Value="~/" TitleIcon="Warning" OnClientShowing="SessionTimeoutOnShowing" ContentIcon="Warning" Skin="Default" EnableRoundedCorners="true"> <ContentTemplate> Your session is about to expire. Do you wish to continue using this site?<br /> <telerik:RadButton Skin="Default" ID="continueSession" runat="server" Text="Continue Your Session" Style="margin-top: 10px;" OnClientClick="ContinueSession(); return false;" /> </ContentTemplate> </telerik:RadNotification>