Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Datagrid Control > datagrid manipulation

Reply
Thread Tools

datagrid manipulation

 
 
Dhruv
Guest
Posts: n/a
 
      07-08-2004
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


 
Reply With Quote
 
 
 
 
Alvin Bruney [MVP]
Guest
Posts: n/a
 
      07-08-2004
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.

--
Regards,
Alvin Bruney
[ASP.NET MVP http://mvp.support.microsoft.com/default.aspx]
Got tidbits? Get it here... http://tinyurl.com/27cok
"Dhruv" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) m...
> 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
>
>



 
Reply With Quote
 
 
 
 
Dhruv
Guest
Posts: n/a
 
      07-08-2004
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.




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

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Server-Side DataGrid Manipulation - Please Help pbd22 ASP .Net 0 03-10-2008 05:18 PM
datagrid manipulation issue ralf ASP .Net Datagrid Control 4 11-10-2005 02:23 PM
Datagrid cell properties manipulation js ASP .Net 1 07-20-2005 05:41 PM
DataGrid : dynamic manipulation of a template column using C# Richard ASP .Net Datagrid Control 7 02-05-2004 10:14 AM
To all Gurus: How can I edit/update a DataGrid in a DataGrid (nested DataGrid)? Possible? Andreas Klemt ASP .Net Datagrid Control 0 10-08-2003 01:19 AM



Advertisments