Get Control From RadGrid Template

6 posts, 0 answers
  1. Eng.Bassel Samman
    Eng.Bassel Samman avatar
    25 posts
    Member since:
    Oct 2008

    Posted 19 Aug 2010 Link to this post

    Dears,
    In radGrid Template I have radcombobox and a button, when user clicks the button I open a radwindow to let hime insert new choice, if user click ok in the radwindow dialog I have to add a new item to radcombobox item.
    I am call javascript function in the main page from the dialog. this function fire the ajaxRequest of RadAjaxManger.
    $find("<%= RadAjaxManager1.ClientID %>").ajaxRequest();
    In the ajaxrequest handler I tried to get the radcombobox of the radgrid template as following:
    Dim GridItem As GridDataItem = CType(grdTrngs.EditItems(0), GridDataItem)
    Dim cmbDocs As RadComboBox = GridItem.FindControl("cmbTrngsHR_DOCS_ID")
    but it didn't work and the FindControl retuen nothing.
    So, could you please help in
    Thanks in Advance
    Best Regards


     

     

     

  2. Pavlina
    Admin
    Pavlina avatar
    6084 posts

    Posted 23 Aug 2010 Link to this post

    Hello Bassel,

    Please go through the following help articles and let me know if they help to get the RadComboBox control of the RadGrid template:
    Referencing controls in grid row/edit form
    Accessing cells and rows

    Greetings,
    Pavlina
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Eng.Bassel Samman
    Eng.Bassel Samman avatar
    25 posts
    Member since:
    Oct 2008

    Posted 23 Aug 2010 Link to this post

     

    Hello Pavlina,
    I could not find the answer, because the examples in the links are accessing the RadGrid Editing Template's controls via e (event argument), unfortunately I can’t do that because I need to update the radcombobox items after RadWindow closing so I am calling a javascript function in the main page from the dialog. This function fires the ajaxRequest of RadAjaxManger.

    $find("<%= RadAjaxManager1.ClientID %>").ajaxRequest();

    the event arguments of ajaxRequest handler don't have any reference to RadGrid Editing Template's controls.

    In my case I have to access the controls without using any event arguments, So I added this thread.

    Thanks in Advance
    Best Regards

  5. Pavlina
    Admin
    Pavlina avatar
    6084 posts

    Posted 26 Aug 2010 Link to this post

    Hello,

    Check out the following code library submission which explains on how to access the controls embedded inside templates in the grid:
    Accessing server controls in a grid template on the client

    Regards,
    Pavlina
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  6. Eng.Bassel Samman
    Eng.Bassel Samman avatar
    25 posts
    Member since:
    Oct 2008

    Posted 29 Aug 2010 Link to this post

    Dears,
    I found and used the Telerik.Web.UI.RadComboBox.ComboBoxes.
    In my case I have a radgrid template with one RadComboBox, when I call Telerik.Web.UI.RadComboBox.ComboBoxes (of course in the client side) it returned the RadCombobox control and I managed to update its items.
    I tried to get more information about this useful array, but I couldn't. every thing I found was in:
    http://www.telerik.com/help/aspnet-ajax/combo_clientsidebasics.html
    I need to know:
    - If it returns all Radcomboboxes in the RadGrid template, and what it will return if I have to RadGrid and each one of them has its template with more than one combo ?
    - Does it return just Radcomboboxes in RadGrid templates ?

    Thanks in Advance
    Best Regards

  7. Pavlina
    Admin
    Pavlina avatar
    6084 posts

    Posted 01 Sep 2010 Link to this post

    Hello Bassel,

    Telerik.Web.UI.RadComboBox.ComboBoxes can be used to obtain an array containing all the client-side combobox instances. You can review the help articles below for additional information.
    http://www.telerik.com/help/aspnet-ajax/combo_clientsideradcombobox.html
    http://www.telerik.com/help/aspnet-ajax/find-combobox-client-side-embedded-another-control.html

    Kind regards,
    Pavlina
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017