Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
588 views
Hi,

With the textboxes in a RadGrid, it is possible to deal with an empty string value, that needs to be stored to an Integer value?

I am assigning a texbox to a Integer variable, though that textbox can be blank:

Dim

 

 

CodEnd As Integer? = TryCast(edit("CodEnd").Controls(0), TextBox).Text

The variable CodEnd will then be used as parameter to pass into an UPDATE SQL query.

I tried setting ConvertEmptyStringToNull="True" in the textbox, though I still got the following error:

Conversion from string "" to type 'Integer' is not valid

Any advice please?

Thank you, Ida

 

Ida
Top achievements
Rank 1
 answered on 23 Oct 2013
1 answer
120 views
I have a nestedviewtemplate radgrid inside another RadGrid. I am having a problem with the nested RadGrid not expanding on the first click. What I mean is, I expand an item in the parent grid, then when I try to expand an item in the nested grid within the parent item, I have to click expand twice. In some versions of IE, the nested grid disappears altogether after clicking expand on the nested grid just once. In IE10 and the latest version of Firefox, it stays, but just doesn't expand until the second click.

Has anyone else experienced this and found a solution?

Thank you in advance. Below is my markup.

<telerik:RadAjaxPanel runat="server" ID="UnapprovedPOsGridAjaxPanel">
                            <telerik:RadGrid runat="server" ID="UnapprovedPOsGrid" AutoGenerateColumns="False"
                                Skin="Metro" DataSourceID="UnapprovedPOsDataSource" AllowAutomaticInserts="true"
                                OnItemCommand="UnapprovedPOsGrid_ItemCommand" OnItemDataBound="UnapprovedPOsGrid_ItemDataBound"
                                AllowAutomaticDeletes="true" AllowAutomaticUpdates="true" AllowFilteringByColumn="true" AllowPaging="true" PageSize="10" PagerStyle-Position="Bottom" MasterTableView-PagerStyle-PagerTextFormat="">
                                <MasterTableView EditMode="EditForms" CommandItemDisplay="Top" DataKeyNames="PO_ID"
                                    ExpandCollapseColumn-ButtonType="LinkButton" ShowHeadersWhenNoRecords="true"
                                    GroupsDefaultExpanded="false" GroupLoadMode="server" ShowGroupFooter="true" DataSourceID="UnapprovedPOsDataSource">
                                    <Columns>
                                        <telerik:GridEditCommandColumn ButtonType="LinkButton" EditText="View" UniqueName="ViewCommandColumn"></telerik:GridEditCommandColumn>
                                        <telerik:GridBoundColumn HeaderText="PO #" DataField="PO_ID" />
                                        <telerik:GridBoundColumn HeaderText="Division Director Approval" DataField="PO_DivisionDirectorApprovalDate" DataFormatString="{0:MM/dd/yyyy}"></telerik:GridBoundColumn>
                                        <telerik:GridBoundColumn HeaderText="Comptroller Approval" DataField="PO_ComptrollerApprovalDate" DataFormatString="{0:MM/dd/yyyy}"></telerik:GridBoundColumn>
                                        <telerik:GridBoundColumn HeaderText="Operations Approval" DataField="PO_DirectorOfOperationsApprovalDate" DataFormatString="{0:MM/dd/yyyy}"></telerik:GridBoundColumn>
                                        <telerik:GridBoundColumn HeaderText="Accounts Payable Approval" DataField="PO_AccountsPayableApprovalDate" DataFormatString="{0:MM/dd/yyyy}"></telerik:GridBoundColumn>
                                        <telerik:GridBoundColumn HeaderText="President Approval" DataField="PO_PresidentApprovalDate" DataFormatString="{0:MM/dd/yyyy}"></telerik:GridBoundColumn>
                                        <telerik:GridBoundColumn HeaderText="Employee" DataField="PO_EmployeeName" />
                                    </Columns>
                                    <EditFormSettings ColumnNumber="3" EditFormType="Template">
                                        <FormTemplate>
                                            <table>
                                                <tr>
                                                    <td>
                                                        <div>
                                                            <strong>Date PO Submitted</strong>
                                                        </div>
                                                        <div>
                                                             <asp:Label runat="server" ID="DatePOSubmittedLabel" Text='<%# Eval("PO_TodaysDate", "{0:d}") %>'></asp:Label>
                                                        </div>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td>
                                                        <div>
                                                            <strong>Employee Name</strong>
                                                        </div>
                                                        <div>
                                                             <asp:Label runat="server" ID="EmployeeLabel" Text='<%# Eval("PO_EmployeeName") %>'>
                                                            </asp:Label>
                                                        </div>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td>
                                                        <div>
                                                            <strong>Vendor Payee Name</strong>
                                                        </div>
                                                        <div>
                                                             <asp:Label runat="server" ID="VendorNameLabel" Text='<%# Eval("PO_VendorName") %>'>
                                                            </asp:Label>
                                                        </div>
                                                    </td>
                                                    <td>
                                                        <div>
                                                            <strong>Vendor Payee Phone</strong>
                                                        </div>
                                                        <div>
                                                             <asp:Label runat="server" ID="VendorPhoneLabel" Text='<%# Eval("PO_VendorPhone") %>'>
                                                            </asp:Label>
                                                        </div>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td>
                                                        <div>
                                                            <strong>Vendor Address</strong>
                                                        </div>
                                                        <div>
                                                            <asp:Label runat="server" ID="VendorAddressLabel" Text='<%# Eval("PO_VendorAddress") %>'>
                                                            </asp:Label>
                                                        </div>
                                                    </td>
                                                    <td>
                                                        <div>
                                                            <strong>Vendor City</strong>
                                                        </div>
                                                        <div>
                                                            <asp:Label runat="server" ID="VendorCityLabel" Text='<%# Eval("PO_VendorCity") %>'>
                                                            </asp:Label>
                                                        </div>
                                                    </td>
                                                    <td>
                                                        <div>
                                                            <strong>Vendor State</strong>
                                                        </div>
                                                        <div>
                                                            <asp:Label runat="server" ID="VendorStateLabel" Text='<%# Eval("PO_VendorState") %>'></asp:Label>
                                                        </div>
                                                    </td>
                                                    <td>
                                                        <div>
                                                            <strong>Vendor Zip</strong>
                                                        </div>
                                                        <div>
                                                            <asp:Label runat="server" ID="VendorZipLabel" Text='<%# Eval("PO_VendorZip") %>'></asp:Label>
                                                        </div>
                                                    </td>
                                                </tr>
                                                <tr>                                                                                                       
                                                    <td>
                                                        <div>
                                                            <strong>Division Director</strong>
                                                        </div>
                                                        <div>
                                                             <asp:Label runat="server" ID="DivisionDirectorApprovalLabel" Text='<%# Eval("PO_DivisionDirectorApproval") %>'>
                                                            </asp:Label>
                                                        </div>
                                                    </td>
                                                    <td>
                                                        <div>
                                                            <strong>Division Director Approval Date</strong>
                                                        </div>
                                                        <div>
                                                             <asp:Label runat="server" ID="DivisionDirectorApprovalLabelDate" Text='<%# Bind("PO_DivisionDirectorApprovalDate", "{0:d}") %>'>
                                                            </asp:Label>
                                                        </div>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td>
                                                        <div>
                                                            <strong>Approved By Division Director</strong><br />
                                                            <br />
                                                        </div>
                                                    </td>
                                                    <td>
                                                        <div>
                                                            <asp:CheckBox runat="server" ID="DivisionDirectorApprovalCheckBox" Checked='<%# Eval("PO_DivisionDirectorApproved") %>'
                                                                TextAlign="Left" Enabled="false" /><br />
                                                            <br />
                                                        </div>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td>
                                                        <div>
                                                            <strong>Estimated Delivery Date</strong>
                                                        </div>
                                                        <div>
                                                             <asp:Label runat="server" ID="EstimatedDeliveryDateLabel" Text='<%# Eval("PO_EstimatedDeliveryDate") %>'></asp:Label>
                                                        </div>
                                                    </td>
                                                    <td>
                                                        <div>
                                                            <strong>Company Name Ordered In</strong>
                                                        </div>
                                                        <div>
                                                             <asp:Label runat="server" ID="CompanyNameOrderedInLabel" Text='<%# Eval("PO_CompanyNameOrderedIn") %>'
                                                                Enabled="false">                                           
                                                            </asp:Label>
                                                        </div>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td>
                                                        <div>
                                                            <strong>Payment Method</strong>
                                                        </div>
                                                        <div>
                                                            <asp:Label runat="server" ID="PaymentMethodLabel" EmptyMessage="Select..." Text='<%# Eval("PO_PaymentMethod") %>'>
                                                            </asp:Label>
                                                        </div>
                                                    </td>
                                                    <td>
                                                        <div>
                                                            <strong>Division</strong>
                                                        </div>
                                                        <div>
                                                             <asp:Label runat="server" ID="DivisionLabel" Enabled="false" Text='<%# Eval("PO_Division") %>'>                                           
                                                            </asp:Label>
                                                        </div>
                                                    </td>                                                   
                                                    <td>
                                                        <div>
                                                            <strong>Card Used</strong>
                                                        </div>
                                                        <div>
                                                            <asp:Label ID="CreditCardName" runat="server" Text='<%# Eval("PO_CreditCardName") %>'>
                                                            </asp:Label>
                                                        </div>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td>
                                                        <div>
                                                            <strong>To Be Ordered By</strong>
                                                        </div>
                                                        <div>
                                                            <asp:Label runat="server" ID="ToBeOrderedByComboBox" Text='<%# Eval("PO_ToBeOrderedBy") %>'>
                                                            </asp:Label>
                                                        </div>
                                                    </td>
                                                    <td>
                                                        <div>
                                                            <strong>Date Ordered</strong>
                                                        </div>
                                                        <div>
                                                            <asp:Label runat="server" ID="DateOrderedDatePicker" Text='<%# Eval("PO_DateOrdered") %>'>
                                                            </asp:Label>
                                                        </div>
                                                    </td>
                                                </tr>
                                            </table>
                                            <telerik:RadGrid runat="server" ID="UnapprovedPOsItemsGrid" DataSourceID="UnapprovedPOsItemsDataSource" Skin="Metro"
                                                OnItemDataBound="UnapprovedPOsItemsGrid_ItemDataBound" AutoGenerateColumns="false">
                                                <MasterTableView CommandItemDisplay="Top" DataKeyNames="PO_ID" ShowHeadersWhenNoRecords="true"
                                                    GroupsDefaultExpanded="false" GroupLoadMode="server" ShowGroupFooter="true" DataSourceID="UnapprovedPOsItemsDataSource">
                                                    <CommandItemTemplate>
                                                        <asp:Label ID="ItemsBeingPurchasedLabel" runat="server" Width="170px" Text="Items Being Purchased"
                                                            Style="font-weight: bold; padding: 5px 0 5px 5px"></asp:Label>
                                                    </CommandItemTemplate>
                                                    <Columns>
                                                        <telerik:GridBoundColumn DataField="PO_ID" Visible="false">
                                                        </telerik:GridBoundColumn>
                                                        <telerik:GridBoundColumn HeaderText="Description of Item" DataField="POI_DescriptionOfItem" />
                                                        <telerik:GridBoundColumn HeaderText="Reason For Purchase" DataField="POI_ReasonForPurchase" />
                                                        <telerik:GridBoundColumn HeaderText="Quantity" DataField="POI_Quantity" FooterAggregateFormatString="<b>Total Quantity: </b>{0}" />
                                                        <telerik:GridBoundColumn HeaderText="Unit Price" DataField="POI_UnitPrice" FooterAggregateFormatString="<b>Total Price: </b>{0}" />
                                                        <telerik:GridBoundColumn HeaderText="Amount" DataField="POI_Amount" FooterAggregateFormatString="<b>Total Amount: </b>{0}" />
                                                        <%--<telerik:GridBoundColumn HeaderText="Price Quoted" DataField="POI_PriceQuoted" FilterControlWidth="80px" />
                                                        <telerik:GridBoundColumn HeaderText="Price Estimated" DataField="POI_PriceEstimated" />--%>
                                                        <telerik:GridBoundColumn HeaderText="Additional Costs" DataField="POI_AdditionalCosts"
                                                            FilterControlWidth="80px" />
                                                        <telerik:GridBoundColumn HeaderText="Explanation of Additional Costs" Display="false"
                                                            DataField="POI_AdditionalCostsExplanation" />
                                                    </Columns>
                                                    <NestedViewSettings DataSourceID="UnapprovedPOsItemsDataSource">
                                                        <ParentTableRelation>
                                                            <telerik:GridRelationFields DetailKeyField="POI_Item_ID" MasterKeyField="POI_Item_ID" />
                                                        </ParentTableRelation>
                                                    </NestedViewSettings>
                                                    <NestedViewTemplate>
                                                        <div style="padding-left: 30px; padding-top: 20px; padding-bottom: 20px;">
                                                            <table>
                                                                <tr>
                                                                    <td>Description of Item
                                                                    </td>
                                                                    <td>
                                                                        <asp:Label runat="server" ID="ItemDescriptionTextBox" Text='<%# Eval("POI_DescriptionOfItem") %>'></asp:Label>
                                                                    </td>
                                                                </tr>
                                                                <tr>
                                                                    <td>Reason For Purchase
                                                                    </td>
                                                                    <td>
                                                                        <asp:Label runat="server" ID="ReasonForPurchaseTextBox" Text='<%# Eval("POI_ReasonForPurchase") %>'>
                                                                        </asp:Label>
                                                                    </td>
                                                                </tr>
                                                                <tr>
                                                                    <td>Quantity
                                                                    </td>
                                                                    <td>
                                                                        <asp:Label runat="server" ID="QuantityNumericTextBox" Text='<%# Eval("POI_Quantity") %>'>
                                                                        </asp:Label>
                                                                    </td>
                                                                </tr>
                                                                <tr>
                                                                    <td>Unit Price
                                                                    </td>
                                                                    <td>
                                                                        <asp:Label runat="server" ID="UnitPriceNumericTextBox" Text='<%# Eval("POI_UnitPrice") %>'>
                                                                        </asp:Label>
                                                                    </td>
                                                                </tr>
                                                                <tr>
                                                                    <td>Amount (Q x Price)
                                                                    </td>
                                                                    <td>
                                                                        <asp:Label runat="server" ID="AmountNumericTextBox" Text='<%# Eval("POI_Amount") %>'>
                                                                        </asp:Label>
                                                                    </td>
                                                                </tr>
                                                                <%--<tr>
                                                                    <td>Price Quoted
                                                                    </td>
                                                                    <td>
                                                                        <asp:Label runat="server" ID="PriceQuotedNumericTextBox" Text='<%# Eval("POI_PriceQuoted") %>'>
                                                                        </asp:Label>
                                                                    </td>
                                                                </tr>
                                                                <tr>
                                                                    <td>Price Estimated
                                                                    </td>
                                                                    <td>
                                                                        <asp:Label runat="server" ID="PriceEstimatedNumericTextBox" Text='<%# Eval("POI_PriceEstimated") %>'>
                                                                        </asp:Label>
                                                                    </td>
                                                                </tr>--%>
                                                                <tr>
                                                                    <td>Additional Costs
                                                                    </td>
                                                                    <td>
                                                                        <asp:Label runat="server" ID="AdditionalCostsNumericTextBox" Text='<%# Eval("POI_AdditionalCosts") %>'>
                                                                        </asp:Label>
                                                                    </td>
                                                                </tr>
                                                                <tr>
                                                                    <td>Explanation of Additional Costs
                                                                    </td>
                                                                    <td>
                                                                        <asp:Label runat="server" ID="ExplanationAdditionalCostsTextBox" Text='<%# Eval("POI_AdditionalCostsExplanation") %>'>
                                                                        </asp:Label>
                                                                    </td>
                                                                </tr>
                                                            </table>
                                                            <br />
                                                        </div>
                                                    </NestedViewTemplate>
                                                </MasterTableView>
                                            </telerik:RadGrid>
                                            <table>
                                                <tr>
                                                    <td>
                                                        <div>
                                                            <strong>Plus Sales Tax</strong>
                                                        </div>
                                                        <div>
                                                             <asp:Label runat="server" ID="PlusSalesTaxLabel" Text='<%# Eval("PO_PlusSalesTax") %>'>
                                                            </asp:Label>
                                                        </div>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td>
                                                        <div>
                                                            <strong>Total Cost</strong>
                                                        </div>
                                                        <div>
                                                             <asp:Label runat="server" ID="TotalCostLabel" Text='<%# Eval("PO_TotalCost") %>'>
                                                            </asp:Label>
                                                        </div>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td>
                                                        <div>
                                                            <strong>Supporting Documents</strong>
                                                        </div>
                                                        <asp:Panel runat="server" ID="supportingDocsPanel">
                                                        </asp:Panel>
                                                    </td>
                                                </tr>
                                            </table>
                                            <asp:Panel runat="server" ID="AdministrativeSectionPanel" Enabled="true">
                                                <h3>Administrative Use Only</h3>
                                                <table>
                                                    <tr>
                                                        <td>
                                                            <div>
                                                                <strong>Accounts Payable</strong>
                                                            </div>
                                                            <div>
                                                                 <asp:Label runat="server" ID="AccountsPayableApprovalLabel" Text='<%# Eval("PO_AccountsPayableApproval") %>'>
                                                                </asp:Label>
                                                            </div>
                                                        </td>
                                                        <td>
                                                            <div>
                                                                <strong>Accounts Payable Approval Date</strong>
                                                            </div>
                                                            <div>
                                                                 <asp:Label runat="server" ID="AccountsPayableApprovalLabelDate" Text='<%# Eval("PO_AccountsPayableApprovalDate", "{0:d}") %>'>
                                                                </asp:Label>
                                                            </div>
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td>
                                                            <div>
                                                                <strong>Approved by Accounts Payable</strong><br />
                                                                <br />
                                                            </div>
                                                        </td>
                                                        <td>
                                                            <asp:CheckBox runat="server" ID="AccountsPayableApprovalCheckBox" TextAlign="Left" Checked='<%# Eval("PO_AccountsPayableApproved") %>' /><br />
                                                            <br />
                                                        </td>
                                                    </tr>
                                                </table>
                                                <table>
                                                    <tr>
                                                        <td>
                                                            <div>
                                                                <strong>Comptroller</strong>
                                                            </div>
                                                            <div>
                                                                 <asp:Label runat="server" ID="ComptrollerApprovalLabel" Text='<%# Eval("PO_ComptrollerApproval") %>'>
                                                                </asp:Label>
                                                            </div>
                                                        </td>
                                                        <td>
                                                            <div>
                                                                <strong>Comptroller Approval Date</strong>
                                                            </div>
                                                            <div>
                                                                 <asp:Label runat="server" ID="ComptrollerApprovalLabelDate" Text='<%# Eval("PO_ComptrollerApprovalDate", "{0:d}") %>'>
                                                                </asp:Label>
                                                            </div>
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td>
                                                            <div>
                                                                <strong>Approved by Comptroller</strong><br />
                                                                <br />
                                                            </div>
                                                        </td>
                                                        <td>
                                                            <asp:CheckBox runat="server" ID="ComptrollerApprovalCheckBox" TextAlign="Left" Enabled="false" Checked='<%# Eval("PO_ComptrollerApproved") %>' />
                                                            <br />
                                                            <br />
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td>
                                                            <div>
                                                                <strong>GL Number</strong>
                                                            </div>
                                                            <div>
                                                                 <asp:Label runat="server" ID="FirstGLNumberLabel" Text='<%# Eval("PO_FirstGLNumber") %>'>
                                                                </asp:Label>
                                                            </div>
                                                        </td>
                                                        <td>
                                                            <div>
                                                                <strong>GL Name</strong>
                                                            </div>
                                                            <div>
                                                                 <asp:Label runat="server" ID="FirstGLNameLabel" Text='<%# Eval("PO_FirstGLName") %>'>
                                                                </asp:Label>
                                                            </div>
                                                        </td>
                                                        <td>
                                                            <div>
                                                                <strong>Amount</strong>
                                                            </div>
                                                            <div>
                                                                 <asp:Label runat="server" ID="FirstGLAmountLabel" Text='<%# Eval("PO_FirstGLAmount") %>'>
                                                                </asp:Label>
                                                            </div>
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td>
                                                            <div>
                                                                <strong>GL Number</strong>
                                                            </div>
                                                            <div>
                                                                 <asp:Label runat="server" ID="SecondGLNumberLabel" Text='<%# Eval("PO_SecondGLNumber") %>'>
                                                                </asp:Label>
                                                            </div>
                                                        </td>
                                                        <td>
                                                            <div>
                                                                <strong>GL Name</strong>
                                                            </div>
                                                            <div>
                                                                 <asp:Label runat="server" ID="SecondGLNameLabel" Text='<%# Eval("PO_SecondGLName") %>'>
                                                                </asp:Label>
                                                            </div>
                                                        </td>
                                                        <td>
                                                            <div>
                                                                <strong>Amount</strong>
                                                            </div>
                                                            <div>
                                                                 <asp:Label runat="server" ID="SecondGLAmountLabel" Text='<%# Eval("PO_SecondGLAmount") %>'>
                                                                </asp:Label>
                                                            </div>
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td>
                                                            <div>
                                                                <strong>GL Number</strong>
                                                            </div>
                                                            <div>
                                                                 <asp:Label runat="server" ID="ThirdGLNumberLabel" Text='<%# Eval("PO_ThirdGLNumber")%>'>
                                                                </asp:Label>
                                                            </div>
                                                        </td>
                                                        <td>
                                                            <div>
                                                                <strong>GL Name</strong>
                                                            </div>
                                                            <div>
                                                                 <asp:Label runat="server" ID="ThirdGLNameLabel" Text='<%# Eval("PO_ThirdGLName")%>'>
                                                                </asp:Label>
                                                            </div>
                                                        </td>
                                                        <td>
                                                            <div>
                                                                <strong>Amount</strong>
                                                            </div>
                                                            <div>
                                                                 <asp:Label runat="server" ID="ThirdGLAmountLabel" Text='<%# Eval("PO_ThirdGLAmount")%>'>
                                                                </asp:Label>
                                                            </div>
                                                        </td>
                                                    </tr>
                                                </table>
                                                <br />
                                                <h3>If Paying By Check</h3>
                                                <table>
                                                    <tr>
                                                        <td>
                                                            <div>
                                                                <strong>Due Date</strong>
                                                            </div>
                                                            <div>
                                                                 <asp:Label runat="server" ID="DueDateLabel" Text='<%# Eval("PO_CheckDueDate") %>'>
                                                                </asp:Label>
                                                            </div>
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td>
                                                            <div>
                                                                <strong>Check Payable To</strong>
                                                            </div>
                                                            <div>
                                                                 <asp:Label runat="server" ID="CheckPayableToLabel" Text='<%# Eval("PO_CheckPayableTo") %>'>
                                                                </asp:Label>
                                                            </div>
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td>
                                                            <div>
                                                                <strong>Check Number</strong>
                                                                <div>
                                                                     <asp:Label runat="server" ID="CheckNumberTextBox" Text='<%# Eval("PO_CheckNumber") %>'>
                                                                    </asp:Label>
                                                                </div>
                                                            </div>
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td>
                                                            <div>
                                                                <strong>Street Address</strong>
                                                            </div>
                                                            <div>
                                                                 <asp:Label runat="server" ID="StreetAddressLabel" Text='<%# Eval("PO_StreetAddress") %>'>
                                                                </asp:Label>
                                                            </div>
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td>
                                                            <div>
                                                                <strong>City</strong>
                                                            </div>
                                                            <div>
                                                                 <asp:Label runat="server" ID="CityLabel" Text='<%# Eval("PO_City") %>'>
                                                                </asp:Label>
                                                            </div>
                                                        </td>
                                                        <td>
                                                            <div>
                                                                <strong>State</strong>
                                                            </div>
                                                            <div>
                                                                 <asp:Label runat="server" ID="StateLabel" Text='<%# Eval("PO_State") %>'>
                                                                </asp:Label>
                                                            </div>
                                                        </td>
                                                        <td>
                                                            <div>
                                                                <strong>Zip</strong>
                                                            </div>
                                                            <div>
                                                                 <asp:Label runat="server" ID="ZipLabel" Text='<%# Eval("PO_Zip") %>'>
                                                                </asp:Label>
                                                            </div>
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td>
                                                            <div>
                                                                <h4>Who will mail this check?</h4>
                                                            </div>
                                                        </td>
                                                        <td>
                                                            <asp:Label ID="WhoWillMailCheckLabel" runat="server" Text='<%# Eval("PO_DepartmentMailingCheck") %>'>                                               
                                                            </asp:Label>
 
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td>
                                                            <div>
                                                                <strong>Date Paid</strong>
                                                            </div>
                                                            <div>
                                                                 <asp:Label runat="server" ID="DatePaidByCheckLabel" Text='<%# Eval("PO_DatePaidByCheck") %>'>
                                                                </asp:Label>
                                                            </div>
                                                        </td>
                                                    </tr>
                                                </table>
                                                <br />
                                                <br />
                                                <h3>Comments</h3>
                                                <asp:Label runat="server" ID="CommentsLabel" Text='<%# Eval("PO_Comments") %>'></asp:Label>
                                                <br />
                                                <br />
                                                <table>
                                                    <tr>
                                                        <td>
                                                            <div>
                                                                <strong>Director of Operations</strong>
                                                                <div>
                                                                     <asp:Label runat="server" ID="DirectorOfOperationsLabel" Text="Devin Sherman">
                                                                    </asp:Label>
                                                                </div>
                                                            </div>
                                                        </td>
                                                        <td>
                                                            <div>
                                                                <strong>Approval Date</strong>
                                                            </div>
                                                            <div>
                                                                 <telerik:RadDatePicker runat="server" ID="DirectorOfOperationsApprovalDate" DbSelectedDate='<%# Bind("PO_DirectorOfOperationsApprovalDate") %>'>
                                                                </telerik:RadDatePicker>
                                                            </div>
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td>
                                                            <div>
                                                                <strong>Approved By Director of Operations</strong><br />
                                                                <br />
                                                            </div>
                                                        </td>
                                                        <td>
                                                            <div>
                                                                <asp:CheckBox runat="server" ID="DirectorOfOperationsApprovalCheckBox" Checked='<%# Bind("PO_DirectorOfOperationsApproved") %>'
                                                                    TextAlign="Left" /><br />
                                                                <br />
                                                            </div>
                                                        </td>
                                                    </tr>
                                                </table>
                                            </asp:Panel>
                                            <asp:Button ID="btnUpdate" Text='<%# (Container is GridEditFormInsertItem) ? "Save" : "Update" %>'
                                                runat="server" CommandName='<%# (Container is GridEditFormInsertItem) ? "PerformInsert" : "Update" %>' UseSubmitBehavior="true" />
                                             <asp:Button ID="btnCancel" Text="Cancel" runat="server" CausesValidation="False"
                                                UseSubmitBehavior="false" CommandName="Cancel" />
                                        </FormTemplate>
                                    </EditFormSettings>
                                </MasterTableView>
                            </telerik:RadGrid>
                            <asp:SqlDataSource ID="UnapprovedPOsDataSource" runat="server" ConnectionString="<%$ appSettings:SQLConn %>"
                                ViewStateMode="Enabled" ProviderName="System.Data.SqlClient" InsertCommandType="StoredProcedure"
                                SelectCommandType="StoredProcedure" SelectCommand="DisplayUnapprovedPurchaseOrdersDOO" UpdateCommandType="StoredProcedure"
                                UpdateCommand="UpdatePurchaseOrderDOO" OnUpdating="UnapprovedPOsDataSource_Updating"></asp:SqlDataSource>
                            <asp:SqlDataSource ID="UnapprovedPOsItemsDataSource" runat="server" ConnectionString="<%$ appSettings:SQLConn %>"
                                ViewStateMode="Enabled" ProviderName="System.Data.SqlClient" SelectCommandType="StoredProcedure"
                                SelectCommand="DisplayPurchaseOrderItem">
                                <SelectParameters>
                                    <asp:ControlParameter Name="PO_ID" DbType="Int32" ControlID="PO_IDTextBox" PropertyName="Text" />
                                </SelectParameters>
                            </asp:SqlDataSource>
                            <asp:TextBox runat="server" ID="PO_IDTextBox" Style="visibility: hidden" />
                        </telerik:RadAjaxPanel>


