datagrid manipulation

D

Dhruv

Hi,

I have a question about custom datagrids or how i should show my
results

I have a sql statement that reads as follows:

SELECT News_Title, News_Description FROM SiteNews WHERE (News_ID =
& Me.News_State.news_id & ")"

the output I get is

column1 | column2
-------------------
1 | hello
-------------------
2 | hello2


Is there a way to have it do this with paging in datagrid or another
..net object?

1
----------
hello
(linkForPage2Here - for second record- 1 record per page)

So again not side by side output like database table but the way i
specified above with row format.

Thanks

:D
 
A

Alvin Bruney [MVP]

One approach is to go ahead and bind as usual then loop thru remove all the
other rows from the grid - or in the dataset depending on your approach.
Then, you would need to add a row and customize it to take a hyperlink
control
e.item.cells[0].controls.add(new hyperlinkbutton("link goes here"))

next you would map the click event to a routine which basically does the
same thing again but for row 2 in the dataset, since you already did row 1.
You can keep a static running count to help you with that.
 
D

Dhruv

Sorry,

However I'm new to asp.net so can you give me an example. I understand
what you are saying however I dont know how someone should code it.

I'm still not sure how your answer would take care of the problem that
the grid displays data like this:

column1 | column 2 | column 3|
------------------------------
text1 text 2 text 3

change to

(column1) text1
----------------
(column2) text 2
-----------------
(column3) text 3

Can you provide me with a real working example.

Thank you so much.

:D


*** Sent via Devdex http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top