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

dears , I just need your help as I've a grid contain two labels they are retrieving dates " start_date " " end_date "
I already create a "diff_button", I need when I press in this button to subtract the dates and get the difference in months
and then insert the value in a cell "difference "
Mohamed El-Sayed
Top achievements
Rank 1
 answered on 21 Jun 2014
4 answers
338 views
Hi,

I have integrated the RadUploadProgress module with my web application.

Oiwng to this I had to add a new line in my web.config file as below:

<add name="RadUploadModule" type="Telerik.WebControls.RadUploadHttpHandler, RadUpload.Net2"/>

The website successfully builds.
Now when I try to run the application in the debug mode, it generates a runtime error as below:

Configuration Error 
Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately. 
  
Parser Error Message: Could not load file or assembly 'RadUpload.Net2' or one of its dependencies. The system cannot find the file specified. (E:\Webhome\Power50\Power50UI\web.config line 97)
  
Source Error: 
  
  
Line 95:    <!--<add name="RadUploadModule" type="Telerik.Web.UI.RadUploadHttpModule" />-->
Line 96:    <add name="RadCompression" type="Telerik.Web.UI.RadCompression" />
Line 97:       <add name="RadUploadModule" type="Telerik.WebControls.RadUploadHttpHandler, RadUpload.Net2"/>
Line 98:    </httpModules>
Line 99:   
  

Please suggest how can I get this resolved.

Thanks.
Debashis


Satbir
Top achievements
Rank 1
 answered on 21 Jun 2014
1 answer
494 views
Hi,

Is there a way to prevent the user from entering more decimal places than specified in the decimal digits setting? 

There was another forum post asking something similar about the control automatically adjusting the value when the user enters something out of range.  Setting AllowOutOfRangeAutoCorrect="false" worked great to address the out of range problem.  Is there something along the lines of AllowRoundingAutoCorrect="false"?

If I set the Type="currency" and NumberFormat-DecimalDigits=2, then I would like the control to display the same sort of validation error as it does for an out of range entry.  Is that possible maybe with javascript?

And note...the default behavior for any control should NEVER be to just automatically change what the user enters to a valid value.

Thanks,
Princy
Top achievements
Rank 2
 answered on 21 Jun 2014
3 answers
1.0K+ views
Hi,

I have nested RadGrid and I want to get the value of a particular column from the selected row of matertableview( in other words clicking on the expand/collapse). Because, I need to use that for the child items query.

Below is my code-snippet:

​protected void RadGrid1_ItemCommand(object sender, GridCommandEventArgs e)
{
            // code???
                    string customerid= dataItem.GetDataKeyValue("CustomerId");
 }

Thanks a million.
           
Princy
Top achievements
Rank 2
 answered on 21 Jun 2014
1 answer
106 views
Hi Telerik,

I'm facing an undesired duplicate recording problem with RadGrid when the user accidentally hit the insert link more than once.

The radgrid will execute the insertion twice, I've tried some solution such as Response.Redirect to the same page in the OnItemInserted event, but it will not help due to the fact that the insert command is already sent twice.

I came across a post in the forum mentioning the same issue here, but the admin seems to have misunderstood the question, much appreciated if this time someone can give a better instruction on the problem.

If one double-click can't mimic the problem, click on the insert link nonstop with certain frequency until the page is refreshed, you'll see multiple same record are inserted into the radgrid.

Hope I'm clear here.

Best regards.
Princy
Top achievements
Rank 2
 answered on 21 Jun 2014
0 answers
176 views
I am having an issue in the Kendo HTML 5 Scheduler.  I am setting the Scheduler to Etc/UTC, which as I understand it, should display the event at the time it comes in.  However, it appears to be adjusting the event to the browser timezone.

I edited the demo site to recreate this problem.  Here is the code: http://trykendoui.telerik.com/URux/3

If you run this, the event shows up at your local time, even though it's set to epoch 1403229600000 which is 2:00am UTC.  I'm in Mountain Time, so it shows up at 8:00pm the previous day (-6 hours UTC) in the schedule.

Now look at http://trykendoui.telerik.com/URux

