본문 바로가기
IT/nexacro

nexacro 대소문자 구분없이 필터하기

by heavenLake 2021. 2. 4.
반응형

 

nexacro 대소문자 구분없이 필터하기

 
var sFilter = "Column1.toString().toUpperCase().indexOf('" + this.Edit00.value.toUpperCase() + "') >= 0";
this.Dataset00.filter(sFilter);
 

 

 

Source

<?xml version="1.0" encoding="utf-8"?>
<FDL version="2.0">
  <Form id="sample_dataset_08" width="1280" height="720" titletext="대소문자 구분 없이 필터링하기" locale="en_US" onload="sample_dataset_03_onload">
    <Layouts>
      <Layout height="720" width="1280">
        <Grid id="Grid00" taborder="0" left="35" top="30" width="185" height="500" binddataset="Dataset00" autofittype="col">
          <Formats>
            <Format id="default">
              <Columns>
                <Column size="80"/>
                <Column size="80"/>
              </Columns>
              <Rows>
                <Row band="head" size="24"/>
                <Row size="24"/>
              </Rows>
              <Band id="head">
                <Cell text="Column0"/>
                <Cell col="1" text="Column1"/>
              </Band>
              <Band id="body">
                <Cell text="bind:Column0"/>
                <Cell col="1" text="bind:Column1"/>
              </Band>
            </Format>
          </Formats>
        </Grid>
        <Button id="Button00" taborder="1" text="uppercase" left="230" top="70" width="96" height="38" onclick="Button00_onclick"/>
        <Edit id="Edit00" taborder="2" left="230" top="30" width="125" height="32"/>
        <Button id="Button01" taborder="3" text="sensitive case" left="230" top="115" width="96" height="35" onclick="Button01_onclick"/>
      </Layout>
    </Layouts>
    <Objects>
      <Dataset id="Dataset00">
        <ColumnInfo>
          <Column id="Column0" type="STRING" size="256"/>
          <Column id="Column1" type="STRING" size="256"/>
        </ColumnInfo>
        <Rows>
          <Row>
            <Col id="Column0">63034</Col>
            <Col id="Column1">북촌리</Col>
          </Row>
          <Row>
            <Col id="Column0">63035</Col>
            <Col id="Column1">조천리</Col>
          </Row>
          <Row>
            <Col id="Column0">63036</Col>
            <Col id="Column1">함덕리</Col>
          </Row>
          <Row>
            <Col id="Column0">63037</Col>
            <Col id="Column1">예초리</Col>
          </Row>
          <Row>
            <Col id="Column0">63038</Col>
            <Col id="Column1">금능리</Col>
          </Row>
          <Row>
            <Col id="Column0">63039</Col>
            <Col id="Column1">금등리</Col>
          </Row>
          <Row>
            <Col id="Column0">63040</Col>
            <Col id="Column1">대서리</Col>
          </Row>
          <Row>
            <Col id="Column1">청수리</Col>
            <Col id="Column0">63043</Col>
          </Row>
          <Row>
            <Col id="Column1">묵리</Col>
            <Col id="Column0">63044</Col>
          </Row>
          <Row>
            <Col id="Column1">영흥리</Col>
            <Col id="Column0">63045</Col>
          </Row>
          <Row>
            <Col id="Column1">저지리</Col>
            <Col id="Column0">63046</Col>
          </Row>
          <Row>
            <Col id="Column1">하귀2리</Col>
            <Col id="Column0">63047</Col>
          </Row>
          <Row>
            <Col id="Column1">조수리</Col>
            <Col id="Column0">63048</Col>
          </Row>
          <Row>
            <Col id="Column1">하귀1리</Col>
            <Col id="Column0">63049</Col>
          </Row>
          <Row>
            <Col id="Column1">연평리</Col>
            <Col id="Column0">63050</Col>
          </Row>
          <Row>
            <Col id="Column1">신창리</Col>
            <Col id="Column0">63051</Col>
          </Row>
          <Row>
            <Col id="Column1">용수리</Col>
            <Col id="Column0">63053</Col>
          </Row>
          <Row>
            <Col id="Column1">와산리</Col>
            <Col id="Column0">63054</Col>
          </Row>
          <Row>
            <Col id="Column1">와흘리</Col>
            <Col id="Column0">63055</Col>
          </Row>
          <Row>
            <Col id="Column1">상대리</Col>
            <Col id="Column0">63056</Col>
          </Row>
          <Row>
            <Col id="Column1">명월리</Col>
            <Col id="Column0">63057</Col>
          </Row>
          <Row>
            <Col id="Column1">동명리</Col>
            <Col id="Column0">63058</Col>
          </Row>
          <Row>
            <Col id="Column1">금악리</Col>
            <Col id="Column0">63059</Col>
          </Row>
          <Row>
            <Col id="Column1">귀덕리</Col>
            <Col id="Column0">63060</Col>
          </Row>
          <Row>
            <Col id="Column1">낙천리</Col>
            <Col id="Column0">63062</Col>
          </Row>
          <Row>
            <Col id="Column1">고산리</Col>
            <Col id="Column0">63064</Col>
          </Row>
          <Row>
            <Col id="Column1">두모리</Col>
            <Col id="Column0">63065</Col>
          </Row>
          <Row>
            <Col id="Column1">대흘리</Col>
            <Col id="Column0">63067</Col>
          </Row>
          <Row>
            <Col id="Column1">대림리</Col>
            <Col id="Column0">63339</Col>
          </Row>
          <Row>
            <Col id="Column1">신촌리</Col>
            <Col id="Column0">63340</Col>
          </Row>
          <Row>
            <Col id="Column1">선흘리</Col>
            <Col id="Column0">63341</Col>
          </Row>
          <Row>
            <Col id="Column1">신흥리</Col>
            <Col id="Column0">63342</Col>
          </Row>
          <Row>
            <Col id="Column1">교래리</Col>
            <Col id="Column0">63343</Col>
          </Row>
          <Row>
            <Col id="Column1">판포리</Col>
            <Col id="Column0">63345</Col>
          </Row>
          <Row>
            <Col id="Column1">한림리</Col>
            <Col id="Column0">63346</Col>
          </Row>
          <Row>
            <Col id="Column1">성산리</Col>
            <Col id="Column0">63347</Col>
          </Row>
          <Row>
            <Col id="Column1">협재리</Col>
            <Col id="Column0">63348</Col>
          </Row>
          <Row>
            <Col id="Column1">월림리</Col>
            <Col id="Column0">63350</Col>
          </Row>
          <Row>
            <Col id="Column1">월령리</Col>
            <Col id="Column0">63351</Col>
          </Row>
        </Rows>
      </Dataset>
    </Objects>
  </Form>
</FDL>

Script

this.Button00_onclick = function(obj:nexacro.Button,e:nexacro.ClickEventInfo)
{
	this.Dataset00.filter();
    var sFilter = "Column1.toString().toUpperCase().indexOf('" + this.Edit00.value.toUpperCase() + "') >= 0";
    this.Dataset00.filter(sFilter);
}

this.Button01_onclick = function(obj:nexacro.Button,e:nexacro.ClickEventInfo)
{
	this.Dataset00.filter();
    var sFilter = "Column1.toString().indexOf('" + this.Edit00.value + "') >= 0";
    this.Dataset00.filter(sFilter);
};

 

반응형

댓글