Hi,
I have a hierarchy situation where the child table is not getting data.
this gets the child data, but redisplays it for every mastertable record i expand.
<asp:LinqDataSource ID="LinqDataSource2" runat="server" ContextTypeName="iqLinqDataClassesDataContext"
TableName="WorkoutsDetails" AutoPage="true"
Select="new (wodMemberNo, wodWorkoutNo, wodWorkoutSeq, wodExerciseNo, wodComments)"
</asp:LinqDataSource>
This gets the child data for each mastertable record as well.
<asp:LinqDataSource ID="LinqDataSource2" runat="server" ContextTypeName="iqLinqDataClassesDataContext"
TableName="WorkoutsDetails" AutoPage="true"
Select="new (wodMemberNo, wodWorkoutNo, wodWorkoutSeq, wodExerciseNo, wodComments)"
Where="wodMemberNo=2 && wodWorkoutNo=2" >
</asp:LinqDataSource>
This gets me an error message that says no child data.
<asp:LinqDataSource ID="LinqDataSource2" runat="server" ContextTypeName="iqLinqDataClassesDataContext"
TableName="WorkoutsDetails" AutoPage="true"
Select="new (wodMemberNo, wodWorkoutNo, wodWorkoutSeq, wodExerciseNo, wodComments)"
Where="wodMemberNo=@wrMemberNo && wodWorkoutNo=@wrNumber" >
<WhereParameters>
<asp:ControlParameter ControlID="RadGrid2" DefaultValue="0"
Name="wrMemberNo" Type="Int32" PropertyName="SelectedValue['wrMemberNo']" />
<asp:ControlParameter ControlID="RadGrid2" DefaultValue="0"
Name="wrNumber" Type="Int32" PropertyName="SelectedValue['wrNumber']" />
</WhereParameters>
</asp:LinqDataSource>
Because ( Where="wodMemberNo=2 && wodWorkoutNo=2" >) gets my child data, it gives me the impression that my Whereparameter and ControlParameter are not picking up the DataKeyNames in my mastertable.
HERE IS MY RADGRID2 CODE:
<telerik:RadGrid ID="RadGrid2" runat="server" AllowPaging="True" AllowSorting="True" DataSourceID="LinqDataSource2" GridLines="None" ShowGroupPanel="True" Skin="Sunset" AllowAutomaticInserts="True" AllowAutomaticUpdates="True" AllowAutomaticDeletes="True" AutoGenerateDeleteColumn="True" AutoGenerateEditColumn="True"> <HeaderContextMenu EnableTheming="True" Skin="Sunset"> <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation> </HeaderContextMenu>
<MasterTableView AutoGenerateColumns="False" CommandItemDisplay="TopAndBottom" DataKeyNames="wrMemberNo,wrNumber" DataSourceID="LinqDataSourceWorkOuts" OnSelectedIndexChanged="radchanged"> <RowIndicatorColumn HeaderText="rOW">
<HeaderStyle Width="20px"></HeaderStyle> </RowIndicatorColumn>
<ExpandCollapseColumn CommandName="lapse"> <HeaderStyle Width="20px"></HeaderStyle>
</ExpandCollapseColumn>
<Columns>
<telerik:GridButtonColumn CommandName="Select" Text="Select" /> <telerik:GridBoundColumn DataField="wrMemberNo" DataType="System.Int32" HeaderText="wrMemberNo" SortExpression="wrMemberNo" UniqueName="wrMemberNo" ReadOnly="True">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="wrNumber" DataType="System.Int32" HeaderText="wrNumber"SortExpression="wrNumber" UniqueName="wrNumber" ReadOnly="True"> </telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="wrWorkoutName" HeaderText="wrWorkoutName" SortExpression="wrWorkoutName" UniqueName="wrWorkoutName"> </telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="wrWorkoutLocationNo" DataType="System.Int32" HeaderText="wrWorkoutLocationNo" SortExpression="wrWorkoutLocationNo" UniqueName="wrWorkoutLocationNo">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="wrWorkoutDescription" HeaderText="wrWorkoutDescription"
SortExpression="wrWorkoutDescription" UniqueName="wrWorkoutDescription"> </telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="wrWorkoutTypeNo" DataType="System.Int32" HeaderText="wrWorkoutTypeNo" SortExpression="wrWorkoutTypeNo" UniqueName="wrWorkoutTypeNo"> </telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="wrDateCreated" DataType="System.DateTime" HeaderText="wrDateCreated"SortExpression="wrDateCreated" UniqueName="wrDateCreated"> </telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="wrDateUpdated" DataType="System.DateTime" HeaderText="wrDateUpdated"SortExpression="wrDateUpdated" UniqueName="wrDateUpdated"> </telerik:GridBoundColumn>
</Columns>
<DetailTables>
<telerik:GridTableView DataKeyNames="wodMemberNo,wodWorkoutNo" DataSourceID="LinqDataSource2" Width="100%" runat="server"> <ParentTableRelation>
<telerik:GridRelationFields DetailKeyField="wodMemberNo,wodWorkoutNo" MasterKeyField="wrMemberNo,wrNumber" />
</ParentTableRelation>
<RowIndicatorColumn>
<HeaderStyle Width="20px"></HeaderStyle>
</RowIndicatorColumn> <ExpandCollapseColumn>
<HeaderStyle Width="20px"></HeaderStyle> </ExpandCollapseColumn>
<Columns>
</Columns>
<SortExpressions>
<telerik:GridSortExpression FieldName="wodWorkoutSeq"></telerik:GridSortExpression>
</SortExpressions>
</telerik:GridTableView>
</DetailTables> </MasterTableView>
<ClientSettings AllowDragToGroup="True">
<Scrolling AllowScroll="True" UseStaticHeaders="True" /> </ClientSettings>
<FilterMenu EnableTheming="True" Skin="Sunset">
<CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation> </FilterMenu>
</telerik:RadGrid>
Thanks for your help.
Hello,
Is that possible in the calender that when we select the muliple date in a month then in the calender control Header should show the Date Start to Date End?
Example -:
Suppose i have Select the date from 26 Jan to 31 jan then in the Header it Should show the
Jan,26th - Jan,31st
just above the month.
Thanks and regards
Manoj

