I have an application that has a RadPageView embedded with a RadGrid. I would like the webpage to pop up a radwindow when user click a row on the Radgrid. In the Radwindow, I would like to show data in a Datalist. Somehow, the Radwindow opens with no data in it.
I am trying to do the similar to this sample: http://demos.telerik.com/aspnet-ajax/window/examples/internalcontent/defaultcs.aspx . The difference is I would like the radwindow to pop up in stead of showing in the beginning. Also, I would like to use the Datalist to format the data more flexibly than the Dataview.
Please help. Thanks in advance!
I am trying to do the similar to this sample: http://demos.telerik.com/aspnet-ajax/window/examples/internalcontent/defaultcs.aspx . The difference is I would like the radwindow to pop up in stead of showing in the beginning. Also, I would like to use the Datalist to format the data more flexibly than the Dataview.
Please help. Thanks in advance!
<telerik:RadPageView ID="RadPageView2" runat="server"> <br /> <div> <asp:HiddenField ID="HiddenField1" Value="50125" runat="server" /> <telerik:RadGrid ID="RadGridClaimPayments" runat="server" AutoGenerateColumns="false" Skin="Office2007" Width="98%" EnableViewState="true" AutoGenerateHierarchy="false" OnDetailTableDataBind="RadGridClaimPayments_DetailTableDataBind" DataKeyNames="CheckNo"> <clientsettings AllowKeyboardNavigation="true" EnablePostBackOnRowClick="true" > <Scrolling AllowScroll="false" ScrollHeight="300px" UseStaticHeaders="false" /> <Selecting AllowRowSelect="true"/> <ClientEvents OnRowSelected="RadGridClaimPayments_RowSelected" /> </clientsettings> <mastertableview datakeynames="CheckNo" Name="CheckInfo" EnableViewState="true" ClientDataKeyNames="CheckNo" > <Columns> <telerik:GridBoundColumn DataField="TranYear" HeaderText="TranYear" ItemStyle-HorizontalAlign="Left" ReadOnly="True" SortExpression="TranYear" Visible="false"/> <telerik:GridBoundColumn DataField="crdate" HeaderText="Check Date" ItemStyle-HorizontalAlign="Left" ReadOnly="True" SortExpression="crdate" DataFormatString="{0:MM/dd/yyyy}" /> <telerik:GridBoundColumn DataField="CheckNo" HeaderText="Check No" ItemStyle-HorizontalAlign="Left" ReadOnly="True" SortExpression="CheckNo" /> <telerik:GridBoundColumn DataField="amount" HeaderText="Check Amount" ItemStyle-HorizontalAlign="Left" ReadOnly="True" SortExpression="amount" DataFormatString="{0:C}" /> <telerik:GridBoundColumn DataField="Status" HeaderText="Status" ItemStyle-HorizontalAlign="Left" ReadOnly="True" SortExpression="Status" Visible="false" /> <telerik:GridBoundColumn DataField="payment" HeaderText="Check Description" ItemStyle-HorizontalAlign="Left" ReadOnly="True" SortExpression="payment" /> <telerik:GridBoundColumn DataField="claimno" HeaderText="Claim No." ItemStyle-HorizontalAlign="Center" ReadOnly="True" SortExpression="claimno" Visible="false" /> <telerik:GridBoundColumn DataField="lossdate" HeaderText="Loss Date" ItemStyle-HorizontalAlign="Left" ReadOnly="True" SortExpression="lossdate" DataFormatString="{0:MM/dd/yyyy}" Visible="false" /> <telerik:GridBoundColumn DataField="reporteddate" HeaderText="Report Date" ItemStyle-HorizontalAlign="Left" ReadOnly="True" SortExpression="reporteddate" DataFormatString="{0:MM/dd/yyyy}" Visible="false" /> <telerik:GridBoundColumn DataField="Adjuster" HeaderText="Adjuster" ItemStyle-HorizontalAlign="Left" ReadOnly="True" SortExpression="Adjuster" Visible="false" /> <telerik:GridBoundColumn DataField="OutstandingRes" HeaderText="Outstanding Res" ItemStyle-HorizontalAlign="Left" ReadOnly="True" SortExpression="OutstandingRes" DataFormatString="{0:C}" Visible="false" /> </Columns> <GroupByExpressions> <telerik:GridGroupByExpression> <GroupByFields> <telerik:GridGroupByField FieldName="TranYear" HeaderText="Year" /> </GroupByFields> <SelectFields> <telerik:GridGroupByField FieldName="TranYear" HeaderText="Year" /> </SelectFields> </telerik:GridGroupByExpression> </GroupByExpressions> <detailtables > <telerik:GridTableView runat="server" Name="CheckDetails" HierarchyLoadMode="ServerOnDemand" > <ParentTableRelation> <telerik:GridRelationFields DetailKeyField="CheckNo" MasterKeyField="CheckNo" /> </ParentTableRelation> <Columns> <telerik:GridBoundColumn DataField="CheckNo" HeaderText="Check No" ItemStyle-HorizontalAlign="Left" ReadOnly="True" SortExpression="CheckNo" Visible="false"/> <telerik:GridBoundColumn DataField="checkgroup" HeaderText="Check Type" ItemStyle-HorizontalAlign="Left" ReadOnly="True" SortExpression="checkgroup"/> <telerik:GridBoundColumn DataField="lossdate" HeaderText="Loss Date" ItemStyle-HorizontalAlign="Left" ReadOnly="True" SortExpression="lossdate" DataFormatString="{0:MM/dd/yyyy}" /> <telerik:GridBoundColumn DataField="insuredprimary" HeaderText="Insured" ItemStyle-HorizontalAlign="Left" ReadOnly="True" SortExpression="Insured" /> <telerik:GridBoundColumn DataField="claimant" HeaderText="Claimant" ItemStyle-HorizontalAlign="Left" ReadOnly="True" SortExpression="claimant" /> <telerik:GridBoundColumn DataField="companyname1" HeaderText="Insolvent Company" ItemStyle-HorizontalAlign="Left" ReadOnly="True" SortExpression="companyname1" /> <telerik:GridBoundColumn DataField="claimno" HeaderText="Claimno" ItemStyle-HorizontalAlign="Left" ReadOnly="True" SortExpression="claimno" /> <telerik:GridBoundColumn DataField="policyno" HeaderText="Policy Number" ItemStyle-HorizontalAlign="Left" ReadOnly="True" SortExpression="policyno" /> <telerik:GridBoundColumn DataField="issuedt" HeaderText="Date Issued" ItemStyle-HorizontalAlign="Left" ReadOnly="True" SortExpression="issuedate" DataFormatString="{0:MM/dd/yyyy}" Visible="false"/> <telerik:GridBoundColumn DataField="payeeidno" HeaderText="IRS NO" ItemStyle-HorizontalAlign="Left" ReadOnly="True" SortExpression="IRSNO" /> <telerik:GridBoundColumn DataField="checkamount" HeaderText="Amount" ItemStyle-HorizontalAlign="Left" ReadOnly="True" SortExpression="amount" DataFormatString="{0:C}" /> <telerik:GridBoundColumn DataField="amounttext" HeaderText="Comments" ItemStyle-HorizontalAlign="Left" ReadOnly="True" SortExpression="amounttext" /> <telerik:GridBoundColumn DataField="mailtoname1" HeaderText="Address" ItemStyle-HorizontalAlign="Left" ReadOnly="True" SortExpression="mailtoname1" /> <telerik:GridBoundColumn DataField="mailtoname2" HeaderText="Address1" ItemStyle-HorizontalAlign="Left" ReadOnly="True" SortExpression="mailtoname2" /> <telerik:GridBoundColumn DataField="mailtoaddr1" HeaderText="Address3" ItemStyle-HorizontalAlign="Left" ReadOnly="True" SortExpression="mailtoaddr1" /> </Columns> </telerik:GridTableView> </detailtables> </mastertableview> </telerik:RadGrid> <telerik:RadWindow ID="CheckImageRadWin" runat="server" Title="Check Image Window" Width="900" Height="536" VisibleOnPageLoad="false" Behaviors ="Minimize, Move, Resize, Maximize,Close" OffsetElementID="RadGridClaimPayments" Left="140" Top="50" EnableShadow="true" > <ContentTemplate> <div style="text-align: center; border-bottom-width: 8px;"> Check No: <asp:Label ID="lblcheckno" Runat="server" Visible="true"></asp:Label> <asp:Datalist ID="dlCheckImageInfo" runat="server" ShowHeader="true" Font-Size="Small" BorderColor="black" CellPadding="3" GridLines="Both" DataSourceID="SqlDataSource1"> <HeaderTemplate> <table> </HeaderTemplate> <ItemTemplate> <tr> <td colspan="2" rowspan="6"> </td> <td> INSURED </td> <td> CLAIM NUMBER </td> </tr> <tr> <td> <%# DataBinder.Eval(Container.DataItem, "insuredprimary")%> </td> <td> <%# DataBinder.Eval(Container.DataItem, "claimno")%> </td> </tr> <tr> <td> CLAIMANT </td> <td> POLICY NUMBER </td> </tr> <tr> <td> <%# DataBinder.Eval(Container.DataItem, "claimant")%> </td> <td> <%# DataBinder.Eval(Container.DataItem, "policyno")%> </td> </tr> <tr> <td> INSOLVENT COMPANY </td> <td> DATE ISSUED </td> </tr> <tr> <td> <%# DataBinder.Eval(Container.DataItem, "companyname1")%> </td> <td> <%# DataBinder.Eval(Container.DataItem, "issuedate")%> </td> </tr> <tr> <td> CHECK TYPE </td> <td> DATE OF LOSS </td> <td> IN PAYMENT OF </td> <td> IRS NO </td> </tr> <tr> <td> <%# DataBinder.Eval(Container.DataItem, "checkgroup")%> </td> <td> <%# DataBinder.Eval(Container.DataItem, "lossdate")%> </td> <td> </td> <td> <%# DataBinder.Eval(Container.DataItem, "payeeidno")%> </td> </tr> <tr> <td colspan="3" rowspan="2"> <%# DataBinder.Eval(Container.DataItem, "amounttext")%> </td> <td> AMOUNT </td> </tr> <tr> <td> <%# DataBinder.Eval(Container.DataItem, "amount")%> </td> </tr> </table> </ItemTemplate> <FooterTemplate> </table> </FooterTemplate> </asp:Datalist> </div> <asp:ObjectDataSource DataSourceMode="DataReader" ID="SqlDataSource1" runat="server" SelectCommand = "spu_payment_checkprint_cfp_web" SelectCommandType = "StoredProcedure" ConnectionString ="<%$ ConnectionStrings:SiteSqlServer" %>"> <SelectParameters> <asp:ControlParameter Name="CheckNo" ControlID="RadGridClaimPayments" PropertyName="SelectedValue" Type="String" /> </SelectParameters> </asp:ObjectDataSource> </ContentTemplate> </telerik:RadWindow> </div> </telerik:RadPageView>