Click here to Skip to main content
15,895,142 members
Home / Discussions / C#
   

C#

 
AnswerRe: Finally! Pin
mav.northwind21-Jul-07 21:25
mav.northwind21-Jul-07 21:25 
GeneralRe: Finally! Pin
max2929722-Jul-07 10:16
max2929722-Jul-07 10:16 
GeneralRe: Finally! Pin
mav.northwind22-Jul-07 19:01
mav.northwind22-Jul-07 19:01 
AnswerRe: Finally! Pin
Luc Pattyn22-Jul-07 1:00
sitebuilderLuc Pattyn22-Jul-07 1:00 
QuestionPlease i want help in crystal report with c# Pin
MYOSRI21-Jul-07 10:34
MYOSRI21-Jul-07 10:34 
AnswerRe: Please i want help in crystal report with c# Pin
Justin Perez21-Jul-07 10:59
Justin Perez21-Jul-07 10:59 
AnswerRe: Please i want help in crystal report with c# Pin
MYOSRI21-Jul-07 11:15
MYOSRI21-Jul-07 11:15 
QuestionDataTable with rows and trying to move next and previous Pin
Marcel Vreuls (www.agentbase.nl)21-Jul-07 9:38
Marcel Vreuls (www.agentbase.nl)21-Jul-07 9:38 
Hi,

I have the following situation and struggling with it. So hopefully someone can solve it or perhaps advice me another method. What I have is an Excel spreadsheet and a c# program.

In the program i load the excelsheet into a datatable

<br />
//Retrieve the excel data<br />
            Cursor = Cursors.WaitCursor;<br />
            InitExcel(ref _exr);<br />
            _dt = _exr.GetTable();<br />


So far so good. I can than loop trough the rows from the datatable like this

foreach (DataRow da in _dt.Rows)<br />
            {



and so on. What i would like to achive now is the following. In my datatable there are many rows. I would like to group rows where a certain column has the same value. It is a fact that rows where this is the case are underneath each other. So it thought lets move to the next row to see if the value is the same. if so read some columns and move on to the next row and do the same check. If the value is the same read the samen columns. If not i have another row and start over again. The result should than look something like

Source table
100;Nice product;100.0;Variant 0
100;Nice product;100.1;Variant 1
100;Nice product;100.2;Variant 2
200;Another nice product;200.0;Variant 0
200;Another nice product;200.1;Variant 1
200;Another nice product;200.2;Variant 2


100 Nice product
....100.0 Variant 0
....100.1 Variant 1
....100.2 Variant 2
200 Another nice product
....200.0 Variant 0
....200.1 Variant 1
....200.2 Varian 2


and so one. but i have not got a clue how to do this. I cannot figure this out. A bad but working solution is to add the datatable to a hidden grid on the form and perform this actions on the grid. but that is not the solution i am looking for Cool | :cool:


Hope this makes any sense Wink | ;) and that someone can help me solve this issue







Kind regards,

Marcel Vreuls

http://www.marcelvreuls.com

<>

AnswerRe: DataTable with rows and trying to move next and previous Pin
Amjath Rahman22-Jul-07 15:53
Amjath Rahman22-Jul-07 15:53 
GeneralRe: DataTable with rows and trying to move next and previous Pin
Marcel Vreuls (www.agentbase.nl)23-Jul-07 10:59
Marcel Vreuls (www.agentbase.nl)23-Jul-07 10:59 
Questionc# - derived classes Pin
jon-8021-Jul-07 7:36
professionaljon-8021-Jul-07 7:36 
AnswerRe: c# - derived classes Pin
Luc Pattyn21-Jul-07 7:47
sitebuilderLuc Pattyn21-Jul-07 7:47 
GeneralRe: c# - derived classes Pin
jon-8021-Jul-07 8:14
professionaljon-8021-Jul-07 8:14 
AnswerRe: c# - derived classes Pin
mav.northwind21-Jul-07 7:47
mav.northwind21-Jul-07 7:47 
AnswerRe: c# - derived classes Pin
pbraun21-Jul-07 18:56
pbraun21-Jul-07 18:56 
GeneralRe: c# - derived classes Pin
jon-8021-Jul-07 7:48
professionaljon-8021-Jul-07 7:48 
GeneralRe: c# - derived classes Pin
mav.northwind21-Jul-07 10:32
mav.northwind21-Jul-07 10:32 
QuestionProblem with the browser control Pin
Raymond_P*21-Jul-07 6:52
Raymond_P*21-Jul-07 6:52 
QuestionLocalization Pin
Goje Melegnaw21-Jul-07 6:06
Goje Melegnaw21-Jul-07 6:06 
AnswerRe: Localization Pin
Paul Conrad21-Jul-07 6:26
professionalPaul Conrad21-Jul-07 6:26 
AnswerRe: Localization Pin
DavidNohejl21-Jul-07 9:53
DavidNohejl21-Jul-07 9:53 
QuestionThread, WaitSleepJoin Pin
Johan Martensson21-Jul-07 5:59
Johan Martensson21-Jul-07 5:59 
AnswerRe: Thread, WaitSleepJoin Pin
Luc Pattyn21-Jul-07 6:22
sitebuilderLuc Pattyn21-Jul-07 6:22 
GeneralRe: Thread, WaitSleepJoin Pin
Johan Martensson21-Jul-07 6:54
Johan Martensson21-Jul-07 6:54 
GeneralRe: Thread, WaitSleepJoin Pin
Luc Pattyn21-Jul-07 7:13
sitebuilderLuc Pattyn21-Jul-07 7:13 

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.