Hi,
I have a unique problem.
I have two grids, I planned to populate them the same way using ObjectDataSource.
The first one populates fine. And for the second one I am using another ObjectDataSource which takes the parameter from the first RadGrid. Till here it works fine. It goes to the DB and gets the data based on the selected datakey from the first RadGrid.
Now the problem is that data does not show up in the second RadGrid. I can see the data in break mode, it just does not render on the page.
Any help would be much appreciated.
Below is the whole Aspx page.
Thank you,
-Sam
<%@ Page Title="" Language="C#" MasterPageFile="~/KIDMaster.Master" AutoEventWireup="false"
CodeBehind="RadGrid.aspx.cs" Inherits="KID_Admin_CSharp.RadGrid" %>
<%@ Register TagPrefix="tk" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<asp:ObjectDataSource ID="InterviewLocationObjectDataSource" runat="server" TypeName="KID_Admin_CSharp.DAL.KIDDAL"
SelectMethod="getInterviewMainData">
<SelectParameters>
<asp:FormParameter Name="viewIndicator" FormField="valueIndicator" DefaultValue="1" />
</SelectParameters>
</asp:ObjectDataSource>
<tk:RadAjaxManager ID="RadAjaxManager1" runat="server" EnableAJAX="true">
<AjaxSettings>
<tk:AjaxSetting AjaxControlID="grid">
<UpdatedControls>
<tk:AjaxUpdatedControl ControlID="grid" />
</UpdatedControls>
</tk:AjaxSetting>
</AjaxSettings>
</tk:RadAjaxManager>
<tk:RadGrid ID="grid" runat="server" AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False"
CellSpacing="0" GridLines="None" Skin="Transparent" DataSourceID="InterviewLocationObjectDataSource"
AlternatingItemStyle-BackColor="ControlLight" AllowAutomaticUpdates="true" AllowAutomaticDeletes="true"
OnSelectedIndexChanged="grid_SelectedIndexChanged">
<ClientSettings EnablePostBackOnRowClick="true" EnableRowHoverStyle="true">
<Selecting AllowRowSelect="true" />
</ClientSettings>
<MasterTableView DataKeyNames="intvw_seqno" ClientDataKeyNames="intvw_seqno, loc_seqno">
<RowIndicatorColumn>
<HeaderStyle Width="20px"></HeaderStyle>
</RowIndicatorColumn>
<Columns>
<tk:GridButtonColumn CommandName="Select" Text="Select" UniqueName="Select">
</tk:GridButtonColumn>
<tk:GridTemplateColumn HeaderText="Location Name">
<ItemTemplate>
<%# Eval("loc_location") %>
</ItemTemplate>
<HeaderStyle Font-Bold="true" HorizontalAlign="Center" />
</tk:GridTemplateColumn>
<tk:GridTemplateColumn HeaderText="Date">
<ItemTemplate>
<%# Eval("intvw_dt_end")%>
</ItemTemplate>
<HeaderStyle Font-Bold="true" HorizontalAlign="Center" />
</tk:GridTemplateColumn>
<tk:GridTemplateColumn HeaderText="Time">
<ItemTemplate>
<%# Eval("StartTime") %>
-
<%# Eval("EndTime") %>
</ItemTemplate>
<HeaderStyle Font-Bold="true" HorizontalAlign="Center" />
</tk:GridTemplateColumn>
</Columns>
</MasterTableView>
</tk:RadGrid>
<asp:ObjectDataSource ID="InterviewObjectDataSource" runat="server" TypeName="KID_Admin_CSharp.BLL.KIDBLL"
SelectMethod="getInterviewData" UpdateMethod="updateInterviewData" DeleteMethod="deleteInterviewData">
<SelectParameters>
<asp:ControlParameter ControlID="grid" DbType="String" Name="intvw_seqno" PropertyName="SelectedValues['intvw_seqno']"/>
</SelectParameters>
<UpdateParameters>
<asp:Parameter Type="Object" Name="UpdateValues" />
</UpdateParameters>
<UpdateParameters>
<asp:Parameter Type="String" Name="netID" />
</UpdateParameters>
<DeleteParameters>
<asp:Parameter Name="intvw_seqno" Type="String" />
</DeleteParameters>
</asp:ObjectDataSource>
<asp:HiddenField ID="interviewSeqNo" runat="server" />
<tk:RadGrid ID="DetailRadgrid" runat="server" AllowPaging="True" AllowSorting="True"
AutoGenerateColumns="False" CellSpacing="0" GridLines="None" Skin="Transparent"
DataSourceID="InterviewObjectDataSource" AlternatingItemStyle-BackColor="ControlLight"
AllowAutomaticUpdates="true" AllowAutomaticDeletes="true">
<MasterTableView EditMode="PopUp">
<Columns>
<tk:GridEditCommandColumn EditText="Details" />
<tk:GridTemplateColumn HeaderText="Location Name">
<ItemTemplate>
<%# Eval("loc_location") %>
</ItemTemplate>
<HeaderStyle Font-Bold="true" HorizontalAlign="Center" />
</tk:GridTemplateColumn>
<tk:GridTemplateColumn HeaderText="Date">
<ItemTemplate>
<%# Eval("intvw_dt_end") %>
</ItemTemplate>
<HeaderStyle Font-Bold="true" HorizontalAlign="Center" />
</tk:GridTemplateColumn>
<tk:GridTemplateColumn HeaderText="Time">
<ItemTemplate>
<%# Eval("StartTime") %>
-
<%# Eval("EndTime") %>
</ItemTemplate>
<HeaderStyle Font-Bold="true" HorizontalAlign="Center" />
</tk:GridTemplateColumn>
<tk:GridTemplateColumn HeaderText="Max Enrollment">
<ItemTemplate>
<%# Eval("intvw_max_enrollment") %>
</ItemTemplate>
<HeaderStyle Font-Bold="true" HorizontalAlign="Center" />
</tk:GridTemplateColumn>
<tk:GridTemplateColumn HeaderText="Status">
<ItemTemplate>
<%# Eval("intvw_status").ToString() == "True" ? "Active" : "Inactive" %>
</ItemTemplate>
<HeaderStyle Font-Bold="true" HorizontalAlign="Center" />
</tk:GridTemplateColumn>
<tk:GridTemplateColumn HeaderText="Locked">
<ItemTemplate>
<%#Eval("intvw_lock").ToString() == "True" ? "Locked" : "Unlocked"%>
</ItemTemplate>
<HeaderStyle Font-Bold="true" HorizontalAlign="Center" />
</tk:GridTemplateColumn>
</Columns>
</MasterTableView>
</tk:RadGrid>
</asp:Content>
I have a unique problem.
I have two grids, I planned to populate them the same way using ObjectDataSource.
The first one populates fine. And for the second one I am using another ObjectDataSource which takes the parameter from the first RadGrid. Till here it works fine. It goes to the DB and gets the data based on the selected datakey from the first RadGrid.
Now the problem is that data does not show up in the second RadGrid. I can see the data in break mode, it just does not render on the page.
Any help would be much appreciated.
Below is the whole Aspx page.
Thank you,
-Sam
<%@ Page Title="" Language="C#" MasterPageFile="~/KIDMaster.Master" AutoEventWireup="false"
CodeBehind="RadGrid.aspx.cs" Inherits="KID_Admin_CSharp.RadGrid" %>
<%@ Register TagPrefix="tk" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<asp:ObjectDataSource ID="InterviewLocationObjectDataSource" runat="server" TypeName="KID_Admin_CSharp.DAL.KIDDAL"
SelectMethod="getInterviewMainData">
<SelectParameters>
<asp:FormParameter Name="viewIndicator" FormField="valueIndicator" DefaultValue="1" />
</SelectParameters>
</asp:ObjectDataSource>
<tk:RadAjaxManager ID="RadAjaxManager1" runat="server" EnableAJAX="true">
<AjaxSettings>
<tk:AjaxSetting AjaxControlID="grid">
<UpdatedControls>
<tk:AjaxUpdatedControl ControlID="grid" />
</UpdatedControls>
</tk:AjaxSetting>
</AjaxSettings>
</tk:RadAjaxManager>
<tk:RadGrid ID="grid" runat="server" AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False"
CellSpacing="0" GridLines="None" Skin="Transparent" DataSourceID="InterviewLocationObjectDataSource"
AlternatingItemStyle-BackColor="ControlLight" AllowAutomaticUpdates="true" AllowAutomaticDeletes="true"
OnSelectedIndexChanged="grid_SelectedIndexChanged">
<ClientSettings EnablePostBackOnRowClick="true" EnableRowHoverStyle="true">
<Selecting AllowRowSelect="true" />
</ClientSettings>
<MasterTableView DataKeyNames="intvw_seqno" ClientDataKeyNames="intvw_seqno, loc_seqno">
<RowIndicatorColumn>
<HeaderStyle Width="20px"></HeaderStyle>
</RowIndicatorColumn>
<Columns>
<tk:GridButtonColumn CommandName="Select" Text="Select" UniqueName="Select">
</tk:GridButtonColumn>
<tk:GridTemplateColumn HeaderText="Location Name">
<ItemTemplate>
<%# Eval("loc_location") %>
</ItemTemplate>
<HeaderStyle Font-Bold="true" HorizontalAlign="Center" />
</tk:GridTemplateColumn>
<tk:GridTemplateColumn HeaderText="Date">
<ItemTemplate>
<%# Eval("intvw_dt_end")%>
</ItemTemplate>
<HeaderStyle Font-Bold="true" HorizontalAlign="Center" />
</tk:GridTemplateColumn>
<tk:GridTemplateColumn HeaderText="Time">
<ItemTemplate>
<%# Eval("StartTime") %>
-
<%# Eval("EndTime") %>
</ItemTemplate>
<HeaderStyle Font-Bold="true" HorizontalAlign="Center" />
</tk:GridTemplateColumn>
</Columns>
</MasterTableView>
</tk:RadGrid>
<asp:ObjectDataSource ID="InterviewObjectDataSource" runat="server" TypeName="KID_Admin_CSharp.BLL.KIDBLL"
SelectMethod="getInterviewData" UpdateMethod="updateInterviewData" DeleteMethod="deleteInterviewData">
<SelectParameters>
<asp:ControlParameter ControlID="grid" DbType="String" Name="intvw_seqno" PropertyName="SelectedValues['intvw_seqno']"/>
</SelectParameters>
<UpdateParameters>
<asp:Parameter Type="Object" Name="UpdateValues" />
</UpdateParameters>
<UpdateParameters>
<asp:Parameter Type="String" Name="netID" />
</UpdateParameters>
<DeleteParameters>
<asp:Parameter Name="intvw_seqno" Type="String" />
</DeleteParameters>
</asp:ObjectDataSource>
<asp:HiddenField ID="interviewSeqNo" runat="server" />
<tk:RadGrid ID="DetailRadgrid" runat="server" AllowPaging="True" AllowSorting="True"
AutoGenerateColumns="False" CellSpacing="0" GridLines="None" Skin="Transparent"
DataSourceID="InterviewObjectDataSource" AlternatingItemStyle-BackColor="ControlLight"
AllowAutomaticUpdates="true" AllowAutomaticDeletes="true">
<MasterTableView EditMode="PopUp">
<Columns>
<tk:GridEditCommandColumn EditText="Details" />
<tk:GridTemplateColumn HeaderText="Location Name">
<ItemTemplate>
<%# Eval("loc_location") %>
</ItemTemplate>
<HeaderStyle Font-Bold="true" HorizontalAlign="Center" />
</tk:GridTemplateColumn>
<tk:GridTemplateColumn HeaderText="Date">
<ItemTemplate>
<%# Eval("intvw_dt_end") %>
</ItemTemplate>
<HeaderStyle Font-Bold="true" HorizontalAlign="Center" />
</tk:GridTemplateColumn>
<tk:GridTemplateColumn HeaderText="Time">
<ItemTemplate>
<%# Eval("StartTime") %>
-
<%# Eval("EndTime") %>
</ItemTemplate>
<HeaderStyle Font-Bold="true" HorizontalAlign="Center" />
</tk:GridTemplateColumn>
<tk:GridTemplateColumn HeaderText="Max Enrollment">
<ItemTemplate>
<%# Eval("intvw_max_enrollment") %>
</ItemTemplate>
<HeaderStyle Font-Bold="true" HorizontalAlign="Center" />
</tk:GridTemplateColumn>
<tk:GridTemplateColumn HeaderText="Status">
<ItemTemplate>
<%# Eval("intvw_status").ToString() == "True" ? "Active" : "Inactive" %>
</ItemTemplate>
<HeaderStyle Font-Bold="true" HorizontalAlign="Center" />
</tk:GridTemplateColumn>
<tk:GridTemplateColumn HeaderText="Locked">
<ItemTemplate>
<%#Eval("intvw_lock").ToString() == "True" ? "Locked" : "Unlocked"%>
</ItemTemplate>
<HeaderStyle Font-Bold="true" HorizontalAlign="Center" />
</tk:GridTemplateColumn>
</Columns>
</MasterTableView>
</tk:RadGrid>
</asp:Content>