-
Data Grid Display
AutoNumber Prfix:
I have created a table in msaccess with autonumber column named EMPID. I set the EMPID format property like "EMP"000, so that the column will be displayed like EMP0001, EMP0002,..... go on.
My problem is when i display the data in data grid, only 1, 2, 3 are displaying and not the entire EMPID.
I am using C#, Visual Studio .NET 2003, Windows application. Can any one help me?
-
Re: Data Grid Display
[CODE]private sub button_click(byval sender as system.object, byval e as system.eventargs) handles btncount.click
dim semp, str1, str2, str3, str4 as string
dim l, s1, s2, count as integer
dim i as integer = 1
'semp = txtemp.text
'str1 = "emp000"
'str2 = "emp00"
'str3 = "emp0"
'str4 = "emp"
session("int") = session("int") + i
if session("int") >= 0 and session("int") <= 9 then
txtemp.text = "emp000" & session("int")
else if session("int") > 9 and session("int") <= 99 then
'session("int") = session("int") + i
txtemp.text = "emp00" & session("int")
else if session("int") > 99 and session("int") <= 999 then
'session("int") = session("int") + i
txtemp.text = "emp0" & session("int")
else
txtemp.text = "emp" & session("int")
end if
end if
end if
end sub
[/CODE]