Hi,
I've been struggling with the following problem for a couple of hours now;
basically I am creating windows dynamically using radopen, when the user wants to close one of these windows I want to show a confirmation asking them if they are sure if they want to close the window or not (if they click ok the window closes, if they click cancel the window stays).
I've put together the following scripts to try to achive this:
//this code taken from http://www.telerik.com/community/forums/aspnet-ajax/window/cancelling-close-request.aspx
Telerik.Web.UI.RadWindow.prototype.oldClose = Telerik.Web.UI.RadWindow.prototype.close; //keep reference to old close method
Telerik.Web.UI.RadWindow.prototype.close = function(callBackFnArg) { //override the close window's close method
ClosingWindow = callBackFnArg;
if (radconfirm('Are you sure?', windowClosed, 330, 100)) //rad confirm is non blocking so the if doesn't get a chance to fire
{
var manager = GetRadWindowManager();
this.oldClose(callBackFnArg); //this works fine
this.oldClose(manager.getActiveWindow()); //this also works ok
}
};
//call back function for the radconfirm
function windowClosed(arg)
{
if (arg)
{
var manager = GetRadWindowManager();
this.oldClose(manager.getActiveWindow()); //object doesn't support this method error
Telerik.Web.UI.RadWindow.prototype.oldClose(manager.getActiveWindow()); //doesn't do anything
manager.closeActiveWindow(); //can't use this as we have overriden the standard close functionality
document.getElementById('<%=btnClose.ClientID%>').click();
}
else
{
//do nothing
}
}
As you can see from above the only way I can get the window to close is if I call this.Close from within the overriden window close function, if I try to close the window from within the windowClosed function I either get an error (depending on which of the lines I execute) or nothing happens, I can't use the overriden window close function because the if will never fire (because the radconfirm prompt is non blocking).
If I replace the radconfirm with a regular javascript alert everything is fine but I'd like to use the radconfirm.
Any ideas?
Thanks.