Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
185 views
I have specific folder names for each users, like, 1, 2, 3, 4, etc. I need to make this My Documents. Is it possible to just change it's directory name?
Ianko
Telerik team
 answered on 17 Sep 2013
22 answers
442 views
There is a stackoverflow question which hilights the exact issue im having problems with:
http://stackoverflow.com/questions/17486458/telerik-mastertableview-filterexpression-always-out-of-date#

Where I have a custom grid, and whenever I am doing a rebind I want to get the FilterExpression and pass it to my underlying linq queryable to add the filters to the existing query. However whenever I get the FilterExpression from the grid it is always displaying the previous filter state, not the most recent one.

If you read the scenarios in the stackoverflow post it hilights the exact scenarios in which this occurs, so is there any way round this issue, or to force the FilterExpression to be updated for use?
Kostadin
Telerik team
 answered on 17 Sep 2013
1 answer
215 views
Hi,

I'm having an issue that i spent all day yesterday trying to resolve. I'm hopeful that you can help me. I'm using rad grid and javascript as my data source. My first column which is a combo box wont let me bind. In the rad combo box settings if I set allowcustomtext="false" it will bind but the first item in the grid is automatically selected so that's not what I want. I'd like to have allowcustomtext="true" to give the user the option to enter an item or select an item but when I set allowcustomtext="true" it does not bind. I've attached 2 screen shots. first which allowcustom text false and the other allow custom text true and you can see the difference.
<telerik:GridTemplateColumn DataField="Item" UniqueName="Item">
                   <ItemStyle />
                   <ItemTemplate>
                     <telerik:RadComboBox ID="ddlItems" runat="server" AutoPostBack="false"
                           DataSourceID="objItems" DataTextField="Items" DataValueField="Items"
                           Skin="Silk"  OnClientDropDownOpening="DropDownOpening"
                           OnClientSelectedIndexChanged="ItemValueChanged" EnableViewState="true"
                           AllowCustomText="false"   Width="150px" Height="150px"
                           ondatabound="ddlItems_DataBound" OnItemsRequested="ddlItems_Requested" CssClass="SelectedItem"
                           FocusedStyle-BackColor="#fff6dc" Text='<%# Eval("Item") %>'>
                   </ItemTemplate>
               </telerik:GridTemplateColumn>
thanks,
Ron.
Radoslav
Telerik team
 answered on 17 Sep 2013
9 answers
496 views
Hi all, so my problem is, because i havea full auto grid,i cant be manual:

 - How to use the delete option on the radgrid, ans make it call a prompt window.

Best Regards and Thanks
Eyup
Telerik team
 answered on 17 Sep 2013
1 answer
154 views
Hello,

I was wondering if there's any way to change (or remove) the RadMenu's animation from the client-side?

Background/more info (optional reading):
I'm setting up a 'page tour' and I'm having trouble positioning elements near menu items. I can get the right RadMenu and RadMenuItem client objects and even tell the parent RadMenuItem to open but when I try to position a div relative to a menu item it displays up the top of the menu. I assume this is because it is basing the position on the menu item's position before the animation takes place. It works fine if I set the ExpandAnimation-Type to "None" but I'd like to have an animation and only disable it when the user is going through the 'page tour'.

Thanks,
Pete
Pete
Top achievements
Rank 1
 answered on 17 Sep 2013
1 answer
88 views

 We had RadControls for ASP.NET AJAX 2010 verstion when this app was first created. ASPX file has a simple RadGrid in it and everything worked fine. 
Beginning this year we found out RadGrid in my App is not working with IE10. Telerik suggested us to upgrade to 2013 version.Then we did upgrade.
Now we are haveing the latest version of RadControls (2013 Q2). The .net framework is 3.5. I copied all dll files from C:\Program Files\Telerik\RadControls for ASP.NET AJAX Q2 2013\Bin35
to my own project bin folder and added reference again.