The following lines have changed:
      StartTimezone: null, to StartTimezone: "Etc/UTC",
and
      EndTimezone: null, to EndTimezone: "Etc/UTC",

The event shows up correctly, however, now try and drag it to a new date.  It saves to the local browser time again.

Am I doing something wrong here?
Scott
Top achievements
Rank 1
 asked on 20 Jun 2014
4 answers
263 views
I used a previous example of how to use CSS to format the RadMenu and it has worked for the most part.  I am having trouble with two different items. The first is it appears that I have a separator and I can't figure out how to get rid of it - I tried in the css to make border 0 and width 0 but that did not seem to help.  The bigger issue is how to get the background down to the second level.  The css works great for the root and 1st level but I cannot figure out how to get the second level menu to have the same background.  Finally, is there a way to get the right arrows that show a sub menu to be a different color (or change the image)?

The image of what I'm getting is an attachment.

Here is the css I'm using:

 

div.RadMenu_Default ul.rmRootGroup

 

{

 

background:#344A7C url(App_Themes/Default/images/menu_bg.jpg) top left repeat-x;

 

 

border: 0;

 

}

 

div.RadMenu_Default .rmHorizontal .rmSeparator

 

{

 

width:0px;

 

 

border:0px;

 

}

 

div.RadMenu_Default .rmRootGroup .rmLink

 

{

 

font-weight: bold;

 

 

line-height:30px;

 

 

font-size: 12pt;

 

 

color: #fff;

 

}

 

div.RadMenu_Default .rmItem .rmLink:hover,

 

 

div.RadMenu_Default .rmItem .rmFocused,

 

 

div.RadMenu_Default .rmItem .rmSelected,

 

 

div.RadMenu_Default .rmItem .rmExpanded {

 

 

background:#344A7C url(App_Themes/Default/images/menu_bg.jpg) top left repeat-x;

 

 

border: 0;

 

 

color: yellow;

 

}

 

/*for subitems */

 

 

div.RadMenu_Default ul.rmGroup

 

{

 

background:#344A7C url(App_Themes/Default/images/menu_hover.jpg) top left repeat-x;

 

}

 

div.RadMenu_Default .rmGroup .rmLink

 

{

 

font-weight:normal;

 

 

line-height:24px;

 

 

font-size: 10pt;

 

 

color: red;

 

}

 

div.RadMenu_Default .rmGroup .rmItem .rmLink:hover,

 

 

div.RadMenu_Default .rmGroup .rmItem .rmFocused,

 

 

div.RadMenu_Default .rmGroup .rmItem .rmSelected,

 

 

div.RadMenu_Default .rmGroup .rmItem .rmExpanded {

 

 

background:#344A7C url(App_Themes/Default/images/menu_bg.jpg) top left repeat-x;

 

 

border: 0;

 

 

color: yellow;

 

}



any help you can provide will be greatly appreciated.

Thanks,

Steve
Boyan Dimitrov
Telerik team
 answered on 20 Jun 2014
2 answers
113 views
Hello,

I have noticed the following behaviour with UI for ASP.NET AJAX controls.
If you put a RadGrid on the default page and surf to the url: http://localhost:1234/ the events like sorting do not get fired. Well, you see a postback, but the sorting is not done. If you surf to the page explicitly (http://localhost:1234/default.aspx) it functions as expected. 
Same goes for i.e. RadMenu OnItemClick event. This does not get fired, unless you specifically go to the page. 

Is this a known issue and can one by-pass this, other than surfing to that specific page?
Frank Witte
Top achievements
Rank 1
 answered on 20 Jun 2014
2 answers
240 views
I have a RadComboBox (cbSCAT) that is designed with multiple columns that resides inside of a RadGrid.  It looks like this:
<telerik:RadGrid ID="rgChartOfAccts" runat="server" Skin="Metro" CellSpacing="-1" GridLines="Both" Width="98%" AllowPaging="True">
<ClientSettings>
    <Scrolling AllowScroll="True" SaveScrollPosition="True" UseStaticHeaders="True"></Scrolling>
