.net - Why does my datagridviewcolumn not accept changes at this point? -


I am bringing down a firmly typed dataset table in a datagridview. Then by adding a column of the combo box, let's choose the foreign key by name rather than the ID. Perhaps there is an easy way to do this

Can I change the TypeIid column to the ComboBoxexCollum, while still able to back up the datasource in my typed dataset table type? Do I need to get it back from the data source, or is the data conversion back to the dataset automatically?

What's wrong with this code?

  formDg fDg; Internal DST TechObjectDetateable ShowAdG (IWWin 32Wondo Owner, DB DB) {FDG = New FormG (); FDg._dg.DataSource = db.getDs (). TechObjects; Var type edit = new datagridviewcombbox column (); Var type = db.getdsObjectTypes (); TypeSelecter.DataSource = Type; TypeSelecter.DisplayMember = "Type"; TypeSelecter.Name = "Type"; TypeSelecter.ValueMember = "ID"; FDg._dg.Columns ["typeID"] DisplayIndex = fDg._dg.Columns.Count-1 FDg._dg.Columns.Add (TypeSelecter); FDg._dg.ReadOnly = false; Application.DoEvents (); For (Int i = 0; I  

Although this code works just fine

  zero _dg_CellEndEdit (Object Sender, DataGridViewCellEventArgs e) {if (fDg._dg.Column [e. ColumnIndex] .name == "type") {fDg._dg.Rows [e.RowIndex] .sec ["typid"]. Value = fDg._dg.Rows [e.RowIndex] .sec ["type"]. Values; // update typeID column} and if (fDg._dg.Column [e.ColumnIndex] .name == "Type ID") {// Update Type column update timerave (e.ro. index, (int) fdg._dg. Ros [ E. RowIndex] .Cells ["typeID"] value). }}  

This code I'm messing in just 2 if I was reading wrong and they were really different

  Zero UpdateTypesRow (int RowIndex, int value) {fDg._dg.Rows [rowIndex] .sec ["type"]. Value = value; Using Vbforums.com, I found an example of binding sources and ensured that the datagrid viewer was able to work combo box before it was set up and that it was able to work 


Comments

Popular posts from this blog

c++ - Linux and clipboard -

What is expire header and how to achive them in ASP.NET and PHP? -

sql server - How can I determine which of my SQL 2005 statistics are unused? -