Remove_row help me please im from korean!

Hi I am from Korean and my name is Park Jun-ho.

I am not good at English.

My question is that the English grammar is not right.

Please understand me!

I’m going to ask you now!

First I’ll show you the program source I’m going to ask!

This is the source screen.


If you copy and paste a number tag to an Excel copy, this happens. Two rows are empty, two rows of rows, and four lines can be created. So I want to delete the empty line!

As a result, I want to make this happen!

As a result, I want to delete two rows of blank lines!

From now on, I want to delete the blank lines when I copy and paste them!

I want you to help me.!

Though English is strange, please let me know this!

In Korea, there is no information about it.

I’ll wait for your answer.

Hi @cocaboy

in your code we are missing the phoneValidatorRegexp part. I have added the code to JSFiddle http://jsfiddle.net/handsoncode/9Lsxt0oc/ Can you please update the demo with the renderer?

ps. if you wish to have spare rows at the bottom of the table and erase empty rows above you can use the alter() method in the afterChange hook.

Thank you for answering my poor English skills!

thank you!

If you look at the sauce carefully,

PhoneValidator is present in the source!

phoneValidatorRegexp = /^01([0|1|6|7|8|9]?)-?([0-9]{3,4})-?([0-9]{4})$/;

  columns: [
	{type: 'text'},
	{type: 'text', validator: phoneValidatorRegexp,allowInvalid: true} //유효성검사
  ],

In a word

When copying and pasting

If you look at the picture,

The first line is the data.

There’s no content in the second line.

There’s data on the third line.

I want to delete the second line automatically.

So

I want to automatically remove the blank line when I paste it.

You understand what I mean?

Help me, please.

Give me the correct answer.

//
I tested it.

It’s a tested source.

From the source tested,

I get rid of the empty line I want.

But

There’s an error.

The error contents are

Uncaught TypeError: Cannot read property ‘1’ of undefined

This is it.

I thought about it.

I think the way I tested this test is wrong.

I need you to check it out and tell me the right way to do it.

Please help me.!

I’ll wait for reply!

you’re right the phoneValidatorRegexp has been marked missing as there’s no var in line 7.

I think that this demo might come in handy http://jsfiddle.net/w8r6wbs7/

Thank you so much

I’ll ask you one more thing.

01012345678

I want to change this

010-1234-5678

Source to reference.
send_to_num = send_to_num.replace(/^(01[016789]{1}|02|0[3-9]{1}[0-9]{1})-?([0-9]{3,4})-?([0-9]{4})$/, “$1-$2-$3”);

I want to add - to the situation.

[-] I want to add only those kids who have not entered!

automatic!

This problem is too difficult for me.

I will wait for an answer

If you want to manipulate the way the data is presented you need a custom renderer. If the number and placement of - signs are always the same you can use the slice() method on the value.

Here is an example http://jsfiddle.net/4Lgyognv/

Thank you very much for your reply.

From my company…

I told you to use this, but I did not have much information.

When you need help

You helped me a lot.


I’ll ask you one more thing.

If there are duplicate values

I want to delete a line with duplicate values.

I want you to know this.

The demo source you gave me or my source!!!

Let me know by reference.

please.!!

I admire you.

Let me know the right answer.

I will wait

T_T

We do not have any built-in logic for removing duplicated data, but I think I have something that can help.

Firstly I have added the beforeChange hook that via indexOf method checks if the following value is already in the columns. And if it is, the beforeChange returns false.

  beforeChange: function(changes, src){
    var myCol = hot.getDataAtCol(1),
    newValue = changes[0][3];
    
      if(myCol.indexOf(newValue) < 0){
      	// new value
      } else {
      	// duplicated value
        return false
      }
    }

but it won’t block an action of pasting data to more than one cell. So I have created a function that marks all duplicated values in the afterChange hook.

Here is the result http://jsfiddle.net/6jzjjt2j/

I keep asking.
So I’m sorry.

Source to reference!

As I want.

It’s becoming an implementation.
but.
It’s not finished yet.

Referring to the source…

now!

There’s nothing wrong with adding it to the last line.

but

01012345678 Conversion automatically changes to 010-1234-5678

It is 010-1234-5678 that is displayed outside html

But if you select a cell and look at the value

01012345678 is listed

I want to specify a value.

010-1234-5678 I want to specify this

The value in the cell

I will wait for an answer

So if you want to set a value to the set - not only change the way a user sees it you need to use the setDataAtCell method and skip the renderer totally. Unfortunately, I do not have any demo for this situation.