nellyihu — 2011-06-14T08:12:08-04:00 — #1
pls, i need urgent help with how to go about this issue. students in a particular institution register for their courses per semester and per level in a particular department, and then their is need to present the registered courses in a particular format as attached in the word document.
pls is there away to use the gridview dynamically to solve this problem i really need this help urgently
brianoconnell — 2011-06-14T20:30:18-04:00 — #2
nellyihu — 2011-06-15T05:00:40-04:00 — #3
thanks for the reply, but i am not exporting to word, i am to present the data as formated in the attached word document in a gridview...
pls any help?
brianoconnell — 2011-06-15T05:09:45-04:00 — #4
Oops sorry I read it wrong. This very much depends on how much of the information you will have per record or will it need subsequent database calls as you iterate through each row? In general my approach is not to use the datagrid anyway because the repeater gives me full control over the output. I would suspect you will need nestedt datagrids or repeaters to achieve what you want assuming it does require a second call to the database per row. If I was nesting a repeater it would mean getting a reference to the current row, the nested repeater and binding that to my subset of data.
nellyihu — 2011-06-15T07:42:55-04:00 — #5
ok, that strikes a chord, pls do you have any example or link on the web to help accelerate this? thx once again.
brianoconnell — 2011-06-15T07:52:09-04:00 — #6
Well as I said it very much depends on how you get the data. Can the relevant information be retrieved with one query or will you have to make a subsequent query for each row? Wherever possible you should be doing it in one query. Often the requirement to make subsequent calls can be an indicator of bad db design but sometimes it's necessary.
You don't say what language you are using but heres an example using vb.net I found - James Van Klink - Programming Codex: ASP.Net: Nested Repeaters ItemDataBound.
nellyihu — 2011-06-15T08:03:36-04:00 — #7
thanks very much, will get back to you