Click here to Skip to main content
15,881,173 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
in my project requirement "the mobile numbers are display in Gridview like

Name Nos
abc 9885xxxxxx
lmn 9889xxxxxx
nbh 8798xxxxxx
" How can do this... i could not get in google search this...

please help me....
Posted

var str="9885"
char pad = 'X';
Console.WriteLine(str.PadRight(10, "X"));   

it will display  9885XXXXXX
 
Share this answer
 
I could be because of the width of grid view. could you check the width of grid view is sufficient enough to accommodate and display the complete number on screen.
 
Share this answer
 
Comments
DGKumar 9-Mar-12 7:47am    
i have maintained in my database like full nos 987878765 but in my gridview i want to display like this 9867xxxxxx
then dont attach gridview directly with datasource. get it in arraylist. replace all arraylist elements after modification of each element and attach the arraylist to gridview
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900