Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
246 views
aspx file 
<telerik:RadGrid runat="server" ID="RadGrid1" AutoGenerateColumns="False" AllowPaging="True"
                            CellSpacing="-1" GridLines="Both" GroupPanelPosition="Top" OnItemDataBound="RadGrid1_ItemDataBound" OnItemCommand="RadGrid1_ItemCommand" OnInsertCommand="RadGrid1_InsertCommand">
                            <MasterTableView DataKeyNames="COA_ACCOUNT_ID" CommandItemDisplay="Top" InsertItemPageIndexAction="ShowItemOnCurrentPage" EditMode="EditForms">
                                <RowIndicatorColumn Visible="False">
                                </RowIndicatorColumn>
                                <ExpandCollapseColumn Created="True">
                                </ExpandCollapseColumn>
                                <Columns>
                                    <telerik:GridEditCommandColumn ButtonType="ImageButton"/>
                                    <telerik:GridBoundColumn DataField="ACCOUNT_CODE" HeaderText="ACCOUNT CODE" />
                                    <telerik:GridBoundColumn DataField="ACCOUNT_DESCRIPTION" HeaderText="DESCRIPTION" />
                                    <telerik:GridBoundColumn DataField="ACCOUNT_TYPE" HeaderText="TYPE" />
                                    <telerik:GridBoundColumn DataField="ACCOUNT PAYABLE" HeaderText="PAYABLE" />
                                    <telerik:GridBoundColumn DataField="STATUS" HeaderText="STATUS" />
                                    <telerik:GridButtonColumn ConfirmText="Delete this product?" ConfirmDialogType="RadWindow"
                                        ConfirmTitle="Delete" ButtonType="ImageButton" CommandName="Delete" />
                                </Columns>
                                <EditFormSettings EditFormType="Template">
                                    <EditColumn ButtonType="ImageButton" />
                                    <FormTemplate>
                                        <table id="Table3" width="450px" border="0" class="module">
                                            <tr>
                                                <td>Account Code:
                                                </td>
                                                <td>
                                                    <%--<telerik:RadTextBox ID="RadtxtAccountCode" runat="server" Text='<%# Bind("ACCOUNT_CODE") %>'>
                                                    </telerik:RadTextBox>--%>
                                                    <asp:TextBox ID="RadtxtAccountCode" runat="server" Text='<%# Bind("ACCOUNT_CODE") %>'>
                                                    </asp:TextBox>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td>Account Description:
                                                </td>
                                                <td>
                                                    <telerik:RadTextBox ID="RadtxtAccountDescription" runat="server" Text='<%# Bind("ACCOUNT_DESCRIPTION") %>'>
                                                    </telerik:RadTextBox>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td>Account Type:
                                                </td>
                                                <td>
                                                    <telerik:RadDropDownList ID="RadddlAccountType" runat="server">
                                                    </telerik:RadDropDownList>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td>Account Payable:
                                                </td>
                                                <td>
                                                    <telerik:RadDropDownList ID="RadddlAccountPayable" runat="server">
                                                        <Items>
                                                            <telerik:DropDownListItem Text ="Debit" Value ="0" />
                                                            <telerik:DropDownListItem Text ="Credit" Value ="1" />
                                                            <telerik:DropDownListItem Text ="Dr./Cr." Value = "2" Selected ="true"/>
                                                        </Items>
                                                    </telerik:RadDropDownList>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td align="left" colspan="2">
                                                    <telerik:RadButton ID="btnUpdate" Text='<%# (Container is GridEditFormInsertItem) ? "Insert" : "Update" %>'
                                                        runat="server" CommandName='<%# (Container is GridEditFormInsertItem) ? "PerformInsert" : "Update" %>'></telerik:RadButton
                                                    <telerik:RadButton ID="btnCancel" Text="Cancel" runat="server" CausesValidation="False" CommandName="Cancel"></telerik:RadButton>
                                                </td>
                                            </tr>
                                        </table>
                                    </FormTemplate>
                                </EditFormSettings>
                            </MasterTableView>
                            <PagerStyle Mode="NextPrevAndNumeric" />
                            <ClientSettings>
                                <ClientEvents OnRowDblClick="rowDblClick" />
                            </ClientSettings>
                        </telerik:RadGrid>

 

