Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > Datagrid and Hyperlinks,,,

Reply
Thread Tools

Datagrid and Hyperlinks,,,

 
 
Steve Randall
Guest
Posts: n/a
 
      01-06-2004
I have a bound datagrid in which I want the first column
to be a hyperlink column. The column value is in my
dataset used to populate the grid and is called "Student
ID" which I specify in the "Text field" property of the
hyperlink column (that I manually add).

This all works fine except the Student ID column which is
in my dataset appears TWICE, once as the hyperlink column
and once as the dataset column. How can I allow the
hyperlinked "Student ID" column and hide the
bound "Student ID" column? I have tried the .Visible
property but it only returns 0 (zero) as the number of
columns after the BindData() even though the grid contains
4 columns.

Many thanks.
Steve
 
Reply With Quote
 
 
 
 
Jos Branders
Guest
Posts: n/a
 
      01-07-2004
"Steve Randall" <> wrote in message
news:0b4f01c3d47a$8e3fcb70$...
> I have a bound datagrid in which I want the first column
> to be a hyperlink column. The column value is in my
> dataset used to populate the grid and is called "Student
> ID" which I specify in the "Text field" property of the
> hyperlink column (that I manually add).
>
> This all works fine except the Student ID column which is
> in my dataset appears TWICE, once as the hyperlink column
> and once as the dataset column. How can I allow the
> hyperlinked "Student ID" column and hide the
> bound "Student ID" column? I have tried the .Visible
> property but it only returns 0 (zero) as the number of
> columns after the BindData() even though the grid contains
> 4 columns.
>
> Many thanks.
> Steve


Set AutoGenerateColumns=False on the DataGrid.
Then add all your columns as BoundColumn, except the Student ID column.

--

Jos


 
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
DataGrid.Items.Count and DataGrid Paging... Green Start Button ASP .Net 2 08-02-2006 02:01 AM
Edit All Function for DataGrid, and Moving the Edit Function in a DataGrid Schultz ASP .Net 3 02-14-2005 04:47 AM
datagrid , SQL Reader and Paging... Datagrid disappears Roger ASP .Net 0 12-28-2004 04:05 PM
DataGrid ItemStyle is a textbox and doesn't update the datagrid datasource matthew schouppe ASP .Net 3 04-30-2004 03:02 PM
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