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

using Grid Control dynamically

3 Answers 96 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Bruno
Top achievements
Rank 2
Bruno asked on 20 Feb 2009, 04:28 AM
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...

3 Answers, 1 is accepted

Sort by
0
Daniel
Telerik team
answered on 23 Feb 2009, 11:59 AM
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.
0
Bruno
Top achievements
Rank 2
answered on 23 Feb 2009, 01:00 PM
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) :)
0
Daniel
Telerik team
answered on 23 Feb 2009, 01:22 PM
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.
Tags
Grid
Asked by
Bruno
Top achievements
Rank 2
Answers by
Daniel
Telerik team
Bruno
Top achievements
Rank 2
Share this question
or