The problem is that RadGrid is getting worse it does not even work for IE8 anymore.
When<telerik:GridButtonColumn ButtonType="LinkButton" DataTextField="type" UniqueName="type" CommandName="OnType"  ></telerik:GridButtonColumn> is clicked
dataItem["document"].Text  keeps on getting a vaule of "&nbsp;".

Below are my ASPX file and code behind it.
  
Thank you for your help.



****ASPX file:***********


<
telerik:RadScriptManager runat="server" ID="RadScriptManager2" />
                        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
                            <AjaxSettings>
                                <telerik:AjaxSetting AjaxControlID="dgDocuments">
                                    <UpdatedControls>
                                        <telerik:AjaxUpdatedControl ControlID="dgDocuments" LoadingPanelID="RadAjaxLoadingPanel1" />
                                    </UpdatedControls>
                                </telerik:AjaxSetting>
                            </AjaxSettings>
                        </telerik:RadAjaxManager>
                        <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" />  
             <telerik:RadGrid runat="server" ID="dgDocuments" AllowPaging="True"  Width="60%" 
                   AllowSorting="False" GridLines="None"
                 Skin="Simple" AutoGenerateColumns="False"  PageSize="200" 
                 ShowStatusBar="true" OnItemCommand="dgDocuments_ItemCommand" 
                 onneeddatasource="dgDocuments_NeedDataSource" 
                 oncolumncreated="dgDocuments_ColumnCreated" 
                 onitemcreated="dgDocuments_ItemCreated" >
            <GroupHeaderItemStyle Font-Bold = "true"    /> 
            <GroupingSettings CaseSensitive="false" />
            <ClientSettings AllowGroupExpandCollapse="True" >
            </ClientSettings>
             <MasterTableView   GroupsDefaultExpanded="true" ItemStyle-Wrap="false" 
                  HeaderStyle-Wrap="false"  AutoGenerateColumns="false" EditMode="InPlace"   
                  ShowHeader = "false"    TableLayout="Auto"  GroupLoadMode="Client" >
                <PagerStyle Mode="NumericPages" />
             <Columns>                          
             <telerik:GridButtonColumn ButtonType="LinkButton" DataTextField="type" UniqueName="type" CommandName="OnType"  ></telerik:GridButtonColumn>
             <telerik:GridBoundColumn  DataField="status" Visible="false" ></telerik:GridBoundColumn> 
             <telerik:GridBoundColumn  DataField="document" Visible="false" ></telerik:GridBoundColumn>                      
            </Columns>          
            <GroupByExpressions>
              <telerik:GridGroupByExpression >
                                    <GroupByFields>
                                        <telerik:GridGroupByField   FieldName="id" HeaderText=" " HeaderValueSeparator=""  />
                                    </GroupByFields>
                                    <SelectFields>
                                        <telerik:GridGroupByField FieldName="document" HeaderText=" " HeaderValueSeparator=""   />
                                    </SelectFields>
               </telerik:GridGroupByExpression>
             </GroupByExpressions>
            </MasterTableView>
           </telerik:RadGrid>

*****Code****:

