|
#1
|
|||
|
|||
|
In SmartClient whenever I use radio group, I specify a value map, all the radio options are displayed together (one after other) in order as they are mentioned in value map.
Is there any way by which I can insert any other component in between these options? I want something like, 1st radio option then a select box, 2nd option then a select box and so on... |
|
#2
|
|||
|
|||
|
Hi vgattani,
Please visit my blog for the solution. http://sv-technical.blogspot.in/2012...s-between.html I am also pasting the excerpt of the code for your ready reference. isc.DynamicForm.create ({ autoDraw: true, fields: [ { name: "Radio", title: "Title One", type: "radioGroup", valueMap: {"1":"Yes"} }, { name: "Shailendra", defaultValue: "Enjoy" }, { name: "Radio", title: "Title Two", type: "radioGroup", valueMap: {"2":"No"} } ] }); Last edited by sverma; 26th Apr 2012 at 08:39.. Reason: Forget to add title :) |
|
#3
|
|||
|
|||
|
Hi Sverma,
Code:
var radioForm = isc.DynamicForm.create ({
autoDraw: true,
numCols : 3,
cellPadding : 2,
fields : [
{
title:"Itema",
type:"radioGroup",
name:"radio",
valueMap:
{
"a":""
},
showTitle:false
} ,
{
title:"Itemb",
type:"radioGroup",
name:"radio",
valueMap:
{
"b":""
},
showTitle:false
} ,
{
title:"Itemc",
type:"radioGroup",
name:"radio",
valueMap:
{
"c":""
},
showTitle:false
}
]
});
radioForm.setValue("radio","b"); or radioForm.setValue("radio",{"b":""}) fail to set current value. why? The correct what should I do? ths. Last edited by yang.xin; 27th Apr 2012 at 21:28.. |
|
#4
|
|||
|
|||
|
Hi Sverma,
Code:
var radioForm = isc.DynamicForm.create ({
autoDraw: true,
numCols : 3,
cellPadding : 2,
fields : [
{
title:"Itema",
type:"radioGroup",
name:"radio",
valueMap:
{
"a":""
},
showTitle:false
} ,
{
title:"Itemb",
type:"radioGroup",
name:"radio",
valueMap:
{
"b":""
},
showTitle:false
} ,
{
title:"Itemc",
type:"radioGroup",
name:"radio",
valueMap:
{
"c":""
},
showTitle:false
}
]
});
radioForm.setValue("radio","b"); or radioForm.setValue("radio",{"b":""}) fail to set current value. why? The correct what should I do? ths |
|
#5
|
|||
|
|||
|
try this:
setValue is causing some ambiguity and you need to handle this via changeHandler. function t (form, item, value, oldValue) { form.getItem ("Radio2").clearValue (); } function t1 (form, item, value, oldValue) { form.getItem ("Radio1").clearValue (); } isc.DynamicForm.create ({ ID: "dd", autoDraw: true, fields: [ { name: "Radio1", title: "Title One", type: "radioGroup", redrawOnChange:true, change: function (form, item, value, oldValue) {t (form, item, value, oldValue);}, valueMap: ["Yes"] //valueMap: {"1":"Yes"} }, { name: "Shailendra", defaultValue: "Enjoy" }, { name: "Radio2", title: "Title Two", type: "radioGroup", redrawOnChange:true, change: function (form, item, value, oldValue) {t1 (form, item, value, oldValue);}, valueMap: ["No"] //valueMap: {"2":"No"} }, { name: "bb", title: "bbbbb", type: "button", click: function (form, item) {form.setValues ({"Shailendra": "have fun", "Radio1": "Yes"}); } } ] }); |
![]() |
| Thread Tools | Search this Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| setOptionalDataSource on ComboboxItem fires queries rapidly. Is this a bug? | curiousgally | Smart GWT Technical Q&A | 3 | 30th Nov 2011 09:46 |
| Datasource used for two selectitem with different fetch operations works unexpectedly | curiousgally | Smart GWT Technical Q&A | 2 | 18th Nov 2011 14:13 |
| Can we have select all check box option in multiple select item in smartgwt-2.2 | kodanhunt | Smart GWT Technical Q&A | 1 | 8th Jul 2010 09:05 |
| how select radio button dynamically | prabu_dvk | Technical Q&A | 2 | 7th Dec 2008 23:42 |
| how to get select box and text box intact | vidyab | Technical Q&A | 1 | 26th Nov 2008 04:45 |