
protected void ActivitiesData_Selecting(object sender, LinqDataSourceSelectEventArgs e)
{
DevelopmentPlanRepository dvp = new DevelopmentPlanRepository(Conn);
e.Result = dvp.GetActivitiesForGoal(
Convert.ToInt32(e.SelectParameters["GoalId"]));
}
<
telerik:RadGrid ID="DevelopmentGoalGrid" runat="server" AllowPaging="True"
AllowSorting="True" DataSourceID="GoalsData" GridLines="None">
<
MasterTableView DataKeyNames="GoalId" DataSourceID="GoalsData">
<DetailTables>
<telerik:GridTableView DataKeyNames="ActivityID" DataSourceID="ActivitiesData" Width="100%"
runat="server" AutoGenerateColumns="true">
<ParentTableRelation>
<telerik:GridRelationFields DetailKeyField="GoalId" MasterKeyField="GoalId" />
</ParentTableRelation>
<RowIndicatorColumn>
<HeaderStyle Width="20px" />
</RowIndicatorColumn>
<ExpandCollapseColumn>
<HeaderStyle Width="20px" />
</ExpandCollapseColumn>
</telerik:GridTableView>
</DetailTables>
<
RowIndicatorColumn>
<
HeaderStyle Width="20px"></HeaderStyle>
</
RowIndicatorColumn>
<
ExpandCollapseColumn Visible="True">
<
HeaderStyle Width="20px"></HeaderStyle>
</
ExpandCollapseColumn>
</
MasterTableView>
<ClientSettings>
<Selecting AllowRowSelect="True" />
</ClientSettings>
</
telerik:RadGrid>
<
p>
</p>
<
p>
</p>
<
asp:LinqDataSource ID="GoalsData" runat="server"
onselecting="GoalsData_Selecting">
</
asp:LinqDataSource>
<
asp:LinqDataSource ID="ActivitiesData" runat="server"
onselecting="ActivitiesData_Selecting">
<SelectParameters>
<asp:Parameter Name="GoalId" Type="Int32" />
</SelectParameters>
</
asp:LinqDataSource>
I am trying to print the content from the radwindow on a full page.
I have tried an onload and print() on the page that opens in the rad window. I have tried:
function
GetRadWindow()
{
var oWindow = null;
if (window.radWindow) oWindow = window.radWindow;
else if (window.frameElement.radWindow) oWindow = window.frameElement.radWindow;
return oWindow;
}
function Print()
{
var oWnd = GetRadWindowManager().GetWindowByName("twPrint");
oWnd.GetContentFrame().contentWindow.print()
}
The problem is that no matter what way I try to print the content, It's like printing a screen shot of the parent window with the rad window content on top. Any way to fix this?
Hello all. I am currently having a problem getting the DataKeyValue from
my DetailTables data. The MasterTableView works fine, however, the
same logic does not work with DetailTables. I have searched the forum
and cannot fine any reference to this problem before. Anyone have any
clues? Code posted below. Thanks in advance.
| <telerik:RadGrid ID="RadGrid1" DataSourceID="SqlDataSource1" runat="server" Width="97%" AutoGenerateColumns="False" AllowSorting="True" ShowStatusBar="true" Skin="Office2007"> |
| <MasterTableView DataSourceID="SqlDataSource1" DataKeyNames="EventID" AllowMultiColumnSorting="True" Width="100%" Name="EventTable" ClientDataKeyNames="EventID"> |
| <DetailTables> |
| <telerik:GridTableView DataKeyNames="DataID" DataSourceID="SqlDataSource2" |
| runat="server" Width="100%" TableLayout="Fixed" Name="DataTable" ClientDataKeyNames="DataID"> |
| <ParentTableRelation> |
| <telerik:GridRelationFields DetailKeyField="EventID" MasterKeyField="EventID" /> |
| </ParentTableRelation> |
| <Columns> |
| <telerik:GridBoundColumn HeaderText="Data ID" DataField="DataID" /> |
| <telerik:GridBoundColumn HeaderText="Requirement" DataField="DataReqr" /> |
| <telerik:GridBoundColumn HeaderText="Unit Sourced" DataField="DataUS" /> |
| </Columns> |
| </telerik:GridTableView> |
| </DetailTables> |
| <Columns> |
| <telerik:GridBoundColumn HeaderText="Name" DataField="EventName" HeaderStyle-Width="200px" /> |
| <telerik:GridBoundColumn HeaderText="Event AOR" DataField="EventAOR" HeaderStyle-Width="200px" /> |
| </Columns> |
| <GroupByExpressions> |
| <telerik:GridGroupByExpression> |
| <SelectFields> |
| <telerik:GridGroupByField FieldAlias="FY" FieldName="EventFY" /> |
| </SelectFields> |
| <GroupByFields> |
| <telerik:GridGroupByField FieldName="EventFY" /> |
| </GroupByFields> |
| </telerik:GridGroupByExpression> |
| </GroupByExpressions> |
| </MasterTableView> |
| <ClientSettings ReorderColumnsOnClient="True" AllowColumnsReorder="True"> |
| <ClientEvents OnRowClick="RowClicked" /> |
| <Selecting AllowRowSelect="true" /> |
| </ClientSettings> |
| </telerik:RadGrid> |
| <script type="text/javascript"> |
| function RowClicked(sender, args) { |
| if(args.get_tableView().get_name() == "EventTable") |
| alert(args.getDataKeyValue("EventID")); |
| if (args.get_tableView().get_name() == "DataTable") |
| alert(args.getDataKeyValue("EventID")); |
| } |
| </script> |