<telerik:RadComboBox ID="salesInput" runat="server" Width="200px" MarkFirstMatch="true"></telerik:RadComboBox> Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load If (Not Page.IsPostBack) Then 'populate the dropdown Dim tableOfData As DataTable = MyFunctions.createCrewDeleteTable() salesInput.DataSource = tableOfData salesInput.DataTextField = "Salesman" salesInput.DataValueField = "CrewId" salesInput.DataBind() End IfEnd Sub 'this function gets the data for the crew dropdown 'this sub returns a data table to bind to the dropdown Public Shared Function createCrewDeleteTable() 'a new data table Dim table As DataTable = New DataTable() table.Columns.Add("Salesman") table.Columns.Add("CrewId") Dim type 'my sql connection Dim myConn As New Data.SqlClient.SqlConnection(System.Configuration.ConfigurationManager.ConnectionStrings("connection").ToString) 'the name of the stored procedure Dim strSQL = "select FirstName+' '+LastName as Name, CrewType, CrewId from Crew where Deleted <> 'yes' " & _ "AND crewid > 1 order by LastName, Firstname" Try myConn.Open() Dim readCommand As New Data.SqlClient.SqlCommand(strSQL, myConn) 'while we have rows from the stored procedure 'we will add them to a data table Dim cdr As SqlDataReader = readCommand.ExecuteReader() While cdr.Read() If (cdr(1).ToString = "3") Then type = "Salesman" ElseIf cdr(1).ToString = "2" Then type = "Crew Chief" Else type = "Crew" End If 'if cdr(2) If (cdr.Item(0).ToString <> "") Then table.Rows.Add(New String() {cdr.Item(0) & " - " & type, cdr.Item(1)}) End If End While 'while cdr.Read() Catch ex As Exception End Try myConn.Dispose() Return tableEnd Function<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