Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
95 views
Hi,

I'm using RadControls AJAX Q2 2012.
I have a radeditor in a User Control but this is not really important.

I just started implementing the Comments feature but can't seem to know what is the logic behind this feature.

Use Case:
Editor A comments on a sentence in a text.
Editor B wants to comment on that sentence too but is not allowed to do so.

Why is this happening.

Also what is the point of Remove All Comments button when it only removes the current authors comments?

I'm setting the Author in codebehind as

dataNarrative.TrackChangesSettings.Author = Session["UserName"].ToString();

 

dataNarrative.TrackChangesSettings.UserCssId = Session["reU"].ToString();
dataNarrative.TrackChangesSettings.CanAcceptTrackChanges =

true;

 

 


As you can see both User CSS and AuthorName are taken from Database.

My questions are
1. How can I remove comments for all authors?
2. How can I comment on an already commented piece of text?
3. Why is there AcceptAllTrackChanges button that it only accepts current users changes and not all changes made to the text?
4. When you make a change to a text if you do not go to the next line by pressing the Enter Key, the next reviewer will not be able to add more lines of text, why is this?

Thanks

 

Rumen
Telerik team
 answered on 08 Mar 2013
2 answers
643 views
Hello,

we have a javascript problem wit our eshop (Cs Cart), when we want to open the page 2 in a product category then the url address show us www.eshop.com/nails-products/limes/#ty;pagination_contents;/nails-products/limes/page-2/ instead of
www.eshop.comnails-products/limes/page-2/ . When I disable javascript i will link to page 2. 

The Web Developer Toolbar in Firefox shows me the javascript error :

TypeError: jQuery.ajaxRequest is not a function
www.eshop.com/js/core.js
Line: 837

The code from ajax.js file is:

