|
sowritrpkkl
|
 |
« on: August 27, 2008, 10:24:17 PM » |
|
Hi,
I want to load the grid after the user select a combo box value.
For example:
I have a month combobox, after selecting the month from the combobox depending upon the month selected the data should be displayed in the grid.
Please help me how to do this.
|
|
|
|
|
Logged
|
|
|
|
|
steven
|
 |
« Reply #1 on: August 28, 2008, 09:01:48 AM » |
|
That's easy.
Html code here
Javascript code here
|
|
|
|
|
Logged
|
Sigma AJAX Data Grid - Easy to Integrate with PHP, ASP Classic, ASP.NET & Java Sigma PHP Ajax Framework - WYSIWYG GUI Builder With Tree, Grid, Treegrid, Dialog, Tab & More Component
|
|
|
|
sowritrpkkl
|
 |
« Reply #2 on: August 28, 2008, 09:50:49 PM » |
|
Thanks a lot........
|
|
|
|
|
Logged
|
|
|
|
|
sowritrpkkl
|
 |
« Reply #3 on: September 19, 2008, 03:34:16 AM » |
|
Hi, The grid loaded perfect, but i want to change a "grid Options". like i need to hide save button and also i need to change some column as non editable. How to do this. Kindly help me. I am using the below code.
function loadData(){ var grid=Sigma.$grid(grid1); grid.loadUrl = "../php/projectActivity.php; var colsOptionNonEdit = [ {id: 'account' , header: "Account" , width :120}, {id: 'project' , header: "Project" , width :120}, {id: 'manager' , header: "Manager" , width :150}, ]; grid.gridOptions = { showAddTool : false, columns : colsOptionNonEdit };
grid.load(); }
but the grid options are not working.
Kindly do the needful
|
|
|
|
|
Logged
|
|
|
|
|
steven
|
 |
« Reply #4 on: September 22, 2008, 02:22:34 AM » |
|
That's easy. The following gridOption will show nav and pagesize only. grid.gridOptions = { toolbarContent: 'nav | pagesize'. columns : colsOptionNonEdit };
'nav | pagesize | reload | add del save | print | filter chart | info' stand for all the buttons. You can hide some of them or change their order.
|
|
|
|
|
Logged
|
Sigma AJAX Data Grid - Easy to Integrate with PHP, ASP Classic, ASP.NET & Java Sigma PHP Ajax Framework - WYSIWYG GUI Builder With Tree, Grid, Treegrid, Dialog, Tab & More Component
|
|
|
|
sks
|
 |
« Reply #5 on: December 18, 2008, 12:04:39 PM » |
|
That's easy.
Html code here
Javascript code here
Sorry? but now it's not working! in v2.1! We may use setContent:function(data). loadUrl may use only like:
|
|
|
|
|
Logged
|
|
|
|
|
red4
|
 |
« Reply #6 on: March 20, 2009, 12:10:29 PM » |
|
I need to do exactly as said in this post but I am not able to recover the value of the input text might give me a hand? My loadURL:
|
|
|
|
|
Logged
|
|
|
|
|
pinkyto0o
|
 |
« Reply #7 on: March 22, 2009, 06:17:13 AM » |
|
You can pass the value of the get variable using a parameter: parameters : {name:"value"}
|
|
|
|
|
Logged
|
|
|
|
|
red4
|
 |
« Reply #8 on: March 23, 2009, 03:32:54 AM » |
|
Ok but how create it? must receive the variable without page refresh, or need to come from a static combo
thanks
Red4
|
|
|
|
|
Logged
|
|
|
|
|
humi
|
 |
« Reply #9 on: March 23, 2009, 04:56:35 AM » |
|
If you need to pass a dynamic variable to the controller, do this as steven said: Example of PHP in Grid. Then in controller use the variable like this: I don't know ASP so I cannot help with exact commands. About the static combo: http://www.sigmawidgets.com/products/sigma_grid2/docs/sigma_grid.html#addParametersSomething Like this maybe?
|
|
|
|
« Last Edit: March 23, 2009, 05:25:01 AM by humi »
|
Logged
|
|
|
|
|
red4
|
 |
« Reply #10 on: March 23, 2009, 08:07:13 AM » |
|
This last example that you have to be exactly what I need but when I road it does not work. Actually I need to get data from a combo fix and then have it filter the xml
thanks
My code: The function loadurl in loaddata not pass the parameters to loadurl in gridoption
If someone can help me I would be very grateful
|
|
|
|
« Last Edit: March 23, 2009, 09:36:40 AM by red4 »
|
Logged
|
|
|
|
|
humi
|
 |
« Reply #11 on: March 23, 2009, 02:06:46 PM » |
|
This looks better. You will need to get the variables from the json array in the controller.
example in PHP:
|
|
|
|
|
Logged
|
|
|
|
|
red4
|
 |
« Reply #12 on: March 24, 2009, 04:08:24 AM » |
|
Hi humi Ok this is exactly what I need but I believe that has something wrong, you could check? Here I made a debug below: Erro: missing ) after argument list File Source: api/controler.php: 62, Coluna: 26 Source Code: grid.addParameters("test":i, "inc":"port", "tab":"Vw_Vehicles");
|
|
|
|
|
Logged
|
|
|
|
|
humi
|
 |
« Reply #13 on: March 24, 2009, 04:13:40 AM » |
|
|
|
|
|
|
Logged
|
|
|
|
|
red4
|
 |
« Reply #14 on: March 24, 2009, 04:23:09 AM » |
|
Ok thanks ok now he is working but ... What I understand is the following these parameters they are not passed within the variable below, note: The JSON recover it via get or post? _gt_json
{"recordType":"object","pageInfo":{"pageSize":10,"pageNum":1,"totalRowNum":200,"totalPageNum":20,"startRowNum" :1,"endRowNum":10},"columnInfo":[{"id":"dt","header":"Data","fieldName":"dt","fieldIndex":"dt","sortOrder" :null,"hidden":false,"exportable":true,"printable":true},{"id":"prefixo","header":"Prefixo","fieldName" :"prefixo","fieldIndex":"prefixo","sortOrder":null,"hidden":false,"exportable":true,"printable":true },{"id":"sentido","header":"Sentido","fieldName":"sentido","fieldIndex":"sentido","sortOrder":null,"hidden" :false,"exportable":true,"printable":true}],"sortInfo":[],"filterInfo":[],"parameters":{},"action":"load" }
|
|
|
|
|
Logged
|
|
|
|
|