Padleft Method
-
Padleft Method I am having problem in sorting user id in datagrid.. user id must be 6 digits, but some users have these id 000020, 000019, 000018.. and the database shows them without the leading zeros: 20, 19, 18 so how can i show the leading zeros in binding the datagrid? and how can i use padleft() method in datagrid?
-
Padleft Method I am having problem in sorting user id in datagrid.. user id must be 6 digits, but some users have these id 000020, 000019, 000018.. and the database shows them without the leading zeros: 20, 19, 18 so how can i show the leading zeros in binding the datagrid? and how can i use padleft() method in datagrid?
Hi, At ItemDataBound() method, u can achieve this one. Suppose int a = 10; Response.Write(a.ToString("000000")); like this u can bind to DataGrid At ItemDataBound() mentod. Bye Pessi.