Pls urgent help with dynamic gridview data presentment


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

thx guys

Try here…

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?

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.

ok, that strikes a chord, pls do you have any example or link on the web to help accelerate this? thx once again.

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 I found - James Van Klink - Programming Codex: ASP.Net: Nested Repeaters ItemDataBound.

thanks very much, will get back to you