protected
void dgDocuments_NeedDataSource(object source, GridNeedDataSourceEventArgs e)
       {
           DataTable table = new DataTable();
           table.Columns.Add("document", typeof(string));
           table.Columns.Add("type", typeof(string));
           table.Columns.Add("status", typeof(string));
           table.Columns.Add("id", typeof(int));
           if (Session["commercial"].ToString().ToUpper() == "N")
           {
               table.Rows.Add("Product Catalog", "Active Product", "CURRENT",1);
           }
           table.Rows.Add("Product Specifications (EHB)", "Active Product", "CURRENT", 2);
           table.Rows.Add("Product Specifications (EHB)", "Out of Production", "DISCONTINUED", 2);
           table.Rows.Add("Installation Instructions", "Active Product", "CURRENT",3);
           table.Rows.Add("Installation Instructions", "Out of Production", "DISCONTINUED",3);
           table.Rows.Add("Service Literature", "Active Product & Out of Production", "BOTH", 4);
           table.Rows.Add("Service & Application Notes", "Active Product & Out of Production", "BOTH",5);
           table.Rows.Add("Application and Design Guidelines", "Active Product & Out of Production", "BOTH",6);
           table.Rows.Add("Wiring Diagrams", "Active Product", "CURRENT",7);
           table.Rows.Add("Wiring Diagrams", "Out of Production", "DISCONTINUED",7);
           table.Rows.Add("User Manuals", "Active Product", "CURRENT", 8);
           table.Rows.Add("User Manuals", "Out of Production", "DISCONTINUED", 8);                  
           dgDocuments.DataSource = table;
       }
       protected void dgDocuments_ItemCommand(object source, GridCommandEventArgs e)
       {
           if (e.CommandName.Equals("OnType"))
           {
               GridDataItem dataItem = (GridDataItem)e.Item;
               Session["ProductStatus"] = dataItem["status"].Text;
               if (dataItem["document"].Text.ToUpper().Trim().ToUpper() == PRODUCT_CATALOG.ToUpper())
               {
                   Session["publication"] = PRODUCT_CATALOG;
                   Session["publicationID"] = "9";
                   Response.Redirect("SearchbyCategory_ProductCatlog.aspx");
               }
               else if (dataItem["document"].Text.ToUpper().Trim().ToUpper() == ENGINEERING_HANDBOOK.ToUpper())
               {
                   Session["publication"] = ENGINEERING_HANDBOOK;
                   Session["publicationID"] = "8";
                   Response.Redirect("SearchbyCategory_engineering.aspx");
               }
               else if (dataItem["document"].Text.ToUpper().Trim().ToUpper() == HOMEOWNERS_MANUALS.ToUpper())
               {
                   Session["publication"] = HOMEOWNERS_MANUALS;                  
                   Session["publicationID"] = "5";
                   Response.Redirect("SearchbyCategory.aspx");
               }
               else if (dataItem["document"].Text.ToUpper().Trim().ToUpper() == INSTALLATION_INSTRUCTION.ToUpper())
               {
                   Session["publication"] = INSTALLATION_INSTRUCTION;
                   Session["publicationID"] = "1";
                   Response.Redirect("SearchbyCategory.aspx");
               }
               else if (dataItem["document"].Text.ToUpper().Trim().ToUpper() == WIRING_DIAGRAMS.ToUpper())
               {
                   Session["publication"] = WIRING_DIAGRAMS;
                   Session["publicationID"] = "3";
                   Response.Redirect("SearchbyCategory.aspx");
               }
               else if (dataItem["document"].Text.ToUpper().Trim().ToUpper() == SERVICE_MANUALS.ToUpper())
               {
                   Session["publication"] = SERVICE_MANUALS;
                   Session["publicationID"] = "4";
                   Response.Redirect("SearchbyCategory.aspx");
               }
               else if (dataItem["document"].Text.ToUpper().Trim().ToUpper() == SERVICE_APP.ToUpper())
               {
                   Session["publication"] = SERVICE_APP;
                   Session["publicationID"] = "6";
                   Response.Redirect("SearchbyCategory.aspx");
               }
               else if (dataItem["document"].Text.ToUpper().Trim().ToUpper() == APPLICATION_DESIGN.ToUpper())
               {
                   Session["publication"] = APPLICATION_DESIGN;
                   Session["publicationID"] = "13";
                   Response.Redirect("SearchbyCategory.aspx");
               }
           }
       }
Jayesh Goyani
Top achievements
Rank 2
 answered on 17 Sep 2013
4 answers
349 views
When i was running this under debug mode in VS everything looked perfect, so I moved everything on to my webserver and when I did the arrows and borders for the radcombobox is gone.


Here is the import of the css
<head id="Head1" runat="server">
    <title></title>
    <link href="css/signup.css" rel="stylesheet" type="text/css" />
    <telerik:RadStyleSheetManager ID="RadStyleSheetManager1" runat="server" />
    <style type="text/css">
        .body
        {
        }
    </style>
</head>

Here is the aspx for the RadComboBox

                    <div class="ControlContainerContainer">
                        <telerik:RadComboBox ID="StateComboBox" Runat="server" Width="250px">
                        </telerik:RadComboBox>
                    </div>

