or
TreeListEditCommandColumn , from that i can able to hide the plus button in the parent node. or i can set the visible true/false.
<telerik:RadTreeList ID="treeListClientBudget" runat="server" OnNeedDataSource="treeListClientBudget_NeedDataSource" Visible="false" HideExpandCollapseButtonIfNoChildren="true" DataKeyNames="DataKey" Height="200px" OnChildItemsDataBind="treeListClientBudget_ChildItemsDataBind" OnItemDataBound="treeListClientBudget_ItemDataBound" ParentDataKeyNames="ParentKey" AutoGenerateColumns="false" AllowLoadOnDemand="true" EditMode="InPlace" OnUpdateCommand="treeListClientBudget_UpdateCommand" OnInsertCommand="treeListClientBudget_InsertCommand" OnCancelCommand="treeListClientBudget_CancelCommand" OnEditCommand="treeListClientBudget_EditCommand"> <ClientSettings Selecting-AllowItemSelection="true" Scrolling-AllowScroll="true" Scrolling-UseStaticHeaders="true" > <Selecting AllowToggleSelection="true"/> </ClientSettings> <Columns> <telerik:TreeListEditCommandColumn UniqueName="InsertCommandColumn" ShowAddButton="false" ButtonType="ImageButton" ShowEditButton="false" HeaderStyle-Width="30px" ItemStyle-HorizontalAlign="Center"> <HeaderStyle Width="60px" /> <ItemStyle Width="60px" /> </telerik:TreeListEditCommandColumn> <telerik:TreeListButtonColumn CommandName="Edit" Text="Edit" UniqueName="EditCommandColumn" ButtonType="ImageButton" HeaderStyle-Width="30px" ItemStyle-HorizontalAlign="Center"> </telerik:TreeListButtonColumn> <telerik:TreeListButtonColumn UniqueName="DeleteCommandColumn" Text="Delete" CommandName="Delete" ButtonType="ImageButton" HeaderStyle-Width="30px"></telerik:TreeListButtonColumn> <telerik:TreeListBoundColumn DataField="DisplayName" UniqueName="DisplayName" ReadOnly="true" HeaderText="Month/Classification"> </telerik:RadTreeList>please refer the code for Codebehind .CS
protected void treeListClientBudget_ItemDataBound(object sender, TreeListItemDataBoundEventArgs e) { if (e.Item is TreeListDataItem) { TreeListDataItem item = e.Item as TreeListDataItem; //hdnClassificationId.Value = Convert.ToString(item.GetDataKeyValue("DataKey")); switch (item.HierarchyIndex.NestedLevel) { case 0: item.BackColor = System.Drawing.Color.LightYellow; break; case 1: item.BackColor = System.Drawing.Color.YellowGreen; ImageButton treelist = item["TreeListEditCommandColumn"].FindControl("InsertCommandColumn") as ImageButton; //treelist.ShowAddButton = true; // hdnClassificationId.Value =Convert.ToString( item.GetDataKeyValue("DataKey")); break; case 2: item.BackColor = System.Drawing.Color.LightPink; item["InsertCommandColumn"].Visible = true; break; } } }GridEditCommandColumn
but can not figure out the correct syntax.<httpRuntime encoderType="Microsoft.Security.Application.AntiXssEncoder, AntiXssLibrary" />
private void FillChart(IEnumerable<EntitySearchResponse> data) { SentimentChart.ChartTitle.Text = "Sentemants Per day"; SentimentChart.PlotArea.YAxis.TitleAppearance.Text = "Sentimants %"; SentimentChart.PlotArea.XAxis.LabelsAppearance.RotationAngle = 90; SentimentChart.PlotArea.XAxis.Step = 10; SentimentChart.PlotArea.XAxis.Items.Clear(); foreach (var date in data.Select(x => x.Date).Distinct()) { var axisItem = new AxisItem(date.ToString("ddd dd")); SentimentChart.PlotArea.XAxis.Items.Add(axisItem); } SentimentChart.DataSource = data; SentimentChart.PlotArea.Series.Clear(); foreach (var entityName in data.Select(x => x.EntityName).Distinct()) { var series = new ColumnSeries(); series.LabelsAppearance.DataFormatString = "{0} items"; series.TooltipsAppearance.DataFormatString = "{0} {2} items"; series.Name = entityName; var items = data.Where(x => x.EntityName == entityName).ToList(); foreach (var entitySearchResponse in items) { var seriesItem = new SeriesItem(entitySearchResponse.Sentiment); seriesItem.TooltipValue = string.Format("{0} Sentiment - {1} Volume", entitySearchResponse.Sentiment, entitySearchResponse.Volume); series.Items.Add(seriesItem); } SentimentChart.PlotArea.Series.Add(series); } }