Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > datagrid commands

Reply
Thread Tools

datagrid commands

 
 
Roel
Guest
Posts: n/a
 
      05-24-2004
Hello,

I built an application that shows the file of a folder on a website.

I present it by using a datagrid. Now, I want to add some functionalities to
the datagrid like, the possibility to delete the file. Therefore I use the
deletecommand -event. But I also want to add print functionality... Does
anyone knows how I can add a linkbutton to the datagrid that throws a
specific event (ex. printcommand) ?

Regards
Roel


 
Reply With Quote
 
 
 
 
mortb
Guest
Posts: n/a
 
      05-24-2004
Something like this:

<asp:datagrid id="myGrid" runat="server">
<Columns>
<asp:BoundColumn DataField="ItemName" Visible="False" />
<asp:ButtonColumn ItemStyle-VerticalAlign="Top"
ButtonType="LinkButton" Text="Print..." CommandName="cmdPrint" />
</Columns>
</asp:datagrid>


protected void gridModules_ItemCommand(object source,
DataGridCommandEventArgs e)
{
if(e.CommandName == "cmdPrint")
{
//do your stuff
}
}

cheers,
mortb




"Roel" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hello,
>
> I built an application that shows the file of a folder on a website.
>
> I present it by using a datagrid. Now, I want to add some functionalities

to
> the datagrid like, the possibility to delete the file. Therefore I use the
> deletecommand -event. But I also want to add print functionality... Does
> anyone knows how I can add a linkbutton to the datagrid that throws a
> specific event (ex. printcommand) ?
>
> Regards
> Roel
>
>



 
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
Re: How can I change the default Language Firefox uses for File and Menu Commands? Just aFax MAm Firefox 1 11-06-2005 05:45 PM
commands to configure WLAN adapter parameters =?Utf-8?B?SmFnYW4=?= Wireless Networking 0 10-05-2005 11:37 AM
Need Help Differentiating Bad Commands From Incomplete Commands Tim Stanka Python 1 08-02-2004 02:08 AM
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
Re: man pages for C commands (GCC commands) Ben Pfaff C Programming 4 06-28-2003 06:21 PM



Advertisments