473,396 Members | 2,011 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

A question about datagrid

Joe
Hi,

I want to display the contents of the folder. I am using a datagrid control
to display Filename, size, last modified, last accessed, download, delete
etc. I have pasted my code below so that you can see where I am making a
mistake.
For some reason when Download button is pressed, sub
articleList_DownloadFile is not getting called. When I click on Delete
button, sub articleList_DeleteFile is getting called.

Thanks again for your reply.

Joe
<form runat="server">
<asp:label runat="server" id="lblMessage" Font-Italic="True"
ForeColor="Red" />
<asp:DataGrid runat="server" id="articleList" Font-Name="Verdana"
AutoGenerateColumns="False" AlternatingItemStyle-BackColor="#eeeeee"
HeaderStyle-BackColor="Navy" HeaderStyle-ForeColor="White"
HeaderStyle-Font-Size="15pt" HeaderStyle-Font-Bold="True"
DataKeyField="FullName"
OnItemDataBound="articleList_ItemDataBound"
OnDeleteCommand="articleList_DeleteFile"
OnEditCommand="articleList_DownloadFile">
<Columns>
<asp:ButtonColumn Text="Delete" ButtonType="PushButton"
CommandName="Delete" />
<asp:ButtonColumn Text="Download" ButtonType="PushButton"
CommandName="Edit" />
<asp:HyperLinkColumn DataNavigateUrlField="Name" DataTextField="Name"
HeaderText="File Name" />
<asp:BoundColumn DataField="LastWriteTime" HeaderText="Last Write Time"
ItemStyle-HorizontalAlign="Center" DataFormatString="{0:d}" />
<asp:BoundColumn DataField="Length" HeaderText="File Size"
ItemStyle-HorizontalAlign="Right" DataFormatString="{0:#,### bytes}" />
</Columns>
</asp:DataGrid>
</form>
Nov 19 '05 #1
0 718

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

Similar topics

3
by: Irakli Lomidze | last post by:
Dear Sirs. I Have Question About Calculed Fields. i have 5 Fields From Database Query And Want add 6-th Field6 that is Calcued Based on that 5 fields. but it calculation reque call function...
4
by: Gidi | last post by:
hello i have a DataGrid Table and i want to select a row by Clicking the mouse after i tried few times, i understood the the only event the the datagird respones to is the current_cell_chang and...
1
by: Gidi | last post by:
hello i have a DataGrid table and by the help of Adnan, here in the forum, i have the Mouse_up Event that by Clicking a row on the dataGrid it's selectes the whole ro the problem is when i'm...
0
by: Jason | last post by:
I am pretty new to C# so bare with me... The design of my website utilizes tables on every page that look almost identical, save the data they are displaying. I have written the code to create...
0
by: smith.felicity | last post by:
I have two questions about using the data grid and c# If one of my columns returned in my dataset is null I want another column to be used in the displayed column. So this is what my datagrid...
2
by: Alpha | last post by:
Hi, Where is a good place on the internet for me to learn about how to use the datagrid. My grid's datasource is a dataset with one table from a DB. I need to know how to perform Edit, Delete and...
1
by: Sky | last post by:
Although I've been using C# for the last month or so, and accepting out of blind faith the ViewState, I do have some nagging questions about it... can you help verify the following statements? ...
1
by: Nikhil Patel | last post by:
Hi all, What is the best way to allow the administrator of the application to select which columns are displayed in a Databound grid in an aspx form. I was thinking of creating a form and display...
3
by: Bob Taylor | last post by:
Hi everybody, I have a question about the datagrid. I have a datagrid and I have set the datasource property to equal a dataset. the datagrid fills up with the columns (prodno, description,...
1
by: PiPOW | last post by:
Hi. I have a question. I am developing an application and I have to choose the most suitable control to show records from some database queries, with freedom in customizing control layout and...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
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
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...
0
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
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...
0
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...
0
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...

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.