0

I have a gridview column of type text.

<sjg:gridColumn id="vName" name="variableName" index="variableName" title="Variable_Name" sortable="true" editable="true" edittype="text"/>

I want to append a string "C:\" to the dynamic textbox contents. How do I do it? I tried using this Script but it is not Working

var myString="C:\";
$('#vName').append(myString); 
Maverick
  • 1
  • 1

1 Answers1

0

You could simply setup a custom format function:

Inside the colModel of the column

   ....
   formatter: CustomFormatFunction, unformat: CustomUnFormatFunction},
   ....

Custom Format Functions:

function CustomFormatFunction(cellval, opts, rowObject, action) {
   return "c:\" + cellval;
}

function CustomUnFormatFunction(cellval, opts, rowObject, action) {
   return cellval; //or manipulate the string to remove the "c:\"
}
Mark
  • 3,123
  • 4
  • 20
  • 31