This is what I noticed, when I renamed the css everything broke, so I know it's picking up the css, when I removed <telerik:RadStyleSheetManager ID="RadStyleSheetManager1" runat="server" />
    <style type="text/css">
        .body
        {
        }
    </style>
what happeneded was the css broke, however the border showed up for the radcombobox but the arrow still did not.

Below is my entire css

/* CSS Document */
body{
    background:url(images/bg.gif) repeat-x 0 0 #F7F7F7; color:#171717;
    font:normal 13px/20px Georgia, "Times New Roman", Times, serif;
    margin:0; padding:0;}
div, h1, h2, h3, h4, h5, h6, form, label, input, span, ul, li, p, a{
    margin:0; padding:0;}
ul{
    list-style:none;}
.spacer{
    font-size:0; line-height:0; clear:both;}


/* -- top navigation start -- */
#topNav{
    width:683px; margin:0 auto; height:45px;}
#topNav ul{
    width:620px; margin:0 auto;}
#topNav ul li{
    height:37px; float:left;
    background:url(images/bg.gif) repeat-x 0 0 #292929; color:#C1C1C1;
    font:bold 16px/37px Arial, Helvetica, sans-serif;}
#topNav ul li a{
    padding:0 18px; height:37px; float:left; text-decoration:none; display:block;
    background:url(images/bg.gif) repeat-x 0 0 #292929; color:#C1C1C1;
    font:bold 16px/37px Arial, Helvetica, sans-serif;}
#topNav ul li a:hover{
    background:url(images/top_btn_h.gif) no-repeat center bottom;}
#topNav ul li a.hover{
    padding:0 18px; height:37px; float:left; text-decoration:none; display:block;
    background:url(images/top_btn_h.gif) no-repeat center bottom; color:#C1C1C1;
    font:bold 12px/37px Arial, Helvetica, sans-serif;}
/* -- top navigation start -- */

#userCreate div.userCreationouter
{
width: 100%;
height:auto;
}
    
#userCreate div.userCreationleft{
margin-left:auto;
margin-right:auto;
width: 53%;
height:auto;
}
#userCreate div.userCreationleft h2{
    font:bold italic 16px/20px Georgia, "Times New Roman", Times, serif; color:#800080; text-align:left; padding-left:19px;}
#userCreate div.userCreationleft h2 span{
    color:#000000; background-color:#800080}

#userCreate div.userCreationmiddle{
margin-left:auto;
margin-right:auto;
width:50%;
height:auto;
}

#userCreate div.ControlOuterContainer{
    margin: 0 auto 2px auto;
width: 100%;
height:auto;
float: left;
border-top-style:solid;
border-top-color:Black;
padding-top:10px;
padding-bottom:10px;
padding-right:10px;
padding-left:10px;
border-width:thin;
}
#userCreate div.ControlLabelContainer{
width: 35%;
height:auto;
float: left;
text-align:right;
padding-right:1em;
padding-bottom:8px;
font-size:8pt;
}
#userCreate div.ControlContainerContainer{
width: 60%;
height:auto;
float: left;
padding-bottom:8px;
}
#userCreate div.LoginBox{
margin-left:auto;
margin-right:auto;
width: 53%;
height:auto;
border-style:solid;
border-top-color:Black;
padding-top:10px;
padding-bottom:10px;
padding-right:10px;
padding-left:10px;
border-width:thin;
background:url(../images/blue_bg.gif);color:#4B2B3E;
}
#userCreate div.LoginBoxFont
{
    font:bold 8px/12px Georgia, "Times New Roman", Times, serif; padding:0 9px 0 22px; color#F7F7F7;
}

/* -- body start -- */
#body{
    width:683px; margin:0 auto; padding:0 0 60px 0;
    background:url(../images/header_bg.gif) no-repeat right top #F7F7F7; color:#171717;}
#body img.logo{
    border:none; margin:30px 0 0 0;}
