I have a grid that is used to display meta-data for files that have been uploaded to my app. I have two GridButtonColumns in the grid: one to Delete the doc shown on the row, and another to Save/View the doc.
I got the Delete command to work fine using the Command="Delete" attribute on the GridButtonColumn (shown below). However, I'm having some difficulty telling the grid to use a custom handler that I've written on the second GridButtonColumn. All I need to know how to do is to assign a custom handler to the GridButtonColumn where I can then ignore the validators on the page and open the file.
Any input is greatly appreciated. Thanks.
Marty
Grid:
| <telerik:RadGrid ID="GrdDocs" runat="server" GridLines="None" ShowGroupPanel="True" |
| AutoGenerateColumns="False" AllowPaging="True" OnNeedDataSource="GrdDocs_OnNeedDataSource" |
| OnDeleteCommand="GrdDocs_OnDelete"> |
| <HeaderContextMenu EnableTheming="True"> |
| <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation> |
| </HeaderContextMenu> |
| <MasterTableView DataKeyNames="DocumentID"> |
| <RowIndicatorColumn> |
| <HeaderStyle Width="20px"></HeaderStyle> |
| </RowIndicatorColumn> |
| <ExpandCollapseColumn> |
| <HeaderStyle Width="20px"></HeaderStyle> |
| </ExpandCollapseColumn> |
| <Columns> |
| <telerik:GridBoundColumn DataField="DocumentID" EmptyDataText="&nbsp;" HeaderText="Document ID" |
| UniqueName="column" Visible="False"> |
| </telerik:GridBoundColumn> |
| <telerik:GridBoundColumn DataField="FileName" EmptyDataText="&nbsp;" HeaderText="File Name" |
| UniqueName="column1"> |
| </telerik:GridBoundColumn> |
| <telerik:GridBoundColumn DataField="DateUploaded" EmptyDataText="&nbsp;" HeaderText="Date Uploaded" |
| UniqueName="column2"> |
| </telerik:GridBoundColumn> |
| <telerik:GridBoundColumn DataField="AddedBy" EmptyDataText="&nbsp;" HeaderText="Added By" |
| UniqueName="column3"> |
| </telerik:GridBoundColumn> |
| <telerik:GridButtonColumn ButtonType="LinkButton" Text="Delete" UniqueName="colDelete" |
| CommandName="Delete"> |
| </telerik:GridButtonColumn> |
| <telerik:GridButtonColumn ButtonType="LinkButton" Text="Save/View" UniqueName="colSave" > |
| </telerik:GridButtonColumn> |
| </Columns> |
| </MasterTableView> |
| <FilterMenu EnableTheming="True"> |
| <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation> |
| </FilterMenu> |
| </telerik:RadGrid> |