Re: GridView
- From: Angel <rodoopus@xxxxxxxxxxx>
- Date: Wed, 30 Jan 2008 08:14:06 -0800
You can do this
Dim cmd As New CommandField
cmd.EditText = "Select"
cmd.ButtonType = ButtonType.Link
cmd.ShowSelectButton = True
grid.Columns.Add(cmd)
or you can do it declaritive
or you can use the wizard
Lot's of choices
But I never link this command button to pop-up window as David is suggesting
--
aaa
"rosoft" wrote:
Hi.
<input id="btnChgCurrency" runat="server" type="button" value="Change
Currency" onclick="PopUpWnd()" name="btnChgCurrency" />
But I donät want a button I want the table (GridView) to display a html
link. I tried to enter html text into the database table but that only
showed the source code for the html link in the Grid View such as
<p><a href="www.url.com/tracl.mp3">A Track</a></p>
When I work with PHP I read data from a table and then create a table.
Couldn't I some how make a C# class that handled this. Read data from a
database into some sort of view and then read the view and create html code
that I then write to the page. Having to do all this in a Java Script? Then
I'm better of with a PHP page. I was told that C# can fix these things
easaly.
Is there any C# classes I can use to create backend modules for my homepage
on the server. Some class where I send for example <asp:Table ID="Table1"
runat="server">......</asp:Table>. And then pass Table1 as a parameter to an
object where the object fills the Table with data?
I just don't want to show the informatin in the database as it is since I
use it to build links depending on who's logged into the page.
Lars
"Angel" <rodoopus@xxxxxxxxxxx> skrev i meddelandet
news:740E2606-0B7A-42EA-A059-C7B788AE36CB@xxxxxxxxxxxxxxxx
You are going to need a little Javascript
<script type ="text/javascript">
var win=null;
function NewWindow(mypage,myname,w,h,scroll,pos){
if(pos=="random"){LeftPosition=(screen.width)?Math.floor(Math.random()*(screen.width-w)):100;TopPosition=(screen.height)?Math.floor(Math.random()*((screen.height-h)-75)):100;}
if(pos=="center"){LeftPosition=(screen.width)?(screen.width-w)/2:100;TopPosition=(screen.height)?(screen.height-h)/2:100;}
else if((pos!="center" && pos!="random") ||
pos==null){LeftPosition=0;TopPosition=20}
settings='width='+w+',height='+h+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=no';
win=window.open(mypage,myname,settings);}
// Put this in your onclick event
function PopUpWnd()
{
var pg = document.getElementById("id")
NewWindow("CurrencyPage.aspx","abc", 350, 360, "No", "center")
}
</script>
You wire it something like this
<input id="btnChgCurrency" runat="server" type="button" value="Change
Currency" onclick="PopUpWnd()" name="btnChgCurrency" />
--
aaa
"rosoft" wrote:
Hi
I'm using a GridView to list data from a table in my database. On of the
fields is a URL and when I click a row in the GridView I want the page to
automaticly open that link. How do I write code to an event i the
GridView
so that when I click a row the page opens up the new link in another
window?
Lars
- References:
- GridView
- From: rosoft
- RE: GridView
- From: Angel
- Re: GridView
- From: rosoft
- GridView
- Prev by Date: Re: Page_Load executes before aspx is rendered?
- Next by Date: RE: ASP.NET and IIS Security
- Previous by thread: Re: GridView
- Next by thread: Re: GridView
- Index(es):