<PUBLIC:COMPONENT>
<PUBLIC:PROPERTY NAME="grid"/><!--Return to the current Grid. Through this property, you can access the relevant information of the current Grid-->
<!--The definition of DataColumn in .Net is similar to that of -->
<PUBLIC:PROPERTY NAME="columnName"/> <!--Column Name-->
<PUBLIC:PROPERTY NAME="dataType"/><!--Data type, such as, remains consistent with the DataType value on SmartGridColumn-->
<PUBLIC:PROPERTY NAME="allowNull"/><!--Is it allowed to be empty-->
<PUBLIC:PROPERTY NAME="scale"/>
<PUBLIC:PROPERTY NAME="precision"/><!--Precision, mainly used for digital types-->
<PUBLIC:PROPERTY NAME="maxLength"/><!--Maximum length, mainly used for text-->
<PUBLIC:PROPERTY NAME="extendedProperties"/><!--The xml string is generally used, because when storing a lot of information, parsing is very convenient->
<PUBLIC:METHOD NAME="select"/><!--Select all. Since the reference editing box consists of INPUT and IMG, it is necessary to overwrite (overload) the select method -->
<PUBLIC:METHOD NAME="focus"><!--Set focus. Since the reference editing box consists of INPUT and IMG, it is necessary to rewritten (overload) the focus method-->
<PUBLIC:PROPERTY NAME="input" GET="getInput"/>
<PUBLIC:PROPERTY NAME="value" GET="getValue" PUT="setValue"/>
<PUBLIC:METHOD NAME="cellDataCheck"/>
</PUBLIC:COMPONENT>
<script language="javascript">
var id = null;
//There are generally two values in reference, one is the displayed Text and the other is the id. idColumn specifies the Grid column of id
var idColumn = null;
var refUrl = null;
var refIdColumn = null;
var refNameColumn = null;
var extendedProp = ;
if(extendedProp!= null && typeof(extendedProp) != "undefined")
{
var dom = new ActiveXObject("");
(extendedProp);
idColumn = ("idColumn");
var refInfo = ;
refIdColumn = ("idColumn");
refNameColumn = ("nameColumn");
refUrl = ("url");
}
var btn = ("IMG")[0];
= btnClick;
function btnClick()
{
var ret = (refUrl,self,'scrolling:no;resizable:no;status:no;dialogWidth:550px;dialogHeight:450px;center:1');
if(ret != null)
{
var el = ;
if(el != null)
{
= (refNameColumn);
if(idColumn != null && idColumn!="")
{
id = (refIdColumn);
(,idColumn,id);
}
}
}
//--------------------------------------------------------------
(,"num",100);//Assignment example
(,"price",10);//Assignment example
//-------------------------------------------------------------
}
var statusText = "";
var input = ("INPUT")[0];
= inputOnBlur;
function inputOnBlur()
{
= statusText; //The status of the Grid status bar can be modified by using it.
}
function getInput()
{
return input;
}
//This method is called by SmartGrid when displaying the editor. Since the reference editor consists of elements such as INPUT, IMG, etc., you need to tell SmartGrid which element should be given focus when setting the editor focus!
function focus()
{
();
}
//This method is called by SmartGrid when selecting all the editors. Since the reference editor consists of elements such as INPUT, IMG, etc., you need to tell SmartGrid how to select all when selecting the contents of the editor all!
function select()
{
();
}
function setValue(val)
{
= val;
if(idColumn != null)
{
var r = ;
id = (r,idColumn);
}
}
function getValue()
{
return ;
}
function cellDataCheck(args)
{
return ;
}
</script>