473,382 Members | 1,202 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

Advice: datagrid for news module

Hello,

I'm using a datagrid for a news module.
The datagrid only displays the news title, date and header. (this is
allready working)

Now I want to make the title clickable... if you click on it you will see
the complete news message.
When you see the complete news message you don't see the datagrid anymore.
In the news message you can click on a link with a text "back"... once you
go back then you go to the same place where you ended with the datagrid.

All this must be made in the same module.
How can I realize the this? (reading the complete news message)

Thanks!
Nov 18 '05 #1
9 1244
I've got some sample code on how to do this on my website:
www.aboutfortunate.com.

Just click on the "code library" link in the top right corner and then use
the search box to search for: make datagrid clickable (or something similar)
and you'll have what you need.

If you have any other questions feel free to respond here or email me
directly.

--
Sincerely,

S. Justin Gengo, MCP
Web Developer / Programmer

www.aboutfortunate.com

"Out of chaos comes order."
Nietzsche
"Arjen" <bo*****@hotmail.com> wrote in message
news:c6**********@news4.tilbu1.nb.home.nl...
Hello,

I'm using a datagrid for a news module.
The datagrid only displays the news title, date and header. (this is
allready working)

Now I want to make the title clickable... if you click on it you will see
the complete news message.
When you see the complete news message you don't see the datagrid anymore.
In the news message you can click on a link with a text "back"... once you
go back then you go to the same place where you ended with the datagrid.

All this must be made in the same module.
How can I realize the this? (reading the complete news message)

Thanks!

Nov 18 '05 #2
post back, show panel with details, hide panel with grid.
Back button reversed the hide/shows.

--
Curt Christianson
Owner/Lead Developer, DF-Software
www.Darkfalz.com
"Arjen" <bo*****@hotmail.com> wrote in message
news:c6**********@news4.tilbu1.nb.home.nl...
Hello,

I'm using a datagrid for a news module.
The datagrid only displays the news title, date and header. (this is
allready working)

Now I want to make the title clickable... if you click on it you will see
the complete news message.
When you see the complete news message you don't see the datagrid anymore.
In the news message you can click on a link with a text "back"... once you
go back then you go to the same place where you ended with the datagrid.

All this must be made in the same module.
How can I realize the this? (reading the complete news message)

Thanks!

Nov 18 '05 #3
Arjen,

Another way to do this is to simply make the put a databound link button in
the title position of your datagrid. Then when that button is clicked you
would hide the grid and show the full message in a label. Give the user a
button near the message label to return to the grid and then just switch
visibility between the button and label and the grid.

--
Sincerely,

S. Justin Gengo, MCP
Web Developer / Programmer

www.aboutfortunate.com

"Out of chaos comes order."
Nietzsche
"Arjen" <bo*****@hotmail.com> wrote in message
news:c6**********@news4.tilbu1.nb.home.nl...
Hello,

I'm using a datagrid for a news module.
The datagrid only displays the news title, date and header. (this is
allready working)

Now I want to make the title clickable... if you click on it you will see
the complete news message.
When you see the complete news message you don't see the datagrid anymore.
In the news message you can click on a link with a text "back"... once you
go back then you go to the same place where you ended with the datagrid.

All this must be made in the same module.
How can I realize the this? (reading the complete news message)

Thanks!

Nov 18 '05 #4
Hil,

Do you have a sample of this?

I'm using a <asp:TemplateColumn>, inhere I want to make a hyperlink button.
(title)
Under the datagrid I want to make a panel.
When you activate the hyperlink, you must see the pannel...
the hyperlink must have an news ID... so that the panel can load the correct
news information.

Thanks,
Arjen

"Curt_C [MVP]" <software_AT_darkfalz.com> schreef in bericht
news:e8**************@TK2MSFTNGP12.phx.gbl...
post back, show panel with details, hide panel with grid.
Back button reversed the hide/shows.

--
Curt Christianson
Owner/Lead Developer, DF-Software
www.Darkfalz.com
"Arjen" <bo*****@hotmail.com> wrote in message
news:c6**********@news4.tilbu1.nb.home.nl...
Hello,

