on 03-04-2011 1:22 PM
Can you please send the code for adding row selection event for grid through javascript .
Applet events need to be declared in the html, not afterwards with javascript.
Add the following in your html applet definition for the iGrid (assumes name of iGrid is 'SampleGrid'):
<PARAM NAME="SelectionEvent" VALUE="SampleGrid_Selected">
Then in a javascript block add the function using the name in the VALUE portion and as Mike mentioned, the script assistant and help docs will show you other accessor methods commonly used with the selection event in the iGrid.
Regards,
Jeremy
P.S. - I tried posting the function but it wouldn't allow me to post it, even as code...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
A selection event happens when a user clicks on a row or cell in a grid (or other applet object). This will set the selected property to the selected row or cell.
You can select a row programmatically as I mentioned above. Or you can use several other properties which are identified in the script assistant which I detailed access to.
I do not understand what you are trying to do, so if you could provide more or better detail of your goal, I or others can probably assist you better.
Regards,
Mike
I am giving the code below for instance.
function rowSelect()
{ document.appname.setQueryTemplate("empQuery");
document.appname.setDisplayTemplate("empGrid");
appname.getQueryObject.setParam(1,'raju');
here i need to add selection event for grid how do i do this please help me
appname.refresh();
}
Doesn't look like you can set the event through javascript.
An alternative might be to have a global variable of what function you want to call and then executing that function in a common selection event function.
var selectionFunction = "Func1()";
function initializeGrid()
{
applet.setQueryTemplate("path to template");
selectionFunction = "Func2(\'Param1\')";
applet.refresh();
}
function grid1Selected()
{
eval(selectionFunction);
}
This would give you a little more flexability since you can set parameters in the calling function.
getGridObject().setAllowSelection(boolean) to turn on Selection event functionality.
getGridObject().setSelectedRow(int) to assign a row to show as selected.
Regards,
Mike
NOTE: If you are working in 12.1 these methods are easily looked up in the workbench.
Open the workbench, open or create a web page.
At the bottom center of the window containing the webpage you will see a series of dots (5).
Click and hold and drag upward. This opens the script assistant.
I will leave it to you to explore its features.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
11 | |
6 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.