pmourfield
Top achievements
Rank 1
 answered on 23 Oct 2013
1 answer
82 views
I'm using the client side api to set a radgrid to insert.  I'm then trying to get access to the HTML of the insert item by calling 
get_insertItem(), but I'm getting this error:


TypeError: a is undefined
http://localhost/Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=RadScriptManager1_TSM&compress=1&_TSM_CombinedScripts_=%3b%3bSystem.Web.Extensions%2c+Version%3d4.0.0.0%2c+Culture%3dneutral%2c+PublicKeyToken%3d31bf3856ad364e35%3aen%3ac9cbdec3-c810-4e87-846c-fb25a7c08002%3aea597d4b%3ab25378d2%3bTelerik.Web.UI%2c+Version%3d2012.1.501.40%2c+Culture%3dneutral%2c+PublicKeyToken%3d121fae78165ba3d4%3aen%3a5032a904-f84e-4114-98a5-b1bfc16b2dec%3a16e4e7cd%3aed16cbdc%3a874f8ea2%3af7645509%3a24ee1bba%3ac172ae1e%3a19620875%3af46195d3%3a9cdfc6e7%3a2003d0b8%3ae330518b%3a1e771326%3ac8618e41%3ae4f8f289%3a86526ba7%3a490a9d4e%3abd8f85e4%3a39040b5c%3a11a04f7e%3a7165f74%3ab7778d6c%3aaa288e2d%3aa51ee93e%3a59462f1%3a58366029%3a68f76a79%3af85f9819%3a52af31a4%3a2a2fc429%3addbfcb67%3a8e6f0d33%3a6a6d718d%3a82923ac3
Line 21801


