Click here to Skip to main content
15,885,278 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello,

I'm using a data grid in WPF to retrieve information For Employees and using Ms-Access Database And table contain have these fields ID name email. The problem create id (ID is Auto generate. And ID Format is Example 1st Employee ID is E1020 ,2nd Employee ID is E1021 etc) this format i am using.

But Data grid Show id only 20,21,22,23, etc. This is not a correct format of my id,

Please help me

Thanks.
Posted
Updated 15-Apr-12 23:56pm
v2
Comments
Nilesh Patil Kolhapur 16-Apr-12 3:20am    
give ur query and table data
Roliking 16-Apr-12 3:27am    
what is the your sql query? what is the query ur using for filling the grid?
Arsalaan Ahmed 16-Apr-12 3:33am    
con.Open();
OleDbDataAdapter da = new OleDbDataAdapter("Select * from Login",con);
DataSet ds = new DataSet();
da.Fill(ds);
dataGrid1.ItemsSource = ds.Tables[0].DefaultView;
con.Close();
Arsalaan Ahmed 16-Apr-12 4:04am    
Any One please please please Help me,,
Slacker007 16-Apr-12 5:57am    
We would love to help you but you have to post some more info (code examples perhaps). I can't answer your question as it is right now.

1 solution

Hello

I don't think there is any autogenerate ID in Access. There is AutoNumber ID and its type is "Replication ID" or "Long Integer".
 
Share this answer
 
Comments
Arsalaan Ahmed 17-Apr-12 13:35pm    
O really,,, tHanku,,,
Shahin Khorshidnia 17-Apr-12 15:54pm    
O ''' yOuRr WeLcOmE'''

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