Hi -
I'm new to programming... so this might be a simple fix. What I'd like to do is use a linkbutton to select a row of data, put that data into a session variable, then redirect to a page that will display the selected data. Right now I'm trying to figure out how to use the linkbutton to select the row.
Here is my linkbutton
There are no onClick properties for the GridButtonColumn. How would I initiate the event from this button?
Next, here is what I have for the behind code... once I can figure out where to put it in an event... but I know I'm missing a lot of the code...
Here is my Grid, which is a table of what I'm calling SOI data (I have an SOI class in the BO):
I want to use the ID column, that is hidden, to grab the soi data.
What other information would be helpful to give out to solve my problem? Did I not explain something well enough?
Also, we are using an Entity Framework, and Visual Studio 2008.
wen
I'm new to programming... so this might be a simple fix. What I'd like to do is use a linkbutton to select a row of data, put that data into a session variable, then redirect to a page that will display the selected data. Right now I'm trying to figure out how to use the linkbutton to select the row.
Here is my linkbutton
<telerik:GridButtonColumn ButtonType="LinkButton" Text="Select" UniqueName="ButtonColumn"> |
<HeaderStyle Width="50px" /> |
</telerik:GridButtonColumn> |
Next, here is what I have for the behind code... once I can figure out where to put it in an event... but I know I'm missing a lot of the code...
RadPanelItem SOISearchItem = (RadPanelItem)RadPanelBar1.FindItemByValue("SOISearch"); |
RadGrid soiRadGrid = (RadGrid)SOISearchItem.FindControl("SoiRadGrid"); |
LinkButton linkButton = (LinkButton)SOISearchItem.FindControl("LinkButton"); |
if (soiRadGrid.SelectedItems.Count > 0) |
{ |
GridItem selectedItem; |
// grab selected row |
} |
Session[Tip.Utility.UIConstants.SoiSession] = soi; // soi is my class variable |
Response.Redirect("SOI.aspx"); |
Here is my Grid, which is a table of what I'm calling SOI data (I have an SOI class in the BO):
<telerik:RadGrid ID="SoiRadGrid" runat="server" |
AllowSorting="False" |
GridLines="None" |
Skin="WebBlue" |
AllowFilteringByColumn="False" |
AllowPaging="False" |
ShowGroupPanel="True"> |
<ClientSettings Resizing-AllowColumnResize="true" AllowKeyboardNavigation="false"></ClientSettings> |
<MasterTableView AutoGenerateColumns="False" PageSize="5"> |
<RowIndicatorColumn> |
<HeaderStyle Width="20px" /> |
</RowIndicatorColumn> |
<ExpandCollapseColumn> |
<HeaderStyle Width="20px" /> |
</ExpandCollapseColumn> |
<Columns> |
<telerik:GridButtonColumn ButtonType="LinkButton" Text="Select" UniqueName="ButtonColumn"> |
<HeaderStyle Width="50px" /> |
</telerik:GridButtonColumn> |
<telerik:GridBoundColumn DataField="ID" HeaderText="ID" Visible="false"></telerik:GridBoundColumn> |
<telerik:GridBoundColumn DataField="Tier" HeaderText="Tier"></telerik:GridBoundColumn> |
<telerik:GridBoundColumn DataField="Org" HeaderText="Org"></telerik:GridBoundColumn> |
<telerik:GridBoundColumn DataField="ProjectGroup" HeaderText="Project Group"></telerik:GridBoundColumn> |
<telerik:GridBoundColumn DataField="RequestingEntity" HeaderText="Requesting Entity"></telerik:GridBoundColumn> |
<telerik:GridBoundColumn DataField="SubmittalDate" HeaderText="Submittal Date"></telerik:GridBoundColumn> |
<telerik:GridBoundColumn DataField="ContactInfo" HeaderText="Contact Info"></telerik:GridBoundColumn> |
<telerik:GridBoundColumn DataField="Unredacted" HeaderText="Unredacted"></telerik:GridBoundColumn> |
<telerik:GridBoundColumn DataField="Redacted" HeaderText="Redacted"></telerik:GridBoundColumn> |
</Columns> |
</MasterTableView> |
<ClientSettings AllowDragToGroup="True"> |
<Scrolling AllowScroll="True" UseStaticHeaders="True" /> |
</ClientSettings> |
</telerik:RadGrid> |
I want to use the ID column, that is hidden, to grab the soi data.
What other information would be helpful to give out to solve my problem? Did I not explain something well enough?
Also, we are using an Entity Framework, and Visual Studio 2008.
wen