After creating an Entity Framework project with database first, I added a column to the Clients table ('zehut') in SSMS. After updating in VS doing "Update Model From Database", the new column shows up in the diagram but it put it last in the list. I want it to be in the same order where I inserted it in SSMS. I tried to change the order in the code map but it didn't help.
Is there any way to change the order of the columns in the DbModel diagram in VS? (attached screenshots)
The reason it matters is because I'm updating the form's text fields from the DataGridView programmatically so the Row-Index doesn't match.
Try
txtId.Text = DataGridViewClients.Item(1, e.RowIndex).Value
txtZehut.Text = DataGridViewClients.Item(2, e.RowIndex).Value
cmboStatus.Text = DataGridViewClients.Item(3, e.RowIndex).Value
So yes, I can change the order of the form's fields in the code to match the order of the VS db diagram but since the diagram does NOT match the SSMS order, if the diagram changes (if it gets deleted and re-added), the code will be messed up. I'd rather EVERYTHING be in same order from the start to avoid future possible issues.