This is a migrated thread and some comments may be shown as answers.

Error with RadGrid with RadCombo

4 Answers 79 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Praveen
Top achievements
Rank 1
Praveen asked on 10 Feb 2015, 09:55 AM
Getting below error while binding Combo Box on demand in RadGrid with BatchEdit Mode. Please help

 The target 'ctl11$RadGridSearchResult$ctl11_RadGridSearchResult_ctl00_Actplc$Actplc' for the callback could not be found or did not implement ICallbackEventHandler. 

public class CreateRadComboTemplate : ITemplate
    {
        private string tempName;
        private int catId;
        public CreateRadComboTemplate(string templateName, int catId)
        {
            this.tempName = templateName;
            this.catId = catId;
        }

        public void InstantiateIn(System.Web.UI.Control container)
        {
            RadComboBox rcBox = new RadComboBox();
            rcBox.ID = this.tempName;
            rcBox.ItemsRequested += rcBox_ItemsRequested;
            rcBox.EnableAutomaticLoadOnDemand = true;
            container.Controls.Add(rcBox);
        }

        void rcBox_ItemsRequested(object sender, RadComboBoxItemsRequestedEventArgs e)
        {
            //throw new NotImplementedException();
        }
    }

4 Answers, 1 is accepted

Sort by
0
Angel Petrov
Telerik team
answered on 13 Feb 2015, 06:56 AM
Hello Praveen,

Without having a better understanding of the exact implementation it would be hard to tell why are you experiencing such behavior. That said please share with us the entire markup and code-behind of the page.

Additionally have in mind that when batch editing is used the templates should inherit from IBindableTemplate. Please modify the templates definition and let us know if this has helped you resolve the matter.

Regards,
Angel Petrov
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Praveen
Top achievements
Rank 1
answered on 16 Feb 2015, 09:45 AM

I am getting lot of issues. Could you please provide me sample code for my scenario as explain below

I have dynamic search dataset (columns can be change) and that need to bind with grid for batch edit (Cell). Based on column type, I need to bind controls for batch editing. 
For example, let’s say 
1. For column type INT, I need to bind textbox for batch edit mode, 
2. for text (varchar), need to bind dropdown
3. for text (varchar(max)), need to bind RadEditor

Thanks
Praveen Tomar


0
Angel Petrov
Telerik team
answered on 19 Feb 2015, 07:58 AM
Hello Praveen,

I am sorry to say but providing fully runnable solutions that target custom scenarios like the described is not supported. That said I would like to ask you to share with us the problematic page contents alongside with a detail description of the problems so we could examine what is causing them.

As for the functionality itself it looks like you want to dynamically change the editors according to the search results. This can be achieved by following one of the approaches described below.
  1. Dynamically change the templates or columns according to the search result. Have in mind that if templates will be used the search result should be available in the OnInit event as defining templates programmatically on a later stage will cause problems. The sample principle applies if the columns will be dynamically changed with the slight difference that here you can use the page load event. I strongly suggest examining this help article which explains in detail how one can programmatically create the grid structure.
  2. Initialize all the editor types in a template column and manually handle the editing process on the client by subscribing to the four batch editing events(OnBatchEditGetCellValue, OnBatchEditSetCellValue, OnBatchEditGetEditorValue, OnBatchEditSetEditorValue). The idea here is to show only one editor and use it to edit the cell contents. An example of such type of manual handling of the edit process can be found here.


Regards,
Angel Petrov
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Jaya
Top achievements
Rank 1
answered on 19 Feb 2015, 08:37 AM
Hi
Can u solve this issue

http://www.telerik.com/forums/how-to-find-control-id-telerik-radgrid
Tags
Grid
Asked by
Praveen
Top achievements
Rank 1
Answers by
Angel Petrov
Telerik team
Praveen
Top achievements
Rank 1
Jaya
Top achievements
Rank 1
Share this question
or