</ClientSettings>
<MasterTableView AutoGenerateColumns="False" DataKeyNames="COA_ID,COA_GL_ACCOUNT" CommandItemDisplay="Top"
    InsertItemPageIndexAction="ShowItemOnCurrentPage" EditMode="PopUp" Name="ChartOfAccts">
    <CommandItemSettings ShowExportToExcelButton="true" ShowRefreshButton="False" AddNewRecordText="Add new Account" />
    <RowIndicatorColumn Visible="False">
    </RowIndicatorColumn>
    <ExpandCollapseColumn Created="True">
    </ExpandCollapseColumn>
    <Columns>
    <telerik:GridEditCommandColumn ButtonType="ImageButton" Exportable="False" HeaderStyle-Width="30px" ColumnGroupName="grpCOA" />
    <telerik:GridTemplateColumn HeaderText="Account" UniqueName="COA_GL_ACCOUNT" ColumnGroupName="grpCOA">
        <EditItemTemplate>
        <telerik:RadTextBox ID="txtCOA_Acct" runat="server" Text='<%# Bind("COA_GL_ACCOUNT")%>' Width="490px" MaxLength="150"></telerik:RadTextBox>
        <asp:RequiredFieldValidator ID="rfvCOA_Acct" runat="server" ErrorMessage="RequiredFieldValidator" ControlToValidate="txtCOA_Acct" Text="*" Font-Size="Small" SetFocusOnError="True"></asp:RequiredFieldValidator>
        </EditItemTemplate>
        <ItemTemplate>
        <asp:Label ID="lblCOA_Acct" runat="server" Text='<%# Eval("COA_GL_ACCOUNT")%>'></asp:Label>
        </ItemTemplate>
    </telerik:GridTemplateColumn>
    <telerik:GridTemplateColumn HeaderText="Description" UniqueName="COA_DESCRIPTION" ColumnGroupName="grpCOA">
        <EditItemTemplate>
        <telerik:RadTextBox ID="txtCOA_Desc" runat="server" Text='<%# Bind("COA_DESCRIPTION")%>' Width="490px" MaxLength="150"></telerik:RadTextBox>
        </EditItemTemplate>
        <ItemTemplate>
        <asp:Label ID="lblCOA_Desc" runat="server" Text='<%# Eval("COA_DESCRIPTION")%>'></asp:Label>
        </ItemTemplate>
    </telerik:GridTemplateColumn>
    <telerik:GridTemplateColumn HeaderText="Category" UniqueName="COA_CATEGORY" ColumnGroupName="grpCOA">
        <EditItemTemplate>
        <telerik:RadTextBox ID="txtCOA_Cat" runat="server" Text='<%# Bind("COA_CATEGORY")%>' Width="490px" MaxLength="150"></telerik:RadTextBox>
        </EditItemTemplate>
        <ItemTemplate>
        <asp:Label ID="lblCOA_Cat" runat="server" Text='<%# Eval("COA_CATEGORY")%>'></asp:Label>
        </ItemTemplate>
    </telerik:GridTemplateColumn>
    <telerik:GridTemplateColumn HeaderText="Contra Account" UniqueName="COA_CONTRA_ACCOUNT" ColumnGroupName="grpCOA">
        <EditItemTemplate>
        <telerik:RadTextBox ID="txtCOA_Contra" runat="server" Text='<%# Bind("COA_CONTRA_ACCOUNT")%>' Width="490px" MaxLength="150"></telerik:RadTextBox>
        <asp:RequiredFieldValidator ID="rfvCOA_Contra" runat="server" ErrorMessage="RequiredFieldValidator" ControlToValidate="txtCOA_Contra" Text="*" Font-Size="Small" SetFocusOnError="True"></asp:RequiredFieldValidator>
        </EditItemTemplate>
        <ItemTemplate>
        <asp:Label ID="lblCOA_Contra" runat="server" Text='<%# Eval("COA_CONTRA_ACCOUNT")%>'></asp:Label>
        </ItemTemplate>
    </telerik:GridTemplateColumn>
    <telerik:GridButtonColumn ConfirmText="Delete this Account?" ConfirmDialogType="RadWindow" ColumnGroupName="grpCOA"
        ConfirmTitle="Delete" ButtonType="ImageButton" CommandName="Delete" Exportable="False" HeaderStyle-Width="30px" />
    </Columns>
    <DetailTables>
    <telerik:GridTableView Name="RateTypeAss" CommandItemDisplay="Top" DataSourceID="" EditMode="PopUp"
        DataKeyNames="RTA_ID" runat="server" Width="100%" BackColor="#FFCC66" AlternatingItemStyle-BackColor="#FFCC66"
        HeaderStyle-BackColor="#FFCC66" ClientDataKeyNames="RTA_ID,COA_GL_ACCOUNT" AutoGenerateColumns="False" ShowHeadersWhenNoRecords="True"
        EnableNoRecordsTemplate="True" NoDetailRecordsText="No Associated records to display.">
        <CommandItemSettings ShowAddNewRecordButton="True" ShowRefreshButton="False" ShowExportToExcelButton="True" AddNewRecordText="Add new Association" />
        <ParentTableRelation>
        <telerik:GridRelationFields DetailKeyField="COA_GL_ACCOUNT" MasterKeyField="COA_GL_ACCOUNT" />
        </ParentTableRelation>
        <NoRecordsTemplate>No records to display.</NoRecordsTemplate>
        <RowIndicatorColumn Visible="False">
        </RowIndicatorColumn>
        <EditFormSettings PopUpSettings-Width="600px" InsertCaption="New Association" PopUpSettings-Modal="True">
        <EditColumn ButtonType="ImageButton" />
        </EditFormSettings>                                   
        <Columns>
        <telerik:GridEditCommandColumn ButtonType="ImageButton" Exportable="False" HeaderStyle-Width="30px" />
        <telerik:GridTemplateColumn HeaderText="Account" UniqueName="COA_GL_ACCOUNT">
            <EditItemTemplate>
              <asp:Label ID="lblAcctA" runat="server" Text='<%# Bind("COA_GL_ACCOUNT")%>'></asp:Label>
            </EditItemTemplate>
            <ItemTemplate>
              <asp:Label ID="lblAcctB" runat="server" Text='<%# Eval("COA_GL_ACCOUNT")%>'></asp:Label>
            </ItemTemplate>
        </telerik:GridTemplateColumn>
 
        <telerik:GridTemplateColumn HeaderText="List Code" UniqueName="RATE_TYPE_LIST_CODE">
            <EditItemTemplate>
            <telerik:RadComboBox ID="cbRTL" runat="server" DataSourceID="linqDS_RTL" DataTextField="RATE_TYPE_LIST_CD" DataValueField="RATE_TYPE_LIST_CD"  OnItemDataBound="cbRTL_ItemDataBound" OnSelectedIndexChanged="cbRTL_SelectedIndexChanged"
                Skin="Metro" SelectedValue='<%#Bind("RATE_TYPE_LIST_CODE")%>' DropDownWidth="520px" Width="100px" HighlightTemplatedItems="True"
                AutoPostBack="True" BorderStyle="Solid" BorderWidth="1px" BorderColor="Gray" Height="200px" AppendDataBoundItems="True">
                <HeaderTemplate>
                <table cellpadding="1" cellspacing="0" class="Main" width="485px">
                    <tr>
                    <td class="ComboHeader2" width="85px" style="text-align: left; visibility: visible;">Code</td>
                    <td class="ComboHeader2" width="350px" style="text-align: left; visibility: visible;">Description</td>
                    <td class="ComboHeader2" width="50px" style="text-align: left; visibility: visible;">Type</td>
                    </tr>
                </table>
                </HeaderTemplate>
                <ItemTemplate>
                <table cellpadding="1" cellspacing="0" class="Main" width="485px">
                    <tr>
                    <td width="85px" style="text-align: left; visibility: visible;">
                        <%#DataBinder.Eval(Container.DataItem, "RATE_TYPE_LIST_CD")%>
                    </td>
                    <td width="350px" style="text-align: left; visibility: visible;">
                        <%#DataBinder.Eval(Container.DataItem, "RATE_TYPE_LIST_DESC")%>
                    </td>
                    <td width="50px" style="text-align: left; visibility: visible;">
                        <%#DataBinder.Eval(Container.DataItem, "RATE_TYPE_LIST_TYPE")%>
                    </td>
                    </tr>
                </table>
                </ItemTemplate>
                <Items>
                <telerik:RadComboBoxItem ID="RadComboBoxItem2" runat="server" />
                </Items>
            </telerik:RadComboBox>
          </EditItemTemplate>
          <ItemTemplate>
              <asp:Label ID="lblRTL_Code" runat="server" Text='<%# Eval("RATE_TYPE_LIST_CODE")%>'></asp:Label>
          </ItemTemplate>
        </telerik:GridTemplateColumn>
        <telerik:GridTemplateColumn HeaderText="List Description" UniqueName="RATE_TYPE_LIST_DESC">
            <EditItemTemplate>
            <telerik:RadTextBox ID="txtRTL_Desc" runat="server" Text='<%# Bind("RATE_TYPE_LIST_DESC")%>' Width="490px" MaxLength="150"></telerik:RadTextBox>
            </EditItemTemplate>
            <ItemTemplate>
              <asp:Label ID="lblRTL_Desc" runat="server" Text='<%# Eval("RATE_TYPE_LIST_DESC")%>'></asp:Label>
            </ItemTemplate>
        </telerik:GridTemplateColumn>
        <telerik:GridTemplateColumn HeaderText="Service Category" UniqueName="SCAT_CODE" HeaderStyle-Width="105px">
            <EditItemTemplate>   
            <telerik:RadComboBox ID="cbSCAT" runat="server" DataSourceID="linqDS_SCAT" DataTextField="SCAT_TYPE" DataValueField="SCAT_TYPE"
                Skin="Metro" SelectedValue='<%#Bind("SCAT_CODE")%>' DropDownWidth="520px" Width="100px" HighlightTemplatedItems="True"
                BorderStyle="Solid" BorderWidth="1px" BorderColor="Gray" Height="200px" AppendDataBoundItems="True" OnDataBound="cbSCAT_DataBound">
                <HeaderTemplate>
                <table cellpadding="1" cellspacing="0" class="Main" width="485px">
                    <tr>
                    <td class="ComboHeader2" width="85px" style="text-align: left; visibility: visible;">Code</td>
                    <td class="ComboHeader2" width="350px" style="text-align: left; visibility: visible;">Description</td>
                    </tr>
                </table>
                </HeaderTemplate>
                <ItemTemplate>
                <table cellpadding="1" cellspacing="0" class="Main" width="485px">
                    <tr>
                    <td width="85px" style="text-align: left; visibility: visible;">
                        <%# If(Container.DataItem IsNot Nothing, DataBinder.Eval(Container.DataItem, "SCAT_TYPE"), DataBinder.Eval(Container, "Value"))%>
                    </td>
                    <td width="350px" style="text-align: left; visibility: visible;">
                        <%# If(Container.DataItem IsNot Nothing, DataBinder.Eval(Container.DataItem, "SCAT_DESC"), DataBinder.Eval(Container, "Text"))%>
                    </td>
                    </tr>
                </table>
                </ItemTemplate>
            </telerik:RadComboBox>
          </EditItemTemplate>
          <ItemTemplate>
              <asp:Label ID="lblSCAT" runat="server" Text='<%# Eval("SCAT_CODE")%>'></asp:Label>
          </ItemTemplate>
        </telerik:GridTemplateColumn>
        <telerik:GridTemplateColumn HeaderText="Jurisdiction" UniqueName="JURISDICTION" HeaderStyle-Width="105px">
            <EditItemTemplate>
            <telerik:RadComboBox ID="cbJuris" runat="server" Skin="Metro" SelectedValue='<%#Bind("JURISDICTION")%>' DropDownWidth="50px"
                Width="50px" HighlightTemplatedItems="True" BorderStyle="Solid" BorderWidth="1px" BorderColor="Gray">
                <Items>
                <telerik:RadComboBoxItem Value="" Text="" Selected="true" />
                <telerik:RadComboBoxItem Value="B" Text="B" />
                <telerik:RadComboBoxItem Value="L" Text="L" />
                <telerik:RadComboBoxItem Value="N" Text="N" />
                </Items>
            </telerik:RadComboBox>
            </EditItemTemplate>
            <ItemTemplate>
              <asp:Label ID="lblRTL_Juris" runat="server" Text='<%# Eval("JURISDICTION")%>'></asp:Label>
            </ItemTemplate>
        </telerik:GridTemplateColumn>
        <telerik:GridTemplateColumn HeaderText="List Type" UniqueName="RATE_TYPE_LIST_TYPE" HeaderStyle-Width="105px">
            <EditItemTemplate>
            <telerik:RadComboBox ID="cbRTL_Type" runat="server" Skin="Metro" SelectedValue='<%#Bind("RATE_TYPE_LIST_TYPE")%>' DropDownWidth="50px"
                Width="50px" HighlightTemplatedItems="True" BorderStyle="Solid" BorderWidth="1px" BorderColor="Gray">
                <Items>
                <telerik:RadComboBoxItem Value="" Text="" Selected="true" />
                <telerik:RadComboBoxItem Value="D" Text="D" />
                <telerik:RadComboBoxItem Value="N" Text="N" />
                <telerik:RadComboBoxItem Value="R" Text="R" />
                <telerik:RadComboBoxItem Value="S" Text="S" />
                <telerik:RadComboBoxItem Value="T" Text="T" />
                <telerik:RadComboBoxItem Value="X" Text="X" />
                </Items>
            </telerik:RadComboBox>
            </EditItemTemplate>
            <ItemTemplate>
              <asp:Label ID="lblRTL_Type" runat="server" Text='<%# Eval("RATE_TYPE_LIST_TYPE")%>'></asp:Label>
            </ItemTemplate>
        </telerik:GridTemplateColumn>
        <telerik:GridTemplateColumn Visible="False" EditFormHeaderTextFormat="">
            <EditItemTemplate>
              <asp:Label ID="lblErr" runat="server" Text= Font-Bold="True" ForeColor="Red"></asp:Label>
            </EditItemTemplate>
        </telerik:GridTemplateColumn>
        <telerik:GridButtonColumn ButtonType="ImageButton" CommandName="Delete" ConfirmDialogType="RadWindow" ConfirmText="Delete this Association?" ConfirmTitle="Delete" Exportable="False" HeaderStyle-Width="30px" />
        </Columns>
        <AlternatingItemStyle BackColor="#FFCC66" />
        <HeaderStyle BackColor="#FFCC66" />
    </telerik:GridTableView>
    </DetailTables>
    <EditFormSettings PopUpSettings-Width="600px" PopUpSettings-Modal="True" InsertCaption="New Account" PopUpSettings-ShowCaptionInEditForm="False">
    <EditColumn ButtonType="ImageButton" />
    </EditFormSettings>
