|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
datagridview filled with a viewI want to fill a datagridview with a tabel, only problem is one of the
fields of this tabel is an ID to another tabel with the name.. I want to also show the name in the grid (they cant edit this field) To to this I can use a sql server view, right? But when i use a view i cant use the standard update command? Or is this possible by just deleting the added name column? Danny M wrote:
> I want to fill a datagridview with a tabel, only problem is one of the It is not Fill()ed with a TABLE. It is Fill()ed by the SelectCommand in> fields of this tabel is an ID to another tabel with the name.. I want > to also show the name in the grid (they cant edit this field) > > To to this I can use a sql server view, right? > > But when i use a view i cant use the standard update command? > Or is this possible by just deleting the added name column? > I want to fill a datagridview with a tabel the DataAdaptor, which can be (via CommandType) a StoredProcedure, TableDirect, or Text. > To to this I can use a sql server view, right? Yes. Just set the SelectCommand to pull data from the view.> But when i use a view i cant use the standard update command? Whether the VIEW is UPDATEable is a database question, not a .NET one.Ultimately, assuming you are using a DataAdaptor, the UPDATE is based on the UpdateCommand, which is any Command you set it to be, and has the ability to have absolutely nothing to do with the SelectCommand. > Or is this possible by just deleting the added name column? Huh?-- Just write a query that joins the lookup TABLE to the main TABLE, and put that in your SelectCommand. The UpdateCommand should not require a change. B.
Alternative to using Bitmap
Really stupid looping problem Startup speed Regex Output to Textbox Sharing Class Data With Multiple Forms Urgent! Get rowindex - datagrid navigation Need to capture all keystrokes to my application Difference between MyBase and Me Images in a Windows DataGrid Custom coordinates |
|||||||||||||||||||||||