473,480 Members | 1,884 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Urgent... datagrid problem

Thanks in advance...I have what seems like it should be a simple thing
for a DataGrid. What I'll be using this for is for a user to choose an
employee record on the datagrid then hit the detail button or link and
launch a new window showing the details for that specific employee. So
my query string needs to pickup the employee's ID and take it to a
details window.Unfortunately I'm using 1.1 and the number of fields I
may need to display is about 40. So I may need to do a repeater
control on the detail form (?) so I can control all the html
positioning. Any clues on a 1.1 idea for that? Thanks!
________________________

Here's what I tried first, a datagrid with a LinkButton that I can't
get to work. My initial problem is the error:

BC30456: 'ViewDetails' is not a member of 'ASP.MainDepartment_aspx'.
Below is my html and my Code behind at the bottom:

<%@ Page Language="vb" AutoEventWireup="false"
Codebehind="MainDepartment.aspx.vb"
Inherits="Forsyth.HR_ReportingTool.UI.MainDepartme nt" %>
<FORM id="Form1" method="post" runat="server">
<asp:datagrid id="dgEmployees" >
<Columns>
<asp:TemplateColumn>
<ItemTemplate>
<asp:LinkButton ID="ViewDetails" CommandArgument='<%# Eval("id") %>'
Runat="server" OnCommand="ViewDetails">Details</asp:LinkButton>
</ItemTemplate>
</asp:TemplateColumn>
</Columns>
</asp:datagrid></FORM>
</BODY>
</HTML>

Protected Sub ViewDetails(ByVal source As Object, ByVal e As
System.Web.UI.WebControls.CommandEventArgs)
Response.Redirect("Details.aspx?id=" & e.CommandArgument.ToString())
End Sub

________________________

I've also tried using the below <asp:hyperlinktechnique... with
errors on the

<asp:TemplateColumn>
<ItemTemplate>
<asp:HyperLink ID="ViewDetails" Runat="server" NavigateUrl='<%#
Eval("id","Details.aspx?id={0}") %>'>Details</asp:HyperLink>
</ItemTemplate>
</asp:TemplateColumn>

________________________

Would Javascript be easier for all this?
I am using .net framework 1.1
Jul 2 '08 #1
2 1310
Hi,

I would use itemdatabound event and modify hyper link to set
appropriate navigate url in that event,
i would also set the hyperlink's traget property to blank so that it
open in new window..

Best of luck

Munna

www.munna.shatkotha.com/blog
www.munna.shatkotha.com
www.shatkotha.com
Jul 2 '08 #2
Sorry for a dumb question... I'm really new to this... is your
recommendation to be used to modify my (?):

<asp:TemplateColumn>
<ItemTemplate>
<asp:HyperLink ID="ViewDetails" Runat="server" NavigateUrl='<%#
Eval("id","Details.aspx?id={0}") %>'>Details</asp:HyperLink>
</ItemTemplate>
</asp:TemplateColumn>

Sorry... I'm just not following the suggested.... Thanks!
On Jul 2, 12:28*pm, Munna <munna...@gmail.comwrote:
Hi,

I would use itemdatabound event and modify hyper link to set
appropriate navigate url in that event,
i would also set the hyperlink's traget property to blank so that it
open in new window..

Best of luck

Munna

http://www.munna.shatkotha.com/blogw....shatkotha.com
Jul 2 '08 #3

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

Similar topics

1
1100
by: Deepa | last post by:
I am working on a web page which has a datagrid to be populated. The problem is I need to get the data from 2 different tables to bind the 2 columns of the datagrid. I am not sure of how to do...
4
7024
by: John | last post by:
Hello all, I'm trying to display a dataset into a datagrid and format the datagrid columns but I'm having a hard time with it. I've tried the MSDN examples but they don't seem to work. ...
6
1965
by: Anonymous | last post by:
Hello, I am loading a usercontrol with the LoadControl method and need to pass some data to the property of that control. How can I do that? THanks
4
2081
by: m - team1 via DotNetMonster.com | last post by:
hi everyone ive written a huge unwieldy program for my company's annual maintenance contract tracking! :) ok, my dataset has two relations : one table is called AMC and is linked to AMC1. AMC1...
2
1432
by: settyv | last post by:
Hi, I have webform which has 4 Datagrid controls with (built-in Pagination) and 4 search buttons to perform the search operation.When i click on search operation it is displaying the results in...
0
818
by: settyv | last post by:
Hi, I am using DataGrid control and am binding to the Dataset that is returned from Business layer. Now the problem is that am using hyperlink column for CaseID which is displaying twice in the...
1
2421
by: ºa¤Ö | last post by:
Dear All Experts I faced a problem, I had developed a UserControl (just a simple display the website logo), and added into a ASPX page. Inside the ASPX, i have a DataGrid control, and it...
6
1853
by: muddasirmunir | last post by:
i make a form whic has one data grid and one text box and one button when i write a name on tex box and click add the name stored in database successfully. now in the grid i want to show all the...
3
1059
by: radhikabista | last post by:
hi, my program binds a dataset to datagrid so that it can get footer row. now the problem is. user can get the datagrid make changes to datagrid but can not update the changes . what my be the...
0
7051
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,...
0
7054
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,...
0
7097
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6750
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...
1
4794
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...
0
4493
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...
0
3003
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
2993
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
567
muto222
php
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.