I'm using a datagrid for a news module.
The datagrid only displays the news title, date and header. (this is
allready working)

Now I want to make the title clickable... if you click on it you will see the complete news message.
When you see the complete news message you don't see the datagrid anymore. In the news message you can click on a link with a text "back"... once you go back then you go to the same place where you ended with the datagrid.

All this must be made in the same module.
How can I realize the this? (reading the complete news message)

Thanks!


Nov 18 '05 #5
Hi,

I now think about a panel... because I can put more controls in there.

I'm using a <asp:TemplateColumn>, inhere I want to make a hyperlink button.
(title)
Under the datagrid I want to make a panel.
When you activate the hyperlink, you must see the pannel...
the hyperlink must have an news ID... so that the panel can load the correct
news information.

Do you have a sample of this?

Thanks,
Arjen

"S. Justin Gengo" <sj*****@aboutfortunate.com> schreef in bericht
news:10*************@corp.supernews.com...
Arjen,

Another way to do this is to simply make the put a databound link button in the title position of your datagrid. Then when that button is clicked you
would hide the grid and show the full message in a label. Give the user a
button near the message label to return to the grid and then just switch
visibility between the button and label and the grid.

--
Sincerely,

S. Justin Gengo, MCP
Web Developer / Programmer

www.aboutfortunate.com

"Out of chaos comes order."
Nietzsche
"Arjen" <bo*****@hotmail.com> wrote in message
news:c6**********@news4.tilbu1.nb.home.nl...
Hello,

I'm using a datagrid for a news module.
The datagrid only displays the news title, date and header. (this is
allready working)

Now I want to make the title clickable... if you click on it you will see the complete news message.
When you see the complete news message you don't see the datagrid anymore. In the news message you can click on a link with a text "back"... once you go back then you go to the same place where you ended with the datagrid.

All this must be made in the same module.
How can I realize the this? (reading the complete news message)

Thanks!


Nov 18 '05 #6
which part are you stuck on? Makeing the panels, making the postback link,
getting the data?

Please try first and post with specifics

--
Curt Christianson
Owner/Lead Developer, DF-Software
www.Darkfalz.com
"Arjen" <bo*****@hotmail.com> wrote in message
news:c6**********@news3.tilbu1.nb.home.nl...
Hil,

Do you have a sample of this?

I'm using a <asp:TemplateColumn>, inhere I want to make a hyperlink button. (title)
Under the datagrid I want to make a panel.
When you activate the hyperlink, you must see the pannel...
the hyperlink must have an news ID... so that the panel can load the correct news information.

Thanks,
Arjen

"Curt_C [MVP]" <software_AT_darkfalz.com> schreef in bericht
news:e8**************@TK2MSFTNGP12.phx.gbl...
post back, show panel with details, hide panel with grid.
Back button reversed the hide/shows.

--
Curt Christianson
Owner/Lead Developer, DF-Software
www.Darkfalz.com
"Arjen" <bo*****@hotmail.com> wrote in message
news:c6**********@news4.tilbu1.nb.home.nl...
Hello,

I'm using a datagrid for a news module.
The datagrid only displays the news title, date and header. (this is
allready working)

Now I want to make the title clickable... if you click on it you will see the complete news message.
When you see the complete news message you don't see the datagrid anymore. In the news message you can click on a link with a text "back"... once you go back then you go to the same place where you ended with the datagrid.
All this must be made in the same module.
How can I realize the this? (reading the complete news message)

Thanks!



Nov 18 '05 #7
Sorry,

My first problem is to make the hyperlink control with the param (newsid)
and to catch the click event.
So that I can hide/show the panels.

I now only have:
<asp:HyperLink id="hplTitle" CssClass="ItemTitle" runat="server">
<%# Server.HtmlEncode((String)
DataBinder.Eval(Container.DataItem,"Title")) %>
</asp:HyperLink>
Thanks!
Arjen

"Curt_C [MVP]" <software_AT_darkfalz.com> schreef in bericht
news:eE**************@tk2msftngp13.phx.gbl...
which part are you stuck on? Makeing the panels, making the postback link,
getting the data?

