views:

26

answers:

1

I have a masked radgrid column for a phone number on a bigint column. The mask appropriately masks the edit form. It does not mask the data in the standard grid view.

I understand that this is the intended behavior... however I'd like it to mask the displayed data too.

Any ideas?

EDIT: That is to say, as a standard grid item, I'd like to also appear in the mask.

A: 

I think I get your point to show that the input is masked in non-editable grid cell - simply include the characters from the phone mask when you update the grid source (as part of the text content). That should do the trick.

Dick Lampard
This is not viable because the data is stored as a bigint (and it must be, for the masked column to work properly).... What I can do is create two columns... one being a formatted string and the other not (but only displaying the appropriate one) but I think there should be different way..... See the DB has 1231231234, a `BIGINT` and it's masked by the column as (###) ###-#### which displays (123) 123-1234... but the mask only works in edit mode. When not in edit mode, the grid displays 1231231234 (without the mask) I would like it to display (123) 123-1234
Matthew PK
I see what you mean. Then the only option that comes to my mind (and not using two columns) is to edit the displayed text in the cell for each row intercepting the ItemDataBound event of the grid (provided that you know the phone format beforehand). This will not interfere with the source data type (bigint).
Dick Lampard