Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
967 views
Hi.  I've attached an image of a hierarchical RadGrid 3 levels deep (Category-Subcategory-Standard).  I'm having a problem removing the useless expand/collapse button (or arrow) at the Standard (3rd) level.  I've used the following recursive function but it only goes 2 layers deep in removing the buttons as you can see in the image.  I'm not even sure why there is an expand/collapse button at the 3rd level because it is the innermost detail table.  Any advice as to how I could remove ALL expand/collapse buttons in the grid?  What am I missing?

Here is my code for creating the grid from the code behind.

            rgStandards = new RadGrid { ID = "rgStandards", EnableEmbeddedSkins = false, AutoGenerateColumns = false};
            rgStandards.PreRender += rgStandards_PreRender;
            StandardsSet.Tables[0].TableName = "categories";
            StandardsSet.Tables[1].TableName = "subcategories";
            StandardsSet.Tables[2].TableName = "standards";


            //Standard Categories
            rgStandards.MasterTableView.DataMember = "categories";
            rgStandards.MasterTableView.DataKeyNames = new string[] { "category" };
            rgStandards.MasterTableView.HierarchyDefaultExpanded = true;
            rgStandards.AllowPaging = false;
            GridBoundColumn boundColumn;
            boundColumn = new GridBoundColumn();
            boundColumn.DataField = "category";
            boundColumn.HeaderText = "Category";
            rgStandards.MasterTableView.Columns.Add(boundColumn);

            //Standard Subcategories
            GridTableView gtvSubcategories = new GridTableView(rgStandards);
            gtvSubcategories.DataMember = "subcategories";
            gtvSubcategories.DataKeyNames = new string[] { "subcategory" };
            GridRelationFields grfSubcategories = new GridRelationFields();
            grfSubcategories.MasterKeyField = "category";
            grfSubcategories.DetailKeyField = "category";
            gtvSubcategories.ParentTableRelation.Add(grfSubcategories);
            boundColumn = new GridBoundColumn();
            boundColumn.DataField = "subcategory";
            boundColumn.HeaderText = "Subcategory";
            gtvSubcategories.Columns.Add(boundColumn);
            rgStandards.MasterTableView.DetailTables.Add(gtvSubcategories);

            //Standard Details
            GridTableView gtvStandards = new GridTableView(rgStandards);
            gtvStandards.DataMember = "standards";
            gtvStandards.DataKeyNames = new string[] { "standardText" };
            GridRelationFields grfStandards = new GridRelationFields();
            grfStandards.MasterKeyField = "subcategory";
            grfStandards.DetailKeyField = "subcategory";
            gtvStandards.ParentTableRelation.Add(grfStandards);
            boundColumn = new GridBoundColumn();
            boundColumn.DataField = "standardText";
            boundColumn.HeaderText = "Standard";
            gtvStandards.Columns.Add(boundColumn);
            gtvSubcategories.DetailTables.Add(gtvStandards);
            gtvSubcategories.HierarchyDefaultExpanded = true;

            rgStandards.DataSource = StandardsSet;
            rgStandards.DataBind();

And here is my recursive function for removing the expand/collapse buttons:

        protected void rgStandards_PreRender(object sender, EventArgs e) {
            HideExpandColumnRecursive(rgStandards.MasterTableView);
        }

        public void HideExpandColumnRecursive(GridTableView tableView) {
            GridItem[] nestedViewItems = tableView.GetItems(GridItemType.NestedView);
            foreach (GridNestedViewItem nestedViewItem in nestedViewItems) {
                foreach (GridTableView nestedView in nestedViewItem.NestedTableViews) {
                    TableCell cell = nestedView.ParentItem["ExpandColumn"];
                    cell.Controls[0].Visible = false;
                    if (nestedView.HasDetailTables) {
                        HideExpandColumnRecursive(nestedView);
                    }
                }
            }
        }
Viktor Tachev
Telerik team
 answered on 11 Feb 2014
1 answer
68 views
I am using a RadGrid with a user control - on the control are Update/Cancel buttons. I added some jquery to enable them when a user changes something. I've noticed though that it only works on the topmost row in the grid. Can someone help me get the jquery correct to enable the buttons on the correct row. Currently the btnUpdate.ClientID is not grabbing the correct row update button - I assume I need to be passing the event somehow - the clientIDs change by row - for example the srcElement.id of the textbox is "ctl00_ContentPlaceHolder1_ctrlReviews_rgReview_ctl00_ctl05_EditFormControl_txtVendorEngagementID" but the textBoxChanged button found is
ctl00_ContentPlaceHolder1_ctrlReviews_rgReview_ctl00_ctl07_EditFormControl_btnUpdate. It should be ct105.


<script type="text/javascript">
var ischanged = false;

$(document).ready(function () {
$('input').keydown(function (event) {
if (event.srcElement.id.indexOf("ctrlReviews_rgReview") != -1) {
textBoxChanged();
}
});
$('select').keydown(function (event) {
if (event.srcElement.id.indexOf("ctrlReviews_rgReview") != -1) {
textBoxChanged();
}
});
$('textarea').keydown(function (event) {
if (event.srcElement.id.indexOf("ctrlReviews_rgReview") != -1) {
textBoxChanged();
}
});
function textBoxChanged() {
$('#hdnIsChanged').value = "true";
var btn = $('#trButtons').find("#<%=btnUpdate.ClientID%>");
btn.removeAttr("disabled");
}
});

</script>
Marin
Telerik team
 answered on 11 Feb 2014
1 answer
100 views
Hi,

    Good Morning!

    I am using RadScheduler control to bind the appointments.To create the time slot, using TimeSlotCreated event. 
    If one drop down selected index changed, Timeslotcreated event is firing twice.
   (i.e)  before page_load event and after the page_load event.

   can anyone please assist me how to control event firing twice?
   I want to fire this event only one.

Thanks,
Sathy.
Plamen
Telerik team
 answered on 11 Feb 2014
4 answers
52 views
Hi,

I am using RadNumericTextBox inside a RadGrid and I am setting the values of each row from server side.  This works fine for the last 2 years and it has been tested with several browsers (IE, Firefox, Opera, Safari).
Now, I got the latest update of Firefox (version 27) and this isn't working. The RadNumericTextBox in each row remains empty. When I tested again with Firefox older version (e.g 24) this still works fine.
Could you please help me with this problem?

Kind regards,
Antonia
   
Viktor Tachev
Telerik team
 answered on 11 Feb 2014
3 answers
117 views
Rad Ratting is not working in chrome, previously it used to work in all browsers.
 <telerik:RadRating ID="RadEngaging" runat="server" ItemCount="5" SelectionMode="Continuous"
                                                                    Precision="Half" Orientation="Horizontal">
                                                                </telerik:RadRating>

Misho
Telerik team
 answered on 11 Feb 2014
1 answer
232 views
We have a bit in our master page like
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server"
CdnSettings-TelerikCdn="Enabled">
   </telerik:RadScriptManager>

As I understand from the documentation, if the site is http, the scripts and skins should be coming from http:....telerikstatic.com
And if the site is SSL/https the scripts and skins should be coming from the https....cloudfront.net url.

Unfortunately this is not what is happening.  When I go to the client's website on their server, view the site under https, and look at the source, I see that things are coming from cloudfront.net as they should.  
However, when I view the same site remotely using https, pieces of the page are missing, and looking at the view source, I see the items are pulling from the telerikstatic.com location instead.  This is a problem in firefox and other browsers set to only deliver secure content when its an SSL site, and causes our site to be non functional.   If I tell firefox yes I want nonsecure content too, then it works fine.  

Does anyone have any idea why the skins and scripts aren't coming from the https...cloudfront url like they should??  I even tried putting a section in the web.config to universally enable the cdn and use the cloudfront url, but it doesn't seem to have any effect.

I'm pulling my hair out, and not a network engineer.  All suggestions will be appreciated.

 

Dimitar Terziev
Telerik team
 answered on 11 Feb 2014
14 answers
293 views
Hi,

We are using Rad Editor version 6.6.3.0 runtime version v1.0.3705 with .Net Framework 1.1 for a MCMS site.
Could you please suggest what was the latest version supported on .Net Framework 1.1, and URL from where I can download that control.

Thanks in advance.
shiv
Top achievements
Rank 1
 answered on 11 Feb 2014
1 answer
57 views
Hi, i want to update my telerik editor, I am using this 2010.3.1109.35 version and want to update it.

Thanks
Princy
Top achievements
Rank 2
 answered on 11 Feb 2014
0 answers
39 views
Hellow,

We are thinking to merge these two along with telerik UI for asp.net ajax in asp.net 4 webforms app. Our project uses telerik default theme. for jQuery UI Smoothness seem to be quite close to telerik's default theme. Any suggestions for bootstrap ?
Aarsh
Top achievements
Rank 1
 asked on 11 Feb 2014
1 answer
26 views
Please see the attached screenshot, i want to display records in this way in radgrid,
please point me any link which demonstrate any link which demonstrate this.

Thanks & Regards
Bharat Bhushan
Jayesh Goyani
Top achievements
Rank 2
 answered on 11 Feb 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?