using Grid Control dynamically

4 posts, 0 answers
  1. Bruno
    Bruno avatar
    11 posts
    Member since:
    Jan 2009

    Posted 19 Feb 2009 Link to this post

    Hi guys,
    First of all, I need to say something about the documentation... I'm trying to fix a web application where the guy that left the company made, using Telerik (because he was confortable with it) and it did all in several files without any comments... So I'm always lost, and your documentation does not help me a bit! :(

    I miss the "Related to" and the functions and methods when using the Grid dynamically... we have the setup in a XML that is changed using a Windows Form, and this web application has to "read" that XML and create the design made, so... I can't write anything into the aspx file except a couple of tags that server as an anchor.

    Your documentation lacks (a lot) about using the Controls dynamically, so, make calls on runtime, create actions, use the events, etc...

    for example... I have in his code something like:

    if (masterTable.get_isItemInserted() == true) {
       __doPostBack('grid$ctl00$ctl02$ctl02$PerformInsertButton', '');
    }

    I wonder... where's the PerformInsertButton comes from? there is no reference at all in the code, and In some examples I can see that's something from the Grid Control.

    Is there any tutorial, Documentation, anything (money is not a problem, I can schedule and buy a couple hours of Telerik Support), to get the know how of ALL functions and events (and descriptivly what do they do) of the Telerik controls, more specifically, the Ajax Controls?

    Thank you...
  2. Daniel
    Admin
    Daniel avatar
    4945 posts

    Posted 23 Feb 2009 Link to this post

    Hello Bruno,

    Sorry to hear about your troubles.

    Your colleague is referring to the "Insert" button (I attached a screenshot). I think he wanted to make a postback through this button (mimic a button click) in order to insert an item.

    get_isItemInserted is mentioned in the following links:
    GridTableView Class Members
    get_isItemInserted()

    More information (and demos) about the programmatic creation:
    Programmatic creation
    Event sequence
    On PageInit
    On PageLoad
    Creating hierarchy programmatically

    Let us know if we can assist you further.

    Best regards,
    Daniel
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Bruno
    Bruno avatar
    11 posts
    Member since:
    Jan 2009

    Posted 23 Feb 2009 Link to this post

    That was my thinking exactly.

    My question is... what does that event do "under the hood"? 

    What is the connection between the grid and it's datasource? It get's what in that row and adds to the datasource object automatically? when should I retrieve that data so I can commit the changes to the Main Database?

    This kind'a questions... I can't find on the documentation.

    and by the way, Thank you for pointing those articles (even if I already when trough them before when searching for some solution) :)
  5. Daniel
    Admin
    Daniel avatar
    4945 posts

    Posted 23 Feb 2009 Link to this post

    Hello Bruno,

    You can find more information about the PerformInsert event below:
    PerformInsert Method
    How to fire command events from code

    To catch the event from code-behind, use the following snippet:
    protected void RadGrid1_ItemCommand(object  source, GridCommandEventArgs e) 
        if (e.CommandName == "PerformInsert"
        { 
            //your code 
        } 

    or

    if(e.CommandName == RadGrid.PerformInsertCommandName) 
    ... 

    Hope this helps.

    Best regards,
    Daniel
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
Back to Top