Catalogue2
Catalogue3
I want to delete the middel node "Catalogue2" then node 3 "Catalogue3" must move 1 up so the tree just have 2 nodes
Catalogue3
How do i do this when treeview is populated from sql
<asp:Button ID="ButtonAddNew" Text="Open RadWindow" runat="server" CausesValidation="false" OnClick="ButtonAddNew_Click" /> <telerik:RadWindowManager ID="RadWindowManager01" Modal="true" runat="server"> <Windows> </Windows></telerik:RadWindowManager> <telerik:RadWindow ID="RadWindowImageEdit" InitialBehaviors="Pin" Skin="Sitefinity" Width="920" AutoSize="true" AutoSizeBehaviors="Height" EnableEmbeddedSkins="false" EnableEmbeddedBasestylesheet="false" Behaviors= "Close" VisibleTitlebar="true" VisibleStatusbar="false" KeepInScreenBounds="true" EnableShadow="false" VisibleOnPageLoad = "False" Modal="true" runat="server"> <ContentTemplate> <div style="width: 867px; padding: 10px;"> <telerik:RadAjaxPanel ID="RadAjaxPanel2" runat="server"> <asp:Panel ID="panel01" runat="server"> <!--Form part 1 content here --> <asp:Button ID="ButtonNext01" Text="Button1" ValidationGroup="vgText" CausesValidation="True" runat="server" OnClick="OnClick_ButtonNext01" /> </asp:Panel> <asp:Panel ID="panel02" runat="server"> <!--Form part 2 content here --> <asp:Button ID="Buttonback02" ValidationGroup="vgText" Text="Button2" CausesValidation="True" runat="server" OnClick="OnClick_Buttonback02" /> </asp:Panel> </telerik:RadAjaxPanel> </div> </ContentTemplate></telerik:RadWindow>
| Protected Sub RadGrid1_ItemDataBound(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridItemEventArgs) Handles RadGrid1.ItemDataBound |
| 'Is it a GridDataItem |
| If (TypeOf (e.Item) Is GridDataItem) Then |
| 'Get the instance of the right type |
| Dim dataBoundItem As GridDataItem = e.Item |
| Dim a As New ArrayList |
| a.Add("M9_Sep") |
| a.Add("M10_Oct") |
| a.Add("M11_Nov") |
| a.Add("M12_Dec") |
| a.Add("M1_Jan") |
| a.Add("M2_Feb") |
| a.Add("M3_Mar") |
| a.Add("M4_Apr") |
| a.Add("M5_May") |
| For i As Integer = 0 To 8 |
| Dim s As Integer = 0 |
| Integer.TryParse(dataBoundItem(a(i)).Text, s) |
| Select Case s |
| Case Is > 120 |
| dataBoundItem(a(i)).BackColor = Drawing.Color.Red |
| Case 90 To 120 |
| dataBoundItem(a(i)).BackColor = Drawing.Color.Green |
| Case 60 To 89 |
| dataBoundItem(a(i)).BackColor = Drawing.Color.Yellow |
| Case Is < 60 |
| dataBoundItem(a(i)).BackColor = Drawing.Color.Purple |
| End Select |
| Next |
| End If |
public override void InstantiateIn(Control container) { Label lbl = new Label(); lbl.DataBinding += label_DataBinding; container.Controls.Add(lbl); } void label_DataBinding(object sender, System.EventArgs e) { Label lbl = (Label)sender; GridDataItem dataItem = lbl.NamingContainer as GridDataItem; DataRowView drv = (DataRowView)dataItem.DataItem; RefItem item = Item.refdef.ItemsFlat.Find(m => m.Id == drv[Item.user_name].ToGuid()); if (item == null) { lbl.Text = ""; return; } lbl.Text = item.Caption; }
protected void RadGridImages_NeedDataSource(object source, Telerik.Web.UI.GridNeedDataSourceEventArgs e) { List<Business.Logic.BusinessObjects.ArtistImage> lst = new List<Business.Logic.BusinessObjects.ArtistImage>(); int aid = -1; bool isOK = int.TryParse(this.HiddenArtistID.Value, out aid); if (isOK) { lst = artistImageManager.Get(aid); if (lst != null) { this.RadGridImages.DataSource = lst; } else { if (this.RadGridImages.DataSourceID == "") { this.RadGridImages.DataSource = new string[] { }; } } } if (!string.IsNullOrEmpty(gridMessage)) { DisplayMessage(gridMessage); } } private void DisplayMessage(string text) { RadGridImages.Controls.Add(new LiteralControl(string.Format("<span style='color:red'>{0}</span>", text))); }
Hi,
With the help of the posts in http://www.telerik.com/community/forums/aspnet/grid/72051-radgrid-print.aspx#1532370 I could print the entire contents of radgrid in Internet Explorer and mozilla .But I am not able to print the radgrid of certain web pages of the application in same version of mozilla while able to do that in internet explorer.For those pages, the below function PrintRadGrid returns null for $find(radGridId).
For the non-working pages , if i put a alert as the first line of the function PrintRadGrid , then it is working
Could any body please explain why this happens and how to make it working ...
function getOuterHTML(obj) {
if (typeof (obj.outerHTML) == "undefined") {
var divWrapper = document.createElement("div");
var copyOb = obj.cloneNode(true);
divWrapper.appendChild(copyOb);
return divWrapper.innerHTML
}
else
return obj.outerHTML;
}
function PrintRadGrid(radGridId) {
var radGrid = $find(radGridId);
var previewWnd = window.open('about:blank', '', '', false);
var sh = '<%# ClientScript.GetWebResourceUrl(grdName.GetType(),String.Format("Telerik.Web.UI.Skins.{0}.Grid.{0}.css",grdName.Skin)) %>';
var styleStr = "<html><head><link href = '" + sh + "' rel='stylesheet' type='text/css'></link></head>";
var htmlcontent = styleStr + "<body>" + getOuterHTML(radGrid.get_element().parentNode) + "</body></html>";
previewWnd.document.open();
previewWnd.document.write(htmlcontent);
previewWnd.document.close();
previewWnd.print();
previewWnd.close();
radGrid.get_masterTableView().fireCommand("EnablePaging", "");
}
And in code behind
RadPnl.ResponseScripts.Add("PrintRadGrid('" + grdNmae.ClientID + "')");
Thanks