</MasterTableView>
<ClientSettings>
    <ClientEvents OnPopUpShowing="PopUpShowing2" />
</ClientSettings>
</telerik:RadGrid>

I add a extra row to cbSCAT using the following code:
Protected Sub cbSCAT_DataBound(sender As Object, e As EventArgs)
    Dim combo As RadComboBox = DirectCast(sender, RadComboBox)
    Dim item As RadComboBoxItem = New RadComboBoxItem("ALL", "XX")
    combo.Items.Insert(0, item)
    item.DataBind()
End Sub

It's adding to the Combobox ok except when I chose to edit a grid row with the "extra row", ie the "XX" row, the edit window doesn't even popup.  If I chose Add new record it shows up in the combobox ok like it should.  If I chose to edit a row with a value from the datasource the popup edit window comes up just fine.  

What am I missing?
Boyan Dimitrov
Telerik team
 answered on 20 Jun 2014
3 answers
211 views
Hello

I have a candlestick chart with daily data. When I use the mouse to zoom in, the chart expands showing HH:mm format in the x-axis. I need to restrict zoom-in to  the daily level, without showing hours/minutes, even if that means displaying only 1 bar on the chart. How do i implement such a restriction? Thanks.

JB
Danail Vasilev
Telerik team
 answered on 20 Jun 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?