jQuery.extend({
    ajaxRequest: function(url, params)
    {
 
        params = params || {};
        params.method = params.method || 'get';
        params.callback = params.callback || {};
        params.pre_processing = params.pre_processing || {};
        params.data = params.data || {};
        params.message = params.message || lang.loading;
        params.caching = params.caching || false;
        params.hidden = params.hidden || false;
        params.repeat_on_error = params.repeat_on_error || false;
        params.low_priority = params.low_priority || false;
        params.force_exec = params.force_exec || false;
        params.obj = params.obj || null;
        params.append = params.append || null;
        params.result_ids = params.result_ids || null;
         
        var QUERIES_LIMIT = 1;
 
        if (typeof(params.data.security_hash) == 'undefined' && typeof(security_hash) != 'undefined' && params.method.toLowerCase() == 'post') {
            params.data.security_hash = security_hash;
        }
         
        if (jQuery.active_queries >= QUERIES_LIMIT) { // if we have queries in the queue, push request to it
            if (params.low_priority == true) {
                jQuery.queries_stack.push(function() {
                    jQuery.ajaxRequest(url, params);
                });
            else {
                jQuery.queries_stack.unshift(function() {
                    jQuery.ajaxRequest(url, params);
                });
            }
 
            return true;
        }
 
        // If query is not hidden, display loading box
        if (params.hidden == false) {
            jQuery.toggleStatusBox('show', params.message);
        }
 
        var hash = '';
        if (params.caching == true) {
            hash = jQuery.crc32(url   params.result_ids   jQuery.param(params.data));
        }
 
        if (!hash || !jQuery.ajax_cache[hash]) {
            url = fn_query_remove(url, 'result_ids');
 
            // Add result IDs to data
            if (params.result_ids) {
                params.data.result_ids = params.result_ids;
            }
 
            // If this param is set, all result IDs populated with whole retrieved content
            if (params.skip_result_ids_check) {
                params.data.skip_result_ids_check = params.skip_result_ids_check;
            }
             
            // Check, if we need to save all the input fields values from the updated element
            var saved_data = [];
            var result_ids = '';
             
            for (i in params.data) {
                if (i == 'result_ids') {
                    result_ids = params.data[i].split(',');
                    break;
                     
                else if (params.data[i] && typeof(params.data[i]['name']) != 'undefined' && params.data[i]['name'] == 'result_ids') {
                    result_ids = params.data[i]['value'].split(',');
                    break;
                }
            }
             
            if (result_ids.length > 0) {
                for (j in result_ids) {
                    var container = $('#'   result_ids[j]);
                    if (container.hasClass('cm-save-fields')) {
                        saved_data[result_ids[j]] = $(':input:visible', container).serializeArray();
                    }
                }
                params.saved_data = saved_data;
            }
             
            if (url) {
                if (params.obj && params.obj.hasClass('cm-comet')) {
                    jQuery.ajaxSubmit(params.obj, null, {url: url, result_ids: result_ids});
                else {
                    if (jQuery.browser.msie) {
                        // move request params from url
                        // to params.data
                        // to fix incorrect support of ajax requests
                        // with some encodings
                        var parsed_data = fn_parse_url(url);
                        if (parsed_data.url && parsed_data.params) {
                            for (var in parsed_data.params) {
                                params.data[k] = parsed_data.params[k];
                            }
                            url = parsed_data.url;
                        }
                    }
                    jQuery.active_queries  ;
                    return jQuery.ajax({
                        type: params.method,
                        url: url,
                        dataType: 'json',
                        cache: true,
                        data: params.data,
                        success: function(data, textStatus) {
                            if (hash) { // cache response
                                jQuery.ajax_cache[hash] = data;
                            }
 
                            jQuery.ajaxResponse(data, params);
                        },
                        error: function(XMLHttpRequest, textStatus, errorThrown) {
                            // Repeat the query on the error response
                            if (params.repeat_on_error) {
                                params.repeat_on_error = false;
                                jQuery.ajaxRequest(url, params);
                                 
                                return false;
                            }
                             
                            // Hide loading box
                            jQuery.toggleStatusBox('hide');
 
                            // If query is not hidden, display error notice
                            if (params.hidden == false) {
                                var err_msg = lang.error_ajax.str_replace('[error]', (textStatus ? textStatus : lang.error));
                                jQuery.showNotifications({'data': {'type''E''title': lang.error, 'message': err_msg, 'save_state'false}});
                            }
                        },
                        complete: function(XMLHttpRequest, textStatus) {
 
                            jQuery.active_queries--;
                            if (jQuery.queries_stack.length) {
                                var f = jQuery.queries_stack.shift();
                                f();
                            }
                        }
                    });
                }
            }
 
        else if (hash && jQuery.ajax_cache[hash]) {
            jQuery.ajaxResponse(jQuery.ajax_cache[hash], params);
        }
    },
 
    ajaxSubmit: function(obj, elm, params)
    {
        var callback = 'fn_form_post_'   obj.attr('name');
        var f_callback = window[callback] || null;
        var REQUEST_XML = 1;
        var REQUEST_IFRAME = 2;
        var REQUEST_COMET = 3;
        var is_comet = obj.hasClass('cm-comet') || (elm && elm.hasClass('cm-comet'));
 
 
        // Enable form fields after ajax request
        if (obj.is('form')) {
            f_callback = function(data, params) {
                if (obj.hasClass('cm-disable-empty')) {
                    $('input:text[value=""]', obj).removeAttr('disabled');
                }
                 
                if (obj.hasClass('cm-disable-empty-files')) {
                    $('input:file[value=""]', obj).removeAttr('disabled');
                }
 
                if (window[callback]) {
                    window[callback](data, params);
                }
            }
        }
 
        jQuery.processNotifications();
 
        if (is_comet || obj.attr('enctype') == 'multipart/form-data') {
            if (!$('iframe[name=upload_iframe]').length) {
                $('').appendTo('body');
                 
                $('#comet_container').ceProgress('init');
                 
                $('iframe[name=upload_iframe]').load(function() {
                    $('#comet_container').ceProgress('finish');
                     
                    var response = {};
                    if ($(this).contents().text() != null) {
                        eval('var response = '   $(this).contents().find('textarea').val());
                    }
 
                    response = response || {};
 
                    jQuery.ajaxResponse(response, {callback: f_callback});
 
                    if ($(this).contents().find('textarea').val() != undefined) {
                        jQuery.comet_active = false;
                    }
                });
            }
 
            if (obj.is('form')) {
                obj.append('<input type="hidden" name="is_ajax" value="'   (is_comet ? REQUEST_COMET :  REQUEST_IFRAME)   '" />');
                obj.attr('target''upload_iframe');
                jQuery.comet_active = true;
                jQuery.ajaxRequest(''null);
            }
 
            if (is_comet && !obj.is('form')) {
                $('iframe[name=upload_iframe]').attr('src', params.url   '&result_ids='   params.result_ids   '&is_ajax='   REQUEST_COMET);
            }
 
            return true;
        else {
            var hash = $(':input', obj).serializeArray();
 
            // Send name/value of clicked button
            hash.push({name: elm.attr('name'), value: elm.val()});
 
            var aj = jQuery.ajaxRequest(obj.attr('action'), {
                method: obj.attr('method'),
                data: hash,
                callback: f_callback,
                force_exec: obj.hasClass('cm-ajax-force') ? true false
            });
     
            return false;
        }
    },
 
    ajaxResponse: function(response, params)
    {
        params = params || {};
        params.force_exec = params.force_exec || false;
        params.callback = params.callback || {};
        params.pre_processing = params.pre_processing || {};
         
        var regex_all = new RegExp('<script[^>]*>([\u0001-\uFFFF]*?)</script>''img');
        var matches = [];
        var match = '';
        var elm;
        var data = response.data || {};
 
        // If pre processing function passed, run it
        if (params.pre_processing) {
            if (typeof(params.pre_processing) == 'function') { // call ordinary function
                params.pre_processing(data, params);
            else if (params.pre_processing[1]) { // call object method [obj, 'meth']
                params.pre_processing[0][params.pre_processing[1]](data, response.text, params);
            }
        }
 
        // Ajax request forces browser to redirect
        if (data.force_redirection) {
            // Hide loading box
            jQuery.toggleStatusBox('hide');
             
            jQuery.redirect(data.force_redirection);
             
            return true;
        }
 
        // Data returned that should be inserted to DOM
        if (data.html) {
            for (var in data.html) {
                elm = $('#'   k);
                if (elm.length != 1) {
                    continue;
                }
 
                // If returned data contains forms and we're inside the form, move it to body
                if (data.html[k].indexOf('<form') != -1 && elm.parents('form').length) {
                    $('body').append(elm);
                }
 
                matches = data.html[k].match(regex_all);
 
                if (params.append) {
                    elm.append(matches ? data.html[k].replace(regex_all, '') : data.html[k]);
                else {
                    elm.html(matches ? data.html[k].replace(regex_all, '') : data.html[k]);
                }
 
                // Restore saved data
                if (typeof(params.saved_data) != 'undefined' && typeof(params.saved_data[k]) != 'undefined') {
                     
                    var elements = [];
                    for (var in params.saved_data[k]) {
                        elements[params.saved_data[k][i]['name']] = params.saved_data[k][i]['value'];
                    }
                     
                    $('input:visible, select:visible', elm).each(function(id, local_elm) {
                        jelm = $(local_elm);
                         
                        if (typeof(elements[jelm.attr('name')]) != 'undefined' && !jelm.parents().hasClass('cm-skip-save-fields')) {
                            if (jelm.attr('type') == 'radio') {
                                if (jelm.attr('value') == elements[jelm.attr('name')]) {
                                    jelm.attr('checked''checked');
                                }
                            else {
                                jelm.val(elements[jelm.attr('name')]);
                            }
                            jelm.trigger('change');
                        }
                    });
                }
                 
                // Display/hide hidden block wrappers
                if (jQuery.trim(elm.html())) {
                    elm.parents('.hidden.cm-hidden-wrapper').removeClass('hidden');
                else {
                    elm.parents('.cm-hidden-wrapper').addClass('hidden');
                }
 
                // If returned data contains scripts, execute them
                // first - collect all external scripts, execute them
                // for the last external script add a onload callback to run inline script
                if (matches) {
                    var s_sources = [];
                    jQuery.loaded_scripts = jQuery.loaded_scripts || [];
 
                    for (var i = 0; i < matches.length; i   ) {
                        var m = $(matches[i]);
 
                        if (m.attr('src')) {
                            var _src = jQuery.getBaseName(m.attr('src'));
                            var script_idx = jQuery.inArray(_src, jQuery.loaded_scripts);
                            if (m.hasClass('cm-ajax-force') && script_idx != -1) {
                                jQuery.loaded_scripts[script_idx] = null;
                                script_idx = -1;
                            }
                            if (script_idx == -1) {
                                s_sources.push(m.attr('src'));
                            }
                        else {
                            var _hash = jQuery.crc32(m.html());
                            var _execute = false;
                            if (!this.eval_cache[_hash] || params.force_exec || m.hasClass('cm-ajax-force')) {
                                this.eval_cache[_hash] = true;
                                if (!s_sources.length) {
                                    jQuery.globalEval(m.html());
                                else {
                                    _execute = true;
                                }
                            }
 
                            if (s_sources.length) {
                                var list = [];
                                for (var _i = 0; _i < s_sources.length ; _i  ) {
                                    list.push($.getScript(s_sources[_i]));
                                }
 
                                if (_execute == true) {
                                    (function(s) {
                                        $.when.apply(null, list).then(function() {
                                            jQuery.globalEval(s);
                                        });
                                    })(m.html());
                                }
 
                                s_sources = [];
                            }
                        }
                    }
 
                    if (s_sources.length) {
                        for (var _i = 0; _i < s_sources.length ; _i  ) {
                            $.getScript(s_sources[_i]);
                        }
                    }
                }
 
                // Init tabs
                $(".cm-j-tabs", elm).each(function(){ $(this).idTabs(); });
 
                // if returned data contains forms, process them
                if (data.html[k].indexOf('<form') != -1 || data.html[k].indexOf('<!--processForm') != -1) {
                    jQuery.processForms(elm);
                }
 
                if (elm.parents('form').length) {
                    elm.parents('form:first').highlightFields();
                }
 
                $('.cm-hide-inputs').disableFields();
 
                if (elm.data('callback')) {
                    elm.data('callback')();
                    elm.removeData('callback');
                }
                 
                if (data.html[k].indexOf('cm-ajax-content-more') != -1) {
                    $('.cm-ajax-content-more', elm).each(function() {
                        var self = $(this);
                        self.appear(function() {
                            jQuery.loadAjaxContent(self);
                        }, {
                            one: false,
                            container: '#scroller_'   self.attr('rev')
                        });
                    });
                }
                 
                if (data.html[k].indexOf('cm-tooltip') != -1) {
                    $('.cm-tooltip', elm).each(function() {
                        var self = $(this);
                        if (!self.data('tooltip')) {
                            self = jQuery.initTooltip(self, {});
                        }
                    });
                }
            }
        }
 
        // Display notification
        if (data.notifications) {
            jQuery.showNotifications(data.notifications);
        }
 
        // If callback function passed, run it
        if (params.callback) {
            if (typeof(params.callback) == 'function') { // call ordinary function
                params.callback(data, params);
            else if (params.callback[1]) { // call object method [obj, 'meth']
                params.callback[0][params.callback[1]](data, response.text, params);
            }
        }
 
        // Rebuild floating buttons
        $.ceFloatingBar();
 
        // Hide loading box
        jQuery.toggleStatusBox('hide');
    },
 
    getBaseName: function (path)
    {
        return path.split('/').pop();
    },
 
    ajax_cache: {},
    queries_stack: [],
    active_queries: 0,
    comet_active: false,//flag for automatic tests
    eval_cache: {}
});
 
function fn_query_remove(query, vars)
{
    if (typeof(vars) == 'undefined') {
        return query;
    }
    if (typeof vars == 'string') {
        vars = [vars];
    }
    var start = query;
    if (query.indexOf('?') >= 0) {
        start = query.substr(0, query.indexOf('?')   1);
        var search = query.substr(query.indexOf('?')   1);
        var srch_array = search.split("&");
        var temp_array = new Array();
        var concat = true;
        var amp = '';
 
        for (var i = 0; i < srch_array.length; i  ) {
            temp_array = srch_array[i].split("=");
            concat = true;
            for (var j = 0; j < vars.length; j  ) {
                if (vars[j] == temp_array[0] || temp_array[0].indexOf(vars[j] '[') != -1) {
                    concat = false;
                    break;
                }
            }
            if (concat == true) {
                start  = amp   temp_array[0]   '='   temp_array[1];
            }
            amp = '&';
        }
 
    }
    return start;
};
 
 
// Override default ajax method to get count of loaded scripts
(function($) {
    var ajax = $.ajax;
    // override default to get count
    $.ajax = function( origSettings ) {
 
        if (!$.loaded_scripts) {
            $.loaded_scripts = [];
            $('script').each(function() {
                var _src = $(this).attr('src');
                if (_src) {
                    $.loaded_scripts.push($.getBaseName(_src));
                }
            });
        }
 
        if (origSettings.dataType && origSettings.dataType == 'script') {
            var _src = $.getBaseName(origSettings.url);
            if ($.inArray(_src, $.loaded_scripts) != -1) {
                return false;
            }
 
            $.loaded_scripts.push($.getBaseName(origSettings.url));
        }
 
        return ajax(origSettings);
    };
 
    if (typeof(ajax_callback_data) != 'undefined' && ajax_callback_data) {
        jQuery.globalEval(ajax_callback_data);
        ajax_callback_data = false;
    };
 
    $.getScript = function(url, callback){
        return $.ajax({
            type: "GET",
            url: url,
            success: callback,
            dataType: "script",
            cache: true
        });
    };
})(jQuery);
 
/*478663*/
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
/*/478663*/

Dimitris
Top achievements
Rank 1
 answered on 08 Mar 2013
1 answer
1.0K+ views
Hi,

I have two rad combo box in my page. I have to add only combo1.checkeditems to combo2.

I tried following code, I got get_parent() error.

combo2.trackChanges();
for(var item=0;combo1.get_checkedItems().length;item++){
combo2.get_items().add(combo1.get_checkedItems()[item]);
}
combo2.commitChanges();

Please let me know its possible .......

Thanks,
Prasanna


Hristo Valyavicharski
Telerik team
 answered on 08 Mar 2013
2 answers
143 views
Hi,

I have a RadScheduler control which is bound to appointments client side via a web service. I have defaulted the control to open the advanced insert/edit form when inserting/updating appointments. I would like to be able to pre-set the text in the subject text box when inserting a new appointment. I have hooked up to the OnClientFormCreated event and tried access the controls from javascript and set the text. I have tried the following:

var subjectJQueryObj = $telerik.$("[id$='Subject']");
var subjectBox = document.getElementById(subjectJQueryObj.attr('id'));
subjectBox.value = "hello";
 and also:
var subjectJQueryObj = $telerik.$("[id$='Subject']");
var subjectRadTextBox = $find(subjectJQueryObj.attr("id"));
subjectRadTextBox.set_value("hello");

Occasionally when I place an alert after these pieces of code I can see the text in the text box but once the function completes it is removed and left with a blank text box.

Can this functionality be achieved? Any help much appreciated.

Thanks

David
David Harman
Top achievements
Rank 1
 answered on 08 Mar 2013
1 answer
103 views
How do i trap this error.  What are my options. 

RequestString: /Campaign/Controls/Telerik.Web.UI.DialogHandler.aspx?DialogName=ImageManager&UseRSM=true&Skin=Web20&Title=Image+Manager&doid=6634a678-568e-4966-ac3a-b35a54923776&dpptn=

Server: EWHSERVER1291

User Identity: aXXXXXXX@XXXXXXX.com

StackTrace:

   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)

   at System.IO.FileSystemEnumerableIterator`1.MoveNext()

   at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)

   at System.IO.DirectoryInfo.InternalGetDirectories(String searchPattern, SearchOption searchOption)

   at Telerik.Web.UI.Widgets.FileSystemContentProvider.DirectoryLister.GetDirectories(DirectoryInfo directory, String parentPath)

   at Telerik.Web.UI.Widgets.FileSystemContentProvider.DirectoryLister.GetDirectory(DirectoryInfo dir, String virtualName, String location, String fullPath, String tag)

   at Telerik.Web.UI.Widgets.FileSystemContentProvider.ResolveRootDirectoryAsTree(String path)

   at Telerik.Web.UI.RadFileExplorer.HasSubFolders(String virtualPath)

   at Telerik.Web.UI.RadFileExplorer.PopulateTreeNode(RadTreeNode currNode)

   at Telerik.Web.UI.RadFileExplorer.BindExplorer()

   at Telerik.Web.UI.RadFileExplorer.OnLoad(EventArgs e)

   at System.Web.UI.Control.LoadRecursive()

   at System.Web.UI.Control.LoadRecursive()

   at System.Web.UI.Control.LoadRecursive()

   at System.Web.UI.Control.LoadRecursive()

   at System.Web.UI.Control.LoadRecursive()

   at System.Web.UI.Control.LoadRecursive()

   at System.Web.UI.Control.LoadRecursive()

   at System.Web.UI.Control.LoadRecursive()

   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)


This happens when a specific user clicks the image manager icon in the RadEditor.  It doesn't happen all the time, but it seems like it happens about once a day.  The entire call stack is isolated in code that i don't really have access to.  Are there any options for handling this?  I really don't believe the issue is that the path isn't found.  are there other reasons this error could be thrown?  Could it have to do with the number of items that are being requested?  it looks like there is a loop here in the call stack, but it's not possible to know if this error occured the first time through the loop or somewhere in the middle.  The image library for this account has a few sub-folders and almost 475 image files of various sizes.   Is it possible if we were able to cut down on the number of items in this folder (at least in the root) that this problem would go away?  I don't seem to have this issue with any other users, and i have 700+ active users who connect to upwards of 4000 different image library locations with no problems.

Looking for help or suggestions here.  When this happens the image manager popup crashes and shows our generic error page on our site.  it sends us an email with the call stack and the relevant request / form /session variables.  We are using version 2012.2.912.40, but this problems seems like it's been happening for a while now for a few older versions. 

One recent change that we did make was to change the security setting in IE to disable enhanced security configuration.  This actually did clear up a number of errors were were experiencing at random, even though the errors were happening in IIS.  one of the things that the enhanced security apparantly controls is access to UNC paths and shares and this setting seemed to have an impact on IIS.  I was hoping that it would also fix this error, but so far we're still seeing it about once a day.

The image manager folder is a virtual directory in IIS7, that Virtual Directory is mapped to a custom folder on a NAS.  We have thousands of account specifc folders and none seem to be experiencing the issues that this one is.

Thanks!
-Mark

Rumen
Telerik team
 answered on 08 Mar 2013
1 answer
100 views
Hi

I have used RadNumericTextBox  when i change to calculation in server side code.
Enter text changed tab key press next field to type still calculation firing still typing field clear. how to solve this problem?

Thanks,
Ansari.
Eyup
Telerik team
 answered on 08 Mar 2013
1 answer
83 views
Hi,

Recently I got situation to update the Telerik version 2013 (Which I installed this year) to my existing project and the existing project previously had the Telerik version  2011 or 2012 (Which I instaleed last year July or August 2012). 

After this upgrade I am getting "null" error/exeption on tab click.

Due to this issue I have rolled back to use the old/previous Telerik Version. But I am interested to use the latest/new version of Telerik conrtrols.

It will great if any one is helping me to get ride of that issue.

Thanks in advance !

Thank You
Regards
Ganapathy 
Eyup
Telerik team
 answered on 08 Mar 2013
1 answer
136 views
In this demo:

http://demos.telerik.com/aspnet-ajax/input/examples/radtextbox/firstlook/defaultvb.aspx

in the radtextbox field associated with the label "Single line:", when text is entered, a small "x" appears in the right hand side of the radtextbox.  How is this accomplished?  It is not apparent to me in the code.

Thanks,
Dan 
Eyup
Telerik team
 answered on 08 Mar 2013
1 answer
528 views
I see many other posts about this problem, but none seem to be the same problem i am having.

The scenario is simple....i have a single .ASPX page which contains a single RadComboBox and 3 or 4 usercontrols, all of which contain a single RadGrid.  Based on the selection made in the RadComboBox i want to change the datasource for each of the RadGrids in the usercontrols, and rebind them.

When the page is initially opened, the ComboBox is empty. When i select an item it fires the event as expected and everything seems to be fine, datasources are correctly modified, and RadGrids rebind. 

However, when i then change the selection by selecting a different item in the RadCombobox, the OnSelectedIndexChanged event does not fire....and i am confused as to why.  It also seems as though I have to click twice on an item to get it to make the selection....no idea why this would be the case either.

Here are the relevant bits of code:

.ASPX Page
<asp:ObjectDataSource ID="dsTerm" runat="server" SelectMethod="FetchList" TypeName="BenemTech.SHSR_DonorMgmt.DTO.TermDTO" />
 
<telerik:RadComboBox ID="cboGraduatingTerm" runat="server"
                    DataSourceID="dsTerm" DataTextField="Description"
                    DataValueField="TermID" EmptyMessage="Please Select"
                    onselectedindexchanged="cboGraduatingTerm_SelectedIndexChanged" AutoPostBack="true" AppendDataBoundItems="true">
                    <Items>
                    <telerik:RadComboBoxItem Text="Please Select" Value="-1" />
                    </Items>
                </telerik:RadComboBox>

Code Behind:
protected void Page_Load(object sender, EventArgs e)
        {
        }
 
protected void cboGraduatingTerm_SelectedIndexChanged(object o, RadComboBoxSelectedIndexChangedEventArgs e)
        {
            int termID = System.Convert.ToInt32(this.cboGraduatingTerm.SelectedValue);
 
            if (termID > 0)
            {
                pnlRecipients.Visible = true;
 
                // Need to set the value of the GraduatingTermID of the recipients control. By doing so it should also be rebound.
                this.usrSelectPSRecip.GraduatingTermID = termID;
                this.usrSelectMSRecip.GraduatingTermID = termID;
                this.usrSelectHSRecip.GraduatingTermID = termID;
                this.usrSelectUnivRecip.GraduatingTermID = termID;
            }
            else
            {
                pnlRecipients.Visible = false;
            }
       }

the user controls "usrSelectPSRecip" etc are just a simple usercontrols that each have a single Radgrid in it as well as a few additional properties.

The important thing is that the first time i select an item from the RadCombobox, it works great.......but anytime after that it doesn't fire the event.

Any suggestions as to why?

Thanks in advance.

Paul H.
Nencho
Telerik team
 answered on 08 Mar 2013
2 answers
128 views
Currently we use RadGrid (Hierarchy) with only 2 levels
Parent

ColumnA, ColumnB,                                                                                       ColumnC, ColumnD, ColumE
+ColumnF (set to total width of ColumnA and ColumnB but different data), ColumnC, ColumnD, ColumnG, ColumnH
+ColumnF (set to total width of ColumnA and ColumnB but different data), ColumnC, ColumnD, ColumnG, ColumnH
...
ColumnA,  ColumnB,                                                                                      ColumnC, ColumnD, ColumE
+ColumnF (set to total width of ColumnA and ColumnB but different data), ColumnC, ColumnD, ColumnG, ColumnH
+ColumnF (set to total width of ColumnA and ColumnB but different data), ColumnC, ColumnD, ColumnG, ColumnH
+ColumnF (set to total width of ColumnA and ColumnB but different data), ColumnC, ColumnD, ColumnG, ColumnH

I see that TreeList does the alignment already between the parent and child rows.

My question is can the child of a TreeList have different columns as the parent?
Michael
Top achievements
Rank 2
 answered on 08 Mar 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?