Please try first and post with specifics

--
Curt Christianson
Owner/Lead Developer, DF-Software
www.Darkfalz.com
"Arjen" <bo*****@hotmail.com> wrote in message
news:c6**********@news3.tilbu1.nb.home.nl...
Hil,

Do you have a sample of this?

I'm using a <asp:TemplateColumn>, inhere I want to make a hyperlink

button.
(title)
Under the datagrid I want to make a panel.
When you activate the hyperlink, you must see the pannel...
the hyperlink must have an news ID... so that the panel can load the

correct
news information.

Thanks,
Arjen

"Curt_C [MVP]" <software_AT_darkfalz.com> schreef in bericht
news:e8**************@TK2MSFTNGP12.phx.gbl...
post back, show panel with details, hide panel with grid.
Back button reversed the hide/shows.

--
Curt Christianson
Owner/Lead Developer, DF-Software
www.Darkfalz.com
"Arjen" <bo*****@hotmail.com> wrote in message
news:c6**********@news4.tilbu1.nb.home.nl...
> Hello,
>
> I'm using a datagrid for a news module.
> The datagrid only displays the news title, date and header. (this is
> allready working)
>
> Now I want to make the title clickable... if you click on it you
will
see
> the complete news message.
> When you see the complete news message you don't see the datagrid

anymore.
> In the news message you can click on a link with a text "back"...
once you
> go back then you go to the same place where you ended with the

datagrid. >
> All this must be made in the same module.
> How can I realize the this? (reading the complete news message)
>
> Thanks!
>
>



Nov 18 '05 #8
Arjen,

The easiest way to do this is to connect your link button up so that it runs
a specific command when it's clicked.

You'll also need to know how to find the proper row to display.

I have some code out on my site that will demonstrate this too. It uses a
checkbox, but substitute the link button object for the checkbox and the
code is identical.

Just search the code library for: "How to reference a checkbox" and you'll
have the code you need.

--
Sincerely,

S. Justin Gengo, MCP
Web Developer / Programmer

www.aboutfortunate.com

"Out of chaos comes order."
Nietzsche
"Arjen" <bo*****@hotmail.com> wrote in message
news:c6**********@news5.tilbu1.nb.home.nl...
Hi,

I now think about a panel... because I can put more controls in there.

I'm using a <asp:TemplateColumn>, inhere I want to make a hyperlink button. (title)
Under the datagrid I want to make a panel.
When you activate the hyperlink, you must see the pannel...
the hyperlink must have an news ID... so that the panel can load the correct news information.

Do you have a sample of this?

Thanks,
Arjen

"S. Justin Gengo" <sj*****@aboutfortunate.com> schreef in bericht
news:10*************@corp.supernews.com...
Arjen,

Another way to do this is to simply make the put a databound link button

in
the title position of your datagrid. Then when that button is clicked you
would hide the grid and show the full message in a label. Give the user a button near the message label to return to the grid and then just switch
visibility between the button and label and the grid.

--
Sincerely,

S. Justin Gengo, MCP
Web Developer / Programmer

www.aboutfortunate.com

"Out of chaos comes order."
Nietzsche
"Arjen" <bo*****@hotmail.com> wrote in message
news:c6**********@news4.tilbu1.nb.home.nl...
Hello,

I'm using a datagrid for a news module.
The datagrid only displays the news title, date and header. (this is
allready working)

Now I want to make the title clickable... if you click on it you will

see the complete news message.
When you see the complete news message you don't see the datagrid anymore. In the news message you can click on a link with a text "back"... once you go back then you go to the same place where you ended with the datagrid.
All this must be made in the same module.
How can I realize the this? (reading the complete news message)

Thanks!



Nov 18 '05 #9
I use something like this, but I bind the grid and set the .Key value.

private void DataGrid1_SelectedIndexChanged(object sender, System.EventArgs
e)
{
string myID = DataGrid1.Items[DataGrid1.SelectedIndex].ToString();
}

--
Curt Christianson
Owner/Lead Developer, DF-Software
www.Darkfalz.com
"Arjen" <bo*****@hotmail.com> wrote in message
news:c6**********@news5.tilbu1.nb.home.nl...
Sorry,

My first problem is to make the hyperlink control with the param (newsid)
and to catch the click event.
So that I can hide/show the panels.

I now only have:
<asp:HyperLink id="hplTitle" CssClass="ItemTitle" runat="server">
<%# Server.HtmlEncode((String)
DataBinder.Eval(Container.DataItem,"Title")) %>
</asp:HyperLink>
Thanks!
Arjen

"Curt_C [MVP]" <software_AT_darkfalz.com> schreef in bericht
news:eE**************@tk2msftngp13.phx.gbl...
which part are you stuck on? Makeing the panels, making the postback link,
getting the data?

Please try first and post with specifics

--
Curt Christianson
Owner/Lead Developer, DF-Software
www.Darkfalz.com
"Arjen" <bo*****@hotmail.com> wrote in message
news:c6**********@news3.tilbu1.nb.home.nl...
Hil,

Do you have a sample of this?

I'm using a <asp:TemplateColumn>, inhere I want to make a hyperlink

button.
(title)
Under the datagrid I want to make a panel.
When you activate the hyperlink, you must see the pannel...
the hyperlink must have an news ID... so that the panel can load the

correct
news information.

Thanks,
Arjen

"Curt_C [MVP]" <software_AT_darkfalz.com> schreef in bericht
news:e8**************@TK2MSFTNGP12.phx.gbl...
> post back, show panel with details, hide panel with grid.
> Back button reversed the hide/shows.
>
> --
> Curt Christianson
> Owner/Lead Developer, DF-Software
> www.Darkfalz.com
>
>
> "Arjen" <bo*****@hotmail.com> wrote in message
> news:c6**********@news4.tilbu1.nb.home.nl...
> > Hello,
> >
> > I'm using a datagrid for a news module.
> > The datagrid only displays the news title, date and header. (this is > > allready working)
> >
> > Now I want to make the title clickable... if you click on it you

will see
> > the complete news message.
> > When you see the complete news message you don't see the datagrid
anymore.
> > In the news message you can click on a link with a text "back"... once you
> > go back then you go to the same place where you ended with the

datagrid.
> >
> > All this must be made in the same module.
> > How can I realize the this? (reading the complete news message)
> >
> > Thanks!
> >
> >
>
>



Nov 18 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: duncan | last post by:
Hi I an a mebie to XML / vb.net and I am struggling. I am developing a web base applcation using XML to link to its database so. Here is the XML I want to load into to a datagrid. The...
2
by: enak | last post by:
I can not get my datagrid to page. I have a datagrid that I can sort 2 of the columns. This works great. I added paging and when I display the dg it shows 5 pages. (I am showing page numbers at...
3
by: .NET/C# User | last post by:
I am working on a project that is heavily object oriented, and we are all new to .NET. I am trying to do some research on best practice/patterns for reading many records, and paging the data etc. ...
2
by: Sky | last post by:
Hello: Another question about trying to wring functionality from a DataGrid... Have a DB table of "Contacts" -- 14 or more fields per record Show in datagrid -- but only 5 columns (First,Last,...
1
by: coleenholley | last post by:
I'm getting frustrated with trying to format a datagrid that is entirely populated dynamically using a class module written in VB .Net (No C# used!) We connect to a DB2 database using an RPC that is...
9
by: Arjen | last post by:
Hello, I'm using a datagrid for a news module. The datagrid only displays the news title, date and header. (this is allready working) Now I want to make the title clickable... if you click on...
2
by: Manny | last post by:
Hello I'm fairly new to ASP.NET and need your advice, I need to display monthly/weekly table information on the same page. The user should be able to select first from a month (from a month link...
1
by: Neven Klofutar | last post by:
Hi, I need some advice about a project I'm working on ... I have a form (create.aspx) containing a HTML Button with JavaScript (window.open('select.aspx')) attached to it. Form select.aspx is...
6
by: Khumar | last post by:
Hello, Im new in asp.net especially in web base application. I want to ask about datagrid. I had shown my table on datagrid, and what I want to ask is how to set the column height fixed?...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.