cs File

protected void RadGrid1_ItemCommand(object sender, GridCommandEventArgs e)
        {
            if (e.CommandName == RadGrid.PerformInsertCommandName && e.Item is GridEditFormInsertItem)
            {
                //GridEditableItem editedItem = e.Item as GridEditableItem;
                GridEditFormItem item = (GridEditFormItem)e.Item;
                TextBox tfff = (TextBox)item.FindControl("RadtxtAccountCode");
                RadDropDownList radddlAccountType = item.FindControl("RadddlAccountType") as RadDropDownList;
                RadTextBox RadtxtAccountDescription = item.FindControl("RadtxtAccountDescription") as RadTextBox;
                //GridEditFormItem item = (GridEditFormItem)e.Item.OwnerTableView.GetInsertItem();
                //GridDataInsertItem item = (GridDataInsertItem)RadGrid1.MasterTableView.GetInsertItem();
                //var item = e.Item as GridEditFormItem ?? ((GridDataItem)(e.Item)).EditFormItem;
                if (item == null)
                    throw new Exception("griddataitem is null");
                var RadtxtAccountCode1 = item.FindControl("RadtxtAccountCode") as TextBox;
 
                RadTextBox RadtxtAccountCode = (RadTextBox)item.FindControl("RadtxtAccountCode");
                //RadTextBox RadtxtAccountDescription = item.FindControl("RadtxtAccountDescription") as RadTextBox;
                RadDropDownList RadddlAccountType = item.FindControl("RadddlAccountType") as RadDropDownList;
                RadDropDownList RadddlAccountPayable = item.FindControl("RadddlAccountPayable") as RadDropDownList;
                objAccountInsert.iCatalog_id = 1;
                objAccountInsert.iAccount_type_id = 1;
                objAccountInsert.iCode = Convert.ToInt16(RadtxtAccountCode1.Text);
                objAccountInsert.strDesignation_native = RadtxtAccountDescription.Text;
                objAccountInsert.strDesignation_other = RadtxtAccountDescription.Text;
                objAccountInsert.iAccount_type_id =Convert.ToInt16(RadddlAccountType.SelectedValue);
                objAccountInsert.iPayable = Convert.ToInt16(RadddlAccountPayable.SelectedValue);
                objAccountInsert.bActive = true;
                objAccountInsert.iCreated_user_id = 1;
                objAccountInsert.iUpdated_user_id = 1;
 
                int i = new Account_BL().LegalAccountInsert(objAccountInsert);
            }

when I try to get value from From Template control (RadtxtAccountCode, RadtxtAccountDescription) its show null value. please help me. I want to get value from those control entered by the user.
Konstantin Dikov
Telerik team
 answered on 21 May 2015
2 answers
108 views

I'm trying to modify the CSS for the MetroTouch menu and can't figure out where that vertical/separator bar is set, seen in light blue in my attached screenshot.  I want to set it to the same color as the rest of the menu.  Any ideas?  Thanks!

I've tried setting values for rmSeparator and that doesn't work.

Below are my test CSS changes so far to do what I need:

<style type="text/css">
    .RadMenu_MetroTouch .rmRootGroup {
        padding: 1px !important;
        background: #18323f;
    }
 
    .RadMenu_MetroTouch .rmRootLink {
        padding: 0 15px;
        border: 1px solid #18323f;
        color: #ffffff;
        text-decoration: none;
    }
 
</style>

Adrian Barnes
Top achievements
Rank 1
 answered on 21 May 2015
1 answer
85 views

Hi,

I'm new to RadPivotGrid. I have a few questions:

 1. Why is the PivotGridRowField showing Total columns under it? (e.g Tim Ho Wan Total). How to remove that?

2. How to show values in Data Area without usingPivotGridAggregateField? like my attached file (table with data area.jpg)

 

Please get back to me soon

 

Thanks

 

Maria Ilieva
Telerik team
 answered on 21 May 2015
2 answers
93 views

Hello, I'm on a telerik trial.

I need to get the RadDataPicker working in a custom control that is placed in a repeater in a content page.

So far what I get is a textbox for the date and the date "button" is a text link: "Open the Calendar Popup".  Clicking the link does nothing.  Click in the date box also does nothing (no calendar-date-picker pops up).

Right now all I care about is getting the minimal default behavior for this control within this context.  I'm assuming I do not quite have correct usage of RadScriptManager (&ScriptManagerProxy) and/or RadAjaxManager (&RadAjaxManagerProxy) and/or some other missing element along those lines.

I would be very happy to know the absolute minimum that would normally be needed to get a basic RadDatePicker control working in this context, assuming there are no mystery conflicts to be dealt with.

Put _____??_______ in the master page (if anything)?

Put _____??_______ in the content page (if anything)?

Put _____??_______ in the repeater item template (if anything)?

Put _____??_______ in the customer control.?

Maria Ilieva
Telerik team
 answered on 21 May 2015
1 answer
121 views

In my application i have one grid with following itemtemplate column

  <telerik:RadGrid ID="gvContainerDetail" runat="server" AllowPaging="True" CellSpacing="0"
                                            GridLines="None" AutoGenerateColumns="false" OnItemCommand="gvContainerDetail_ItemCommand"
                                            OnItemDataBound="gvContainerDetail_ItemDataBound">
                                            <FilterMenu EnableImageSprites="False">
                                            </FilterMenu>
                                            <ClientSettings>
                                                <Selecting CellSelectionMode="None" AllowRowSelect="True" />
                                            </ClientSettings>
                                            <MasterTableView>
                                                <Columns>
                                                    <telerik:GridTemplateColumn HeaderText="Container Type" DataField="ContainerType"
                                                        HeaderStyle-HorizontalAlign="Center">
                                                        <ItemTemplate>
                                                            <telerik:RadComboBox ID="cbContainerType" Height="100px" Width="200px" runat="server"
                                                                ItemsPerRequest="10" ShowMoreResultsBox="true" EnableVirtualScrolling="true"
                                                                EnableAutomaticLoadOnDemand="False" AccessKey="T" MarkFirstMatch="true" EmptyMessage="Select"
                                                                HighlightTemplatedItems="true">
                                                            </telerik:RadComboBox>
                                                            <asp:Label ID="lblContainrtTypeId" runat="server" Text='<%#Eval("nContainerId") %>'></asp:Label>
                                                            <asp:RequiredFieldValidator ID="rfvcbContainerType" runat="server" ControlToValidate="cbContainerType"
                                                                ForeColor="Red" ValidationGroup="vgBooking" Display="none" EnableClientScript="true">
                                                            </asp:RequiredFieldValidator>
                                                        </ItemTemplate>
                                                    </telerik:GridTemplateColumn>
                                                    <telerik:GridTemplateColumn HeaderText="No Of Container" UniqueName="Container" DataField="ContainerNo">
                                                        <ItemTemplate>
                                                            <telerik:RadNumericTextBox ID="txtContainer" Text='<%#Eval("NoOfContainer") %>' Width="200px"
                                                                runat="server" MaxLength="10" MinValue="1" MaxValue="2147483647">
                                                                <NumberFormat GroupSeparator="" DecimalDigits="0" />
                                                            </telerik:RadNumericTextBox>
                                                            <span style="color: Red; font-weight: normal; font-size: 20px; vertical-align: middle;">
                                                                *</span>
                                                            <asp:RequiredFieldValidator ID="rfvtxtContainer" runat="server" ControlToValidate="txtContainer"
                                                                ForeColor="Red" ValidationGroup="vgBooking" Display="none" EnableClientScript="true">
                                                            </asp:RequiredFieldValidator>
                                                        </ItemTemplate>
                                                    </telerik:GridTemplateColumn>
                                                    <telerik:GridTemplateColumn UniqueName="Container" HeaderStyle-HorizontalAlign="Center">
                                                        <ItemTemplate>
                                                            <telerik:RadButton ID="btnAddContainer" Width="100px"
                                                                runat="server" Text="+" Font-Bold="True" OnClick="btnAddContainer_Click">
                                                            </telerik:RadButton>
                                                        </ItemTemplate>
                                                    </telerik:GridTemplateColumn>
                                                </Columns>
                                            </MasterTableView>
                                        </telerik:RadGrid>

and one submit button

 <telerik:RadButton ID="btnsubmit " Width="100px" runat="server" Text="Submit"
                                                        Font-Bold="True" OnClick="btnsubmit _Click" ValidationGroup="vgBooking">
                                                    </telerik:RadButton>

 and ajax manager is

 <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">

<AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="btnAddContainer">
                <UpdatedControls>
                   <telerik:AjaxUpdatedControl ControlID="gvContainerDetail" > </telerik:AjaxUpdatedControl>
                    </telerik:AjaxUpdatedControl>
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>

 

after clicking on submit button first time validation works properly and if i click on '+' button in grid one row is added in grid the ajax is works correctly but problem is that if i am clicked on again submit button the client side validation in grid is not working the page is post back

Maria Ilieva
Telerik team
 answered on 21 May 2015
11 answers
225 views
I am trying to set the combo box to index 0 but nothing happens.   What is wrong?

<head runat="server">
  <title></title>
</head>
<body>
  <form id="form1" runat="server">
  <div>
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
    </telerik:RadScriptManager>
    <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
      <script type="text/javascript">
  
  
        function ResetScreen() {
  
          var oCbo = $find("<%=cboTransferMethod.ClientID %>");
          oCbo.set_selectedIndex(0);
        }
  
      </script>
    </telerik:RadCodeBlock>
    <telerik:RadComboBox ID="cboTransferMethod" runat="server" Skin="Simple" TabIndex="1"
      ToolTip="Transfer Method">
      <Items>
        <telerik:RadComboBoxItem runat="server" Text="Email" Value="E" />
        <telerik:RadComboBoxItem runat="server" Text="FTP" Value="F" />
        <telerik:RadComboBoxItem runat="server" Text="Move To Folder" Value="M" />
      </Items>
    </telerik:RadComboBox>
    <asp:Button ID="btnClear" runat="server" OnClientClick="ResetScreen(); return false;"
      TabIndex="1" Text="Clear" ToolTip="Clear" UseSubmitBehavior="false" />
  </div>
  </form>
</body>
</html>
Nencho
Telerik team
 answered on 21 May 2015
1 answer
107 views

How would you go about caching the steps' data so that all steps can be aware of each other?

 

Step 1 has a list of object type Product.

Step 2 details all Procuts in a RadListView.

 

I want Step 2 to bind based on Step 1's user input.

 

 TIA!

Plamen
Telerik team
 answered on 21 May 2015
1 answer
75 views

Hello,

I am New in Telerik. As new comer I m facing some problem. I am using a Radgrid to show my one of table. In the grid there is a  telerik:GridCalculatedColumn .  The code is below

<telerik:GridCalculatedColumn HeaderText="GrossSalary" UniqueName="GrossSalary" DataType="System.Double"
                               DataFields="PFOfficeCont, ConsuladatedSalary" Expression="{0}+{1}" FooterText="Total : "
                               Aggregate="Sum" EditFormColumnIndex="2">
                           </telerik:GridCalculatedColumn>
  It shows the SUM of to colums values nicely. But when I click In-forms editing mode Grosssalay field does not Shows! In-line editing mode shows the GrossSalary field nicely. I want to know where is the problem?

Please kindly help me to implement this. 

With best regards

Sajid

Eyup
Telerik team
 answered on 21 May 2015
7 answers
325 views
Hi..

This happens only in chrome.. the radwindow moves up after laoding.. It is maximized onload by javascript..

works fine in mozilla / IE ..issue is in chrome only...

please help..
Jonathan
Top achievements
Rank 1
 answered on 21 May 2015
0 answers
53 views

Hi,

 

I need to export the radeditor content to pdf. But, it should not show the savedialog box for filepath. How do we specify the filepath and filename? So that, it automatically get saved.

 

Please let me know.

 

Thanks.

Nallan Krishnan
Top achievements
Rank 1
 asked on 21 May 2015
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?