mtv.showInsertItem();     
  
if (mtv.get_isItemInserted()){
    var insertRow = mtv.get_insertItem();    // <--- this line throws error
Kostadin
Telerik team
 answered on 23 Oct 2013
1 answer
102 views
Hi there,

I have the following scenario that I need to implement: 
1. Generate a pdf-file (serverside). This will take me about 10 seconds server-side
2. Send file to browser

While the file is generated, I need to display something to the user. I am currently using the Radnotification control for this.

My problem is:
While the file is generated the notification control loses its Skin. I have tried different approaches to solve it, but with no luck so far.
It is important to consider, that the generated pdf-file is sent to the by writing to the Response-object, which is not allowed when the trigger lies within an update panel. 

I suspect I must be missing some fundamental knowledge of the Telerik controls and hope you can guide me in the right direction. Below is my code.

Markup:

<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="notification.aspx.vb" Inherits="TelerikPlayground.notification" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>Udskriv fakturaer</title>
    <script src="Scripts/jquery-1.6.4.js" type="text/javascript"></script>
    <script src="Scripts/jquery-ui-1.9.2.js" type="text/javascript"></script>
    <telerik:RadScriptBlock ID="scriptBlock" runat="server">
        <script type="text/javascript">

            $(document).ready(function () {
                
                        $("#beskrivelseAntal").text("Notification text");
                        $("#NotificationDialog").show();
                        $('#butPrint').click();
                    
            });
        </script>
    </telerik:RadScriptBlock>
    
   
</head>
<body>
    
    <form id="form1" runat="server">
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server"></telerik:RadScriptManager>
        <telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server">
       
        <div style="margin-left: auto;margin-right: auto; width: 350px;margin-top:20px;">
        <asp:Button runat="server" ID="butPrint" OnClick="print_click" style="display: none;"/>
        
                <telerik:RadNotification ID="NotificationDialog" runat="server" Skin="WebBlue"  EnableRoundedCorners="true" Title="Working" Text="Working" VisibleOnPageLoad="True" Position="Center" ShowCloseButton="False" AutoCloseDelay="0" Width="350" ShowTitleMenu="false"/>
       
         </div>
      </telerik:RadAjaxPanel>
    </form>
</body>
</html>


Codebehind:
Imports System.IO

Public Class notification
    Inherits System.Web.UI.Page

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

    End Sub


Protected Sub print_click(ByVal sender As Object, ByVal e As EventArgs)

    Threading.Thread.Sleep(3000)

    Dim ms As New MemoryStream(File.ReadAllBytes("c:\temp\jotch.pdf"))

      Response.Expires = 0
      Response.Buffer = True
      Response.ClearContent()
      Response.AddHeader("content-disposition", "inline; filename=" + "jotch.pdf")
      Response.ContentType = "application/pdf"
      Response.BinaryWrite(ms.ToArray())
      ms.Close()
      Response.End()
    End Sub



End Class





Marin Bratanov
Telerik team
 answered on 23 Oct 2013
3 answers
119 views
Hi all,

RadComboBox dropdown position is not changed when I scroll the page, see the attached screenshot. How do I rectify this ?
Ivan Zhekov
Telerik team
 answered on 23 Oct 2013
1 answer
77 views
Hey all,
 
I am having trouble getting my DetailTables expansion to work with a RaisePostBackEvent that I use for my OnRowClick event in my RadGrid.
 
When I have a RaisePostBackEvent in my code behind, my row expansion for my DetailTables does not fire, but if I simply comment out the RaisePostBackEvent code block it works just fine.
 
Any ideas?  I can't find anything about it anywhere.
 
Thank you!
Dan
Angel Petrov
Telerik team
 answered on 23 Oct 2013
1 answer
55 views

Requirements

RadControls version

 

.NET version 4

 

Visual Studio version 2012

 

programming language C#

 

browser support

all browsers supported by RadControls


PROJECT DESCRIPTION                                    
I am trying to create a tab in the code behind with contents, I can create tabs fine but don't know how to assign something to it (the content) I can't even figure out how to do it client side, but usually in normal AJAX you would do it like tab.controls.add(control) but in the telerik version it adds the control to the actual tab rather than the content.
Kate
Telerik team
 answered on 23 Oct 2013
1 answer
52 views
Hey all,

I am having trouble getting my DetailTables expansion to work with a RaisePostBackEvent that I use for my OnRowClick event in my RadGrid.

When I have a RaisePostBackEvent in my code behind, my row expansion for my DetailTables does not fire, but if I simply comment out the RaisePostBackEvent code block it works just fine.

Any ideas?  I can't find anything about it anywhere.

Thank you!
Dan
Angel Petrov
Telerik team
 answered on 23 Oct 2013
6 answers
670 views
Hi,

We are having a problem with the RadScheduler.  After creating an Event (it doesn't matter if its just a single or a recurring event...), when you press F5 to refresh the page, another event is created... basically a duplicate of what you just created. 

I wonder if this is a bug or am just missing something (i.e., needs to declare something, etc...).  Below are the step-by-step detail in recreating the issue:

1.  From the Calendar, double click on a date to create an event.  (NOTE:  As I have indicated above, it doesn't matter if its a Single or Recurring event because the results are the same.)  Once the event is created, it will show up on the Calendar. 
2.  Click on the browser's "Page Refresh" button or "F5"... you will notice that a duplicate event is created.

What should we do to prevent this issue from happening?

Thanks for your help.

- Annie
Ema
Top achievements
Rank 1
 answered on 23 Oct 2013
2 answers
163 views
Hello,

I have a RadTreeView and button on the page, RadTreeView is filled programmatically when click on the button. I use NodeTemplate for nodes but after postback template is not used. Could anybody help me?

ASPX
<telerik:RadScriptManager ID="ScriptManager" runat="server" EnableViewState="false"></telerik:RadScriptManager>
        <telerik:RadAjaxManager ID="AjaxManager" runat="server" DefaultLoadingPanelID="RadAjaxLoadingPanel1">
            <AjaxSettings>
                <telerik:AjaxSetting AjaxControlID="rtvSearchResult" EventName="OnNodeClick">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="rtsObjInfo"></telerik:AjaxUpdatedControl>
                    </UpdatedControls>
                </telerik:AjaxSetting>
                <telerik:AjaxSetting AjaxControlID="btnSearch">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="rtvSearchResult"></telerik:AjaxUpdatedControl>
                    </UpdatedControls>
                </telerik:AjaxSetting>
            </AjaxSettings>
            <ClientEvents OnResponseEnd="OnResponseEnd" />
        </telerik:RadAjaxManager>
<telerik:RadTreeView ID="rtvSearchResult" OnNodeClick="rtvSearchResult_NodeClick"
                                                    OnClientMouseOver="onNodeOver" OnClientMouseOut="onNodeOut" runat="server" Height="100%">
<asp:Button ID="btnSearch" OnClick="btnSearchClick" runat="server" />
<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server"></telerik:RadAjaxLoadingPanel>


CodeBehind
public List<common.DOCUMENT_OBJECT_MAP> list;
 
        protected void Page_Load(object sender, EventArgs e)
        {
            list = new List<common.DOCUMENT_OBJECT_MAP>();
            list.Add(new common.DOCUMENT_OBJECT_MAP() { ID = 1, NAME = "Obj1" });
            list.Add(new common.DOCUMENT_OBJECT_MAP() { ID = 2, NAME = "Obj2" });
            list.Add(new common.DOCUMENT_OBJECT_MAP() { ID = 3, NAME = "Obj3" });
        }
protected void btnSearchClick(object sender, EventArgs e)
        {
            rtvSearchResult.Nodes.Clear();
             
            foreach (common.DOCUMENT_OBJECT_MAP obj in list)
            {  
                RadTreeNode newNode = new RadTreeNode();
                newNode.Text = obj.NAME;
                newNode.ToolTip = obj.NAME;
                newNode.Value = obj.ID.ToString();
                newNode.DataItem = obj.ID_LAYER;
                newNode.NodeTemplate = new TreeNodeTemplate(obj);
                 
                RadTreeNode parentNode = rtvSearchResult.FindNodeByValue(obj.ID_FOLDER.ToString());
                if (parentNode != null)
                {
                    parentNode.Nodes.Add(newNode);
                }
                else
                {
                    rtvSearchResult.Nodes.Add(newNode);
                }
            }
            rtvSearchResult.Visible = true;
        }
public class TreeNodeTemplate : ITemplate
    {
        private common.DOCUMENT_OBJECT_MAP _obj;
 
        public TreeNodeTemplate(common.DOCUMENT_OBJECT_MAP obj)
        {
            _obj = obj;
        }
        public void InstantiateIn(Control container)
        {
            Label control = new Label();
            control.ID = "lbn_" + _obj._ID;
            control.ClientIDMode = ClientIDMode.Static;
            control.Text = _obj._NAME;
            container.Controls.Add(control);
             
            Label lbButtons = new Label();
            lbButtons.Text = "<input type='button' value='1'/>";
            lbButtons.ID = "node_" + _obj.ID + "_cmd";
            lbButtons.ClientIDMode = ClientIDMode.Static;
            container.Controls.Add(lbButtons);
        }
    }

Thanks!
nfigueroa
Top achievements
Rank 1
 answered on 23 Oct 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?