Private Sub DataGrid_ItemDataBound(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridItemEventArgs) Handles DataGrid.ItemDataBound If TypeOf e.Item Is GridFooterItem Then Dim footerItem As GridFooterItem = DirectCast(e.Item, GridFooterItem) Dim strUSD As Decimal = footerItem("BalanceUSD").Text Dim strLBP As Decimal = footerItem("BalanceLBP").Text Dim LBPvalue As Decimal = strLBP * 1507.5 Dim totalvalue As Decimal = strUSD + LBPvalue 'MsgBox(totalvalue) End If End SubHow do i handle when no data is in the grid?
Regards,
Mike


I have a control I that contains a DockLayout.
In the OnInit method of this control, I call a method to create a Dock and then populate it. Once that's done, this gets called...
void InitializeDock(RadDock DockToInitialize, DockState LoadedState) { DockToInitialize.ID = string.Format("Dock{0}", LoadedState.UniqueName); GetLayoutControl().Controls.Add(DockToInitialize); if (!IsPostBack) { GetAjaxifiedPanel().Controls.Add(DockToInitialize); } if (String.IsNullOrEmpty(LoadedState.DockZoneID)) { RadDockZone dz = (RadDockZone)FindControl("RadDockZone2"); if (dz != null) { LoadedState.DockZoneID = dz.ClientID; } } DockToInitialize.ApplyState(LoadedState); }All good so far.
At some point in the cycle, OnSaveDockLayout gets called. Even though the object that I'm using to create and populate the layout knows about my Dock, and I can see it in the appropriate DockZone, GetResgisteredDocksState() always returns an empty List<DockStates>.
I thought it might me something to do with the call to ApplyState() so I just created the Dock and calleddock.Dock(dockZone) on it and still got the empty list when OnSaveDockLayout was called.
What process is it that causes the source used by OnSaveDockLayout to be populated?
--
Stuart
<form id="Form1" method="post" runat="server"> <div> <radE:RadEditor id="RadEditor1" editable="true" Runat="server"></radE:RadEditor> </div> <script language="javascript"> function GetReference1() { var editor = GetRadEditor("<%=RadEditor1.ClientID%>"); alert(editor.Id); //returns RadEditor Client ID } </script> <input type="button" value="Get Ref1" onclick="GetReference1()"> </form>protected override void Render(HtmlTextWriter writer) { base.Render(writer); writer.WriteBeginTag("script"); writer.WriteAttribute("type", "text/javascript"); writer.Write(HtmlTextWriter.TagRightChar); writer.WriteLine("var HtmlEditor = " + RadEditor1.ClientID + ";"); writer.WriteLine("alert(HtmlEditor)"); writer.WriteEndTag("script"); }
If you click the justify (left, center, right, justify) buttons in the RadEditor in Mozilla Firefox 9 when you have text highlighted, nothing happens.
Example: I checked Google Chrome and it works fine when I click the "center" justify button after inspecting the element.
element.style {
text-align: center;
}

Me.re_html.DisableFilter(Telerik.Web.UI.EditorFilters.RemoveScripts)