473,749 Members | 2,464 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1288
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*****@hotmai l.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*****@hotmai l.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*****@hotmai l.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:TemplateCo lumn>, 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_da rkfalz.com> schreef in bericht
news:e8******** ******@TK2MSFTN GP12.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*****@hotmai l.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:TemplateCo lumn>, 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*****@aboutf ortunate.com> schreef in bericht
news:10******** *****@corp.supe rnews.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*****@hotmai l.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*****@hotmai l.com> wrote in message
news:c6******** **@news3.tilbu1 .nb.home.nl...
Hil,

Do you have a sample of this?

I'm using a <asp:TemplateCo lumn>, 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_da rkfalz.com> schreef in bericht
news:e8******** ******@TK2MSFTN GP12.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*****@hotmai l.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:HyperLin k id="hplTitle" CssClass="ItemT itle" runat="server">
<%# Server.HtmlEnco de((String)
DataBinder.Eval (Container.Data Item,"Title")) %>
</asp:HyperLink>
Thanks!
Arjen

"Curt_C [MVP]" <software_AT_da rkfalz.com> schreef in bericht
news:eE******** ******@tk2msftn gp13.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*****@hotmai l.com> wrote in message
news:c6******** **@news3.tilbu1 .nb.home.nl...
Hil,

Do you have a sample of this?

I'm using a <asp:TemplateCo lumn>, 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_da rkfalz.com> schreef in bericht
news:e8******** ******@TK2MSFTN GP12.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*****@hotmai l.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*****@hotmai l.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:TemplateCo lumn>, 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*****@aboutf ortunate.com> schreef in bericht
news:10******** *****@corp.supe rnews.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*****@hotmai l.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_Selec tedIndexChanged (object sender, System.EventArg s
e)
{
string myID = DataGrid1.Items[DataGrid1.Selec tedIndex].ToString();
}

--
Curt Christianson
Owner/Lead Developer, DF-Software
www.Darkfalz.com
"Arjen" <bo*****@hotmai l.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:HyperLin k id="hplTitle" CssClass="ItemT itle" runat="server">
<%# Server.HtmlEnco de((String)
DataBinder.Eval (Container.Data Item,"Title")) %>
</asp:HyperLink>
Thanks!
Arjen

"Curt_C [MVP]" <software_AT_da rkfalz.com> schreef in bericht
news:eE******** ******@tk2msftn gp13.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*****@hotmai l.com> wrote in message
news:c6******** **@news3.tilbu1 .nb.home.nl...
Hil,

Do you have a sample of this?

I'm using a <asp:TemplateCo lumn>, 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_da rkfalz.com> schreef in bericht
news:e8******** ******@TK2MSFTN GP12.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*****@hotmai l.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
11534
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 datagrid has the number of columns specified and is ready and waiting for its data. <Users>
2
2260
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 the bottom of the dg.) When I click on the pages nothing happens until I get to the last page. Then and only then is the last page displayed. If I go back through the pages the second to last page displayes the first page again.
3
1021
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. I get the feeling people will just use DataReaders maybe. But our problem is that the system is ASP.NET, and we need some way of asking for a bunch of records between a range. For example, say I know there are 500,000 records in a table I need...
2
2339
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, Fax, Phone, Category). Put an Edit column at the end... Now what?! If you go into Edit mode -- you can only edit 5 cells -- not all the rest of the Record's fields...not enough!
1
1233
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 written in COBOL. The connection to the datagrid works in the code-behind in the class module, when I check the 'Create columns automatically at run time' box. If I don't select that, I don't get any data, even if I go in and add all my columns in...
9
293
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 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
2
1031
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 inside the table) and then the weekly information should appear on another table on the same page. The advice I need is not so much on how the data should bind (I tackled that one so far), but rather the web control object I should use for...
1
1040
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 used to select services (in this case only serviceID) that are stored in DB, and store those serviceIDs in Session object. Create.aspx form has a 'refresh' button on it to show newly selected
6
1840
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? Because when I have a long word it automatically set new line instead of hide it. I want it to be hide like this 928192... with 3 dot at the end of the word if it is to long.
0
8996
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8832
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9566
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9333
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9254
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6800
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6078
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4879
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2791
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.