Only manually. Add prices as strings with separator ... use hashtable as intermediate Hashtable ht=new Hashtable(1); foreach(DataRow dr in myTable.Rows) if(ht.Contains(dr["id"]) ht[dr["id"]]=ht[dr["id"]].ToString()+","+dr["price"].ToString(); else ht.Add(dr["id"],dr["price"].ToString(); Next, clear DataTable and copy Hashtable into it. Not tested Hi, AW
A Wegierski
Posts
-
Help combing rows to columns -
Exit statment in visual C#Sorry Hi, AW
-
C++ Bit Fields implementation in C#C# has constants too Hi, AW
-
How to use variable in property (attribute)Thx for all Hi, AW
-
Event in visual C#Web or Win Form? There are some events and properties in WinForm to see keyboard: KeyPreview, KeyPress, KeyDown etc. See EventArgs and KeyData, KeyChar, KeyCode properties. Hi, AW
-
C++ Bit Fields implementation in C#Use BitArray(sealed) or BitVector32 or try to create new class using uint and next define set/get properties: private uint a=0; public uint A { set { A=value; } get { return a; } } public uint A0 { set { a &= 0xFEU; if(value>0) a+=0x1U; } get { return a & 0x01U; } } ... Hi, AW
-
Get currently active windowForm.ActiveForm or Form.ActiveMdiChild static methods. But use myDialogWindow.ShowDialog(this) method I think. Hi, AW
-
Exit statment in visual C#Application.Exit() static method. See help Hi, AW
-
How to use variable in property (attribute)I want to use a variable (or constant) in following class property: [EventTrackingEnabled(true),ObjectPooling(true,1,50)] public class Aktualizacje : ServicedComponent {... instead of number 50 in many classes in many projects of one solution. Is it possible? Thx in adv Hi, AW
-
How can I find resource values like Cut/Copy/Paste names in Win?I thought I can get option names from standard context menu for right mouse click. Thx. Hi, AW
-
How can I find resource values like Cut/Copy/Paste names in Win?I want to get international names of menu items on mouse right click. How to get them using standard .net classes without using Win functions? Hi, AW
-
Customizing buttonsUse simply labels and change their borders after click on them (create Your own inherited "RadioLabel" control). May be, You can use another control instead all "radiolabels" ... combobox etc. Hi, AW
-
How to avoid menu on RMouse buttonIt's right. But I thought, that someone could solve this problem in simpler way. Thx. Hi, AW
-
How to avoid menu on RMouse buttonI use right mouse button to open next form in overridden OnMouseDown() method in overridden DataGrid (standard DataGrid works ok). Before this, automatic menu (copy, paste etc.) is opened - while creating new form. How to avoid it? Only OnKey...() has Handled property - but OnKey isn't fired. -or- How to add my item to automatic menu (copy, paste etc.)? Thx in advance. Hi, AW
-
ComboBox in DataGridTo see ComboBox in DataGrid always - try to override Paint method in suhass'es example. To avoid extra row set DataGrid ListManager protected property: (DataView)(myDataGrid.ListManager.List).AllowNew=false; Hi, AW
-
Add typed DataTable from one DataSet to another DataSet1. I think it's impossible to have one table into two datasets 2. Try to use one dataset or copy table with data Hi, AW
-
Overriding DataGrid::OnPaintI use OnPaint in DataGrid to autosize one of their columns. It works unexpectedly good ... with some exceptions (not Exceptions). In some cases it gives neverending loops. Now I'm working on it. Hi, AW
-
DataSet, DataRows etc.:laugh:Thx Hi, AW
-
DataGrid alterations...Add next table to the DataSet with Your dictionary and create relation into it. See Expression property of DataColumn. It can do this association. Hi, AW
-
DataSet, DataRows etc.You have more than one row and DataRow object doesn't contain Columns objects. See help on Data namespace. Should be: foreach(DataRow dr in dsDBData.Tables[0].Rows) { MessageBox.Show(dr[0].ToString()); } Hi, AW