#body h1{
    background:url(../images/punch_line.gif) no-repeat 0 0 #F7F7F7; color:#171717;
    width:142px; height:49px; text-indent:-20000px;}
    /*--Body end -- */



Thanks!
Kevin
Top achievements
Rank 1
 answered on 17 Sep 2013
5 answers
368 views
Hi,

How can we find all RadCombobox using jQuery Seletor and also attach javascript function to it.

Actual requirement is to find all controls on the page by jquery selector or telerik client api if available.
moegal
Top achievements
Rank 1
 answered on 16 Sep 2013
2 answers
115 views
Hello,
I am extremely new to asp.net and especially new to telerik. I am trying to create a gridview with the following code, just to see how it works, but i ran into a wierd problem, i added the commanditemdisplay to top, and it adds the "add button" every time i click it for some reason it adds the edit and delete buttons multipe times per row, not sure what i am doing wrong in order to cause that, but can someone please help me with this.

public partial class Default4 : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Session["GridData"] == null)
        {
            DataTable table = GetTable();
            Session.Add("GridData", table);
        }
        DefineGridStructure();
    }


    private void DefineGridStructure()
    {
        
        DataTable current = (DataTable)Session["GridData"];

        RadGrid grid = new RadGrid();
        grid.ID = "RadGrid1";
        grid.DataSource = current;
        grid.AutoGenerateEditColumn = true;
        grid.AutoGenerateDeleteColumn = true;
        grid.AllowAutomaticInserts = true;
        grid.Width = Unit.Percentage(100);
        grid.PageSize = 15;
        grid.AllowPaging = true;
        grid.PagerStyle.Mode = GridPagerMode.NextPrevAndNumeric;
        grid.AutoGenerateColumns = false;
        grid.MasterTableView.Width = Unit.Percentage(100);
        grid.MasterTableView.CommandItemDisplay = GridCommandItemDisplay.TopAndBottom;
        grid.MasterTableView.DataKeyNames = new string[] { "RowNumber" };
        GridBoundColumn boundColumn = new GridBoundColumn();
        boundColumn.DataField = "RowNumber";
        boundColumn.HeaderText = "RowNumber";
        grid.MasterTableView.Columns.Add(boundColumn);
        boundColumn = new GridBoundColumn();
        boundColumn.DataField = "Size";
        boundColumn.HeaderText = "Size";
        grid.MasterTableView.Columns.Add(boundColumn);
        boundColumn = new GridBoundColumn();
        boundColumn.DataField = "Description";
        boundColumn.HeaderText = "Description";
        grid.MasterTableView.Columns.Add(boundColumn);
        boundColumn = new GridBoundColumn();
        boundColumn.DataField = "Quantity";
        boundColumn.HeaderText = "Quantity";
        grid.MasterTableView.Columns.Add(boundColumn);
        boundColumn = new GridBoundColumn();
        boundColumn.DataField = "Duration";
        boundColumn.HeaderText = "Duration";
        grid.MasterTableView.Columns.Add(boundColumn);
        boundColumn = new GridBoundColumn();
        boundColumn.DataField = "DurationType";
        boundColumn.HeaderText = "DurationType";
        grid.MasterTableView.Columns.Add(boundColumn);
        boundColumn = new GridBoundColumn();
        boundColumn.DataField = "Amount";
        boundColumn.HeaderText = "Amount";
        grid.MasterTableView.Columns.Add(boundColumn);
        grid.DataBind();
        PlaceHolder1.Controls.Add(grid);
    }



    static DataTable GetTable()
    {
        //
        // Here we create a DataTable with a few columns.
        //
        // Create Datatable to store all colums
        DataTable dt = new DataTable();
        DataRow dr = null;

        dt.Columns.Add(new DataColumn("RowNumber", typeof(string)));
        dt.Columns.Add(new DataColumn("Size", typeof(string)));
        dt.Columns.Add(new DataColumn("Description", typeof(string)));
        dt.Columns.Add(new DataColumn("Quantity", typeof(string)));
        dt.Columns.Add(new DataColumn("Unit", typeof(string)));
        dt.Columns.Add(new DataColumn("Duration", typeof(string)));
        dt.Columns.Add(new DataColumn("DurationType", typeof(string)));
        dt.Columns.Add(new DataColumn("Amount", typeof(string)));

        dr = dt.NewRow();
        dr["RowNumber"] = 1;
        dr["Size"] = string.Empty;
        dr["Description"] = string.Empty;
        dr["Quantity"] = string.Empty;
        dr["Unit"] = string.Empty;
        dr["Duration"] = string.Empty;
        dr["DurationType"] = string.Empty;
        dr["Amount"] = string.Empty;
        dt.Rows.Add(dr);
        return dt;
    }
}
Brad
Top achievements
Rank 1
 answered on 16 Sep 2013
