Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
160 views
Hi,
How to access the TreeListEditCommandColumn in the code behind. I was trying to access from code behind, but i could not able to acess.
Please help me out.Please refer the below code for your reference.

If i can acces the

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;
            }
        }
    }
Andrey
Telerik team
 answered on 07 Jun 2013
4 answers
247 views
So I would like to create a Grid with a Grid template column that contains a radiobutton and a textbox. On the click of the radiobutton, i want the textbox to appear to the right of the grid. Any help on starting this would be greatly appreciated.
Princy
Top achievements
Rank 2
 answered on 07 Jun 2013
2 answers
284 views
Hi guys. I have implemented a RadGrid with Edit and Insert Mode and filter capabilities.

When filtering the RadGrid while in edit mode, the edited row seems to be based on the row number, eg, when I'm editing row number 3, and while editing, the grid is filtered, the edited row remains at row number 3 even though the row of the record I'm currently editing may have changed.

For Example, if I'm doing auto CRUD on this table with in place editing

[id] [code]
-----------------------
[01] codeX
[02] codeY
[03] codeY

and the row being edited is the 2nd one ([02] codeY)

if a filter (using the RadGrid default filter) is done on Code "EqualTo" 'codeY' such that the result becomes

[id] [code]
-----------------------
[02] codeY
[03] codeY

the edited row is still the 2nd one ([03] codeY) even though the row originally being edited is ([02] codeY)

Is this the expected behaviour, or is there are way to instruct the RadGrid to look for the record to set the edit mode on that particular record again? If not, is there a way to automatically cancel edit mode/insert mode just before filtering? Or to disable all filtering controls while user is in edit/insert mode? Thanks for reading.
Joey
Top achievements
Rank 1
 answered on 07 Jun 2013
1 answer
66 views
Hi I have to create a grid dynamically.  I can do most of it in vb code behind but I also need an edit column?  What is the syntax for this creation?

        boundColumn = New GridBoundColumn()
        dgCompDetails.MasterTableView.Columns.Add(boundColumn)
        boundColumn.DataField = "ippComponentSrcValue"
        boundColumn.UniqueName = "dgippComponentSrcValue"
        boundColumn.Display = True
        boundColumn.HeaderText = "Value"

I need the next column to be a

GridEditCommandColumn

but can not figure out the correct syntax.

Thanks.

Shinu
Top achievements
Rank 2
 answered on 07 Jun 2013
4 answers
216 views
I had a hard time figuring out DatePicker's MonthView CSS is broken when using AntiXssEncoder library in the project. It somehow prevents MonthView to render properly. Is there a way to fix MonthView in DatePicker when using with AntiXssEncoder? May be manually adding some css lines and fixind the view?
Robert
Top achievements
Rank 1
 answered on 06 Jun 2013
1 answer
255 views
I'm using Telerik ASP.NET AJAX controls (ver. 2010.2.929.40).  When I use the AntiXssEncoder as the default encoder...

    <httpRuntime encoderType="Microsoft.Security.Application.AntiXssEncoder, AntiXssLibrary" />

The links on the radtabstrip controls in our application get rendered with %23 instead of # as the hyperlink....

i.e.
With AntiXssLibrary

<a class="rtsLink rtsAfter" href="%23"> 

Instead of without the AntiXssLibrary...

<a class="rtsLink rtsAfter" href="#">

Clicking on the first link results in a 404 error page.

Is there a solution for this problem? 
Robert
Top achievements
Rank 1
 answered on 06 Jun 2013
7 answers
393 views
How do we change the case sensitivity for the CAPTCHA when using the SendMail SocialNetType? When presented to end-users, there is no notification about case sensitivity and they could potentially get frustrated because the CAPTCHA error returns "Please, reenter the code in the captcha", even though the code IS entered in correctly, but in lowercase.
moegal
Top achievements
Rank 1
 answered on 06 Jun 2013
4 answers
274 views
Like the title describes, I'd like to prevent the "select all" checkbox within the header of the GridClientSelectColumn from firing or being selected automatically when all rows in the grid (current page) have been selected manually by the user (I believe it did not automatically select the header checkbox in some older versions).  The reason is that we are treating this header checkbox a little differently and when the user specifically checks this "select all" checkbox, it will check all rows of the current page AND we will check for it behind the scenes to select all items that have been returned for this specific query - but we also want the user to be able to select just those items on the current page if they wish without having this header checbox become checked.

I hope that makes sense and I appreciate the help!
Chau
Top achievements
Rank 1
 answered on 06 Jun 2013
3 answers
242 views
I have following chart I want to set two things using C#
  1. How can I set x-axis legends below chart not below axis since it overlaping lines?
  2. I am setting tooltip is not appearing like this "{0} Sentiment - {1} Volume"?

Chart Preview

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);
      }
 
  }

Danail Vasilev
Telerik team
 answered on 06 Jun 2013
1 answer
93 views
I have a chart control, and have the done print functionality by implementing the code from the telerik site. Also I have some labes on x and y axes. This labes are added from the codebehind file. When printing I am able to print the chart, but somehow the labels do not appear on the print. I want the labes also in the print

Can someone help me to bring the labes while printing?
Petar Kirov
Telerik team
 answered on 06 Jun 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?