Click here to Skip to main content
15,898,957 members
Home / Discussions / C#
   

C#

 
QuestionRegEx in C# to split on two delimiters Pin
Master Toothless One26-Jul-06 7:08
Master Toothless One26-Jul-06 7:08 
AnswerRe: RegEx in C# to split on two delimiters Pin
Dustin Metzgar26-Jul-06 8:20
Dustin Metzgar26-Jul-06 8:20 
GeneralRe: RegEx in C# to split on two delimiters Pin
Master Toothless One26-Jul-06 9:30
Master Toothless One26-Jul-06 9:30 
AnswerRe: RegEx in C# to split on two delimiters Pin
BoneSoft26-Jul-06 12:02
BoneSoft26-Jul-06 12:02 
Questiontutorial with datagridview Pin
simsen26-Jul-06 7:02
simsen26-Jul-06 7:02 
AnswerRe: tutorial with datagridview Pin
simsen26-Jul-06 8:39
simsen26-Jul-06 8:39 
GeneralRe: tutorial with datagridview Pin
spin vector26-Jul-06 8:55
spin vector26-Jul-06 8:55 
AnswerRe: tutorial with datagridview Pin
simsen26-Jul-06 22:44
simsen26-Jul-06 22:44 
I any should have the same question.

The solution is:

// Databinding for the Grid
da2 = new OleDbDataAdapter("SELECT Ordre.Antal, Ordre.VareNr, Produkter.Varenavn, Produkter.PrisExMoms FROM Produkter INNER JOIN (Faktura INNER JOIN Ordre ON Faktura.FakturaID = Ordre.FakturaNr) ON Produkter.VareNr = Ordre.VareNr WHERE FakturaID=@fakid", cn);

da2.SelectCommand.Parameters.Add("@fakid", OleDbType.Integer);

da2.SelectCommand.Parameters["@fakid"].Value = fakid;

//create datatable
dtOrdrelinier = new DataTable();

//fill datatable
da2.Fill(dtOrdrelinier);

//create colum to hold the sum of other two colums
DataColumn col = new DataColumn("RaekkeBeloeb");
col.DataType = typeof(System.Decimal);
col.Expression = "Antal*PrisExMoms";

//add the colums
dtOrdrelinier.Columns.Add(col);

//Get the sum of the all totals
txtBelob.Text = dtOrdrelinier.Compute("Sum(RaekkeBeloeb)", "").ToString();

//bind datatable to grid view
dgrOrdre.DataSource = dtOrdrelinier;
Questionhow to render a huge report in realtime (<1 minute) Pin
Razvan Dimescu26-Jul-06 7:02
Razvan Dimescu26-Jul-06 7:02 
AnswerRe: how to render a huge report in realtime (<1 minute) Pin
Ennis Ray Lynch, Jr.26-Jul-06 7:06
Ennis Ray Lynch, Jr.26-Jul-06 7:06 
AnswerRe: how to render a huge report in realtime (<1 minute) Pin
LongRange.Shooter26-Jul-06 8:50
LongRange.Shooter26-Jul-06 8:50 
QuestionFolder and File traversing in C# Pin
Harikrk26-Jul-06 6:38
Harikrk26-Jul-06 6:38 
AnswerRe: Folder and File traversing in C# Pin
vikashparida26-Jul-06 6:47
vikashparida26-Jul-06 6:47 
AnswerRe: Folder and File traversing in C# Pin
Stefan Troschuetz26-Jul-06 6:51
Stefan Troschuetz26-Jul-06 6:51 
GeneralRe: Folder and File traversing in C# Pin
Harikrk27-Jul-06 4:48
Harikrk27-Jul-06 4:48 
QuestionEnterprise Library Database Logging Pin
osamahmirza26-Jul-06 6:37
osamahmirza26-Jul-06 6:37 
QuestionDefaultValue, Custom Attributes, and PropertyGrids Pin
LordAelfric26-Jul-06 6:21
LordAelfric26-Jul-06 6:21 
AnswerRe: DefaultValue, Custom Attributes, and PropertyGrids Pin
LongRange.Shooter26-Jul-06 9:12
LongRange.Shooter26-Jul-06 9:12 
GeneralRe: DefaultValue, Custom Attributes, and PropertyGrids [modified] Pin
LordAelfric26-Jul-06 10:15
LordAelfric26-Jul-06 10:15 
GeneralRe: DefaultValue, Custom Attributes, and PropertyGrids Pin
Martin#26-Jul-06 9:18
Martin#26-Jul-06 9:18 
Questionout value? Pin
honeyman_can26-Jul-06 6:17
honeyman_can26-Jul-06 6:17 
AnswerRe: out value? Pin
Dustin Metzgar26-Jul-06 6:28
Dustin Metzgar26-Jul-06 6:28 
QuestionHashtable vs. Dictionary (key values) Pin
honeyman_can26-Jul-06 5:12
honeyman_can26-Jul-06 5:12 
AnswerRe: Hashtable vs. Dictionary (key values) Pin
Dustin Metzgar26-Jul-06 5:17
Dustin Metzgar26-Jul-06 5:17 
AnswerUnf, no Pin
Ennis Ray Lynch, Jr.26-Jul-06 6:24
Ennis Ray Lynch, Jr.26-Jul-06 6:24 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.