1 answer
129 views
Hi,

I've got a problem where i'm trying to build a webpart that uses a RadTreeList that nests a RadGrid within the second column of the RadTreeList to give me a hierarchy of grids. This allows me to view a set of grid data at each level of a hierarchy and alter the data within, due to the size of the hierarchies and grids i only want to load the grid data if an item has been selected within a filter control.

I have managed to create my RadTreeList with the nested Grids which loads and add a NeedDataSource to each grid as its being loaded. This will load the initial set of data and i can then trigger the edit on the grids which seems to work OK.

My problem is when i come to deselect a grid from my filter control and then in the Grid NeedDataSource it sets the datasource back to null and in turn i would expect on the loading of the grid the grid shouldn't be displayed as its datasource is empty. However for some reason the grid is still persisting the previously loaded data? Can anyone tell me why this is, have i missed something?

I have posted my HTML/ASP markup and C# code below:

<telerik:RadTreeList ID="rtl_TaxonomyGrids" runat="server" AutoGenerateColumns="False" DataKeyNames="Allocation" ParentDataKeyNames="Parent_Allocation" OnItemDataBound="rtl_TaxonomyGrids_ItemDataBound" OnLoad="rtl_TaxonomyGrids_Load" OnNeedDataSource="rtl_TaxonomyGrids_NeedDataSource" OnItemCreated="rtl_TaxonomyGrids_ItemCreated">
    <Columns>
        <telerik:TreeListBoundColumn UniqueName="Name" DataField="Name" HeaderText="Name">
            <HeaderStyle Width="100px"></HeaderStyle>
        </telerik:TreeListBoundColumn>
        <telerik:TreeListTemplateColumn UniqueName="PermissionsGrid" HeaderText="Permissions"
            DataField="Allocation">
            <ItemStyle CssClass="TreeGridCell NoPadding"></ItemStyle>
            <ItemTemplate>
                <asp:Label ID="lb_GridAllocation" Font-Bold="true" Font-Italic="true" Text='<%# Eval("Allocation") %>'
                    Visible="false" runat="server"></asp:Label>
                <telerik:RadGrid ID="rg_TaxonomyGroupProfiling" AllowMultiRowSelection="True" BorderStyle="None" runat="server" AutoGenerateColumns="false" OnItemDataBound="rg_TaxonomyGroupProfiling_ItemDataBound" OnItemCreated="rg_TaxonomyGroupProfiling_ItemCreated">
                    <ClientSettings AllowExpandCollapse="true">
                        <Selecting AllowRowSelect="True" UseClientSelectColumnOnly="True"></Selecting>                     
                    </ClientSettings>
                    <MasterTableView ClientDataKeyNames="Allocation" Width="100%" EditMode="InPlace">
                        <Columns>                        
                            <telerik:GridClientSelectColumn UniqueName="ClientSelectColumn">
                            </telerik:GridClientSelectColumn>
                            <telerik:GridBoundColumn Visible="false" UniqueName="Allocation" DataField="Allocation" HeaderText="Allocation" ReadOnly="True">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn UniqueName="UserGroup" DataField="UserGroup" HeaderText="UserGroup" ReadOnly="True">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn UniqueName="Status" DataField="Status" HeaderText="Status" ReadOnly="True">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn  UniqueName="Inherits" DataField="Inherits" HeaderText="Inherits" ColumnEditorID="GridTextBoxColumnEditor1">
                            </telerik:GridBoundColumn>                          
                            <telerik:GridBoundColumn UniqueName="View" DataField="View" HeaderText="View" ColumnEditorID="GridTextBoxColumnEditor1">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn  UniqueName="Competent" DataField="Process" HeaderText="Competent" ColumnEditorID="GridTextBoxColumnEditor1">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn UniqueName="BatchSize" DataField="BatchSize" HeaderText="Batch Size" ColumnEditorID="GridTextBoxColumnEditor1">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn UniqueName="Escalate" DataField="Escalate" HeaderText="Escalate" ColumnEditorID="GridTextBoxColumnEditor1">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn  UniqueName="Suspend" DataField="Suspend" HeaderText="Suspend" ColumnEditorID="GridTextBoxColumnEditor1">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn UniqueName="SamplingX" DataField="SamplingX" HeaderText="SamplingX" ColumnEditorID="GridTextBoxColumnEditor1">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn UniqueName="SamplingY" DataField="SamplingY" HeaderText="SamplingY" ColumnEditorID="GridTextBoxColumnEditor1">
                            </telerik:GridBoundColumn>
                            <telerik:GridEditCommandColumn ButtonType="ImageButton" UniqueName="EditCommandColumn1">
                                <HeaderStyle Width="20px"></HeaderStyle>
                                <ItemStyle CssClass="MyImageButton"></ItemStyle>
                            </telerik:GridEditCommandColumn>
                        </Columns>
                    </MasterTableView>
                </telerik:RadGrid>
                <telerik:GridTextBoxColumnEditor ID="GridTextBoxColumnEditor1" runat="server" TextBoxStyle-Width="35px">
                </telerik:GridTextBoxColumnEditor>
                <telerik:GridDropDownListColumnEditor ID="GridDropDownListColumnEditor1" runat="server"
                    DropDownStyle-Width="70px">
                </telerik:GridDropDownListColumnEditor>               
            </ItemTemplate>
        </telerik:TreeListTemplateColumn>
    </Columns>
</telerik:RadTreeList>

protected void rtl_TaxonomyGrids_NeedDataSource(object sender, Telerik.Web.UI.TreeListNeedDataSourceEventArgs e)
{
    if (sender is RadTreeList)
    {
        RadTreeList tree = sender as RadTreeList;
        tree.DataSource = null;
        tree.DataSource = dh.GetTaxonomyData();
    }
}
 
protected void rtl_TaxonomyGrids_ItemCreated(object sender, TreeListItemCreatedEventArgs e)
{
    if (e.Item is TreeListDataItem)
    {               
        RadGrid grid = (RadGrid) e.Item.FindControl("rg_TaxonomyGroupProfiling");
        grid.NeedDataSource += new GridNeedDataSourceEventHandler(rg_TaxonomyGroupProfiling_NeedDataSource);
    }
}
 
protected void rg_TaxonomyGroupProfiling_NeedDataSource(object sender, Telerik.Web.UI.GridNeedDataSourceEventArgs e)
{
    if (sender is RadGrid)
    {
        RadGrid grid = sender as RadGrid;
        grid.MasterTableView.DataSource = null;
        grid.DataSource = null;
 
        string taxSelection = this.GroupProfilerContainer.GroupProfilerContext.CriteriaSettings.Selection["Taxonomy"].ToString();
        string gpSelection =  ConverToWhereClause(this.GroupProfilerContainer.GroupProfilerContext.CriteriaSettings.Selection);
 
        TreeListDataItem nestedItem = (TreeListDataItem)(grid.NamingContainer);
        string allocation = nestedItem.GetDataKeyValue("Allocation").ToString();
 
        if (!string.IsNullOrEmpty(taxSelection))
        {
            if (taxSelection.Split(',').Contains(allocation))
            {
                grid.DataSource = dh.GetPermissionsData(allocation, gpSelection);
            }
        }
    }
}

Thanks,
JC
Tsvetoslav
Telerik team
 answered on 16 Sep 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?