Forum
22:54
08/10/2013
Hi All,
I have a task to create a editable jqgrid and need to have one of the cell column be dynamic type.
That cell column can be checkbox, date piker, select, multiline text box, and single line text box.
Can that be done?
example:
column 1. Name - textbox.
column 2. Type - select option option 1. Text 2. MultiText, 3. Number, 4. Yes/No 5. Date 6. Select Option.
column 3. Default Value - This cell is depent on the Type column, so if the type column is Date it will give the Date picker, if it is Yes/No it should give a checkbox, if it is Text, then it give the text box, and the last if it is select option then it will populate with the selection option list.
Can this be done? Any suggestion will be greatly appreciated.
Currently, I use the datainit.
var rowId = $('#customFieldsGrid').jqGrid('getGridParam', 'selrow');
var rowData = $('#customFieldsGrid').jqGrid('getRowData', rowId);
switch (rowData.FieldTypeID()) {
case 6: // Date
$(elem).datepicker();
break;
case 7: // select option
-- Crurrently I show another popup screen and have the option for user to select.
-- but it will be nicer to have it in the grid's cell. can this be done?
break;
}
Thanks,
Chai
Most Users Ever Online: 715
Currently Online:
38 Guest(s)
Currently Browsing this Page:
1 Guest(s)
Top Posters:
OlegK: 1255
markw65: 179
kobruleht: 144
phicarre: 132
YamilBracho: 124
Renso: 118
Member Stats:
Guest Posters: 447
Members: 11373
Moderators: 2
Admins: 1
Forum Stats:
Groups: 1
Forums: 8
Topics: 10592
Posts: 31289
Newest Members:
, razia, Prankie, psky, praveen neelam, greg.valainis@pa-tech.comModerators: tony: 7721, Rumen[Trirand]: 81
Administrators: admin: 66