Telerik Forums
UI for ASP.NET AJAX Forum
6 answers
236 views
I using GridTemplateColumn RadNumericTextBox when i enter Amount in textbox automatically add  to Total ,sample code in  client side and server side

Eyup
Telerik team
 answered on 01 Mar 2016
1 answer
386 views

Hi there;

I have a grid with column definitions similar to the following:

<telerik:GridNumericColumn UniqueName="R1" Visible="true" ReadOnly="false" HeaderText="Q1" DataField="R1" DataFormatString="{0:0}%" HeaderStyle-CssClass="EntryColumn" ItemStyle-CssClass="EntryColumn" />

The EntryColumn class just has a simple width:30px definition, with nothing else.

The grid respects the column width until I add the Command Bar display - with that on, it reverts to just showing the columns in the default width.  I can fix it using ItemStyle-Width, but I'd rather use a class definition as I have several of these types of grids scattered throughout the app.

Anybody know what I'm doing wrong?

Thanks,

Jason

Pavlina
Telerik team
 answered on 01 Mar 2016
1 answer
327 views

Hi guys, i need to persist file across Postback while users click on RadWizard NextButton.

I can't use PostbackTriggers because i don't know the Nextbutton ID. Can you give me an advice or an alternative ?
Thanks much for your time.

Nencho
Telerik team
 answered on 01 Mar 2016
21 answers
319 views
I'm trying to generate the RecurrenceRule by code.
However,  it failed when selecting "Monthly" and "The first day of every month"

The error can be reproduced in Telerik Demo Web Site:

1.  Add a new appointment.
2.  Click the "Option" button
3.  Check the "Recurrence" checkbox
4.  Select "Monthly"
5. Select "The first day of every 1 month(s)"
6.  Click "Save"
7.  There was an error generated.

In my project, I got the "Object reference not set to an instance of an object" error.

Thanks,
Wilson


Peter Filipov
Telerik team
 answered on 01 Mar 2016
1 answer
149 views

hi

 

I have all the items expanded during page load, but i need to also change the background color of the parent items to transparent. How should i go about it? This is my code. Thanks

  if (!IsPostBack)
                {
                    foreach (RadPanelItem item in RadPanelBar1.GetAllItems())
                    {
                        if (item.Items.Count > 0)
                        {
                            item.Expanded = true;

                        }
                    }

                }

Ivan Danchev
Telerik team
 answered on 01 Mar 2016
3 answers
230 views

I've noticed some funny behavior when I combine the UseStaticHeaders and GridTemplateColumn configurations for the RadGrid.

The grid loses the header and the detail disappears on occasion as well.

Here is a snippet of code:

<telerik:RadGrid
runat="server"
ID="gridSample"
AutoGenerateColumns="false"
ShowHeader="true"
ShowFooter="false"
OnItemDataBound="gridSample_ItemDataBound"
OnNeedDataSource="gridSample_NeedDataSource"
>
<ClientSettings>
<Scrolling AllowScroll="true" ScrollHeight="400px" UseStaticHeaders="true" />
</ClientSettings>
<MasterTableView EnableNoRecordsTemplate="true">
<NoRecordsTemplate>
<asp:Label runat="server" Text="There is no file to review" />
</NoRecordsTemplate>
<Columns>
<telerik:GridTemplateColumn HeaderText="Name" UniqueName="Name">
<ItemTemplate>
<asp:Label runat="server" Text='<%# Eval("LastName") + ", " + Eval("FirstName") + " " + Eval("MiddleName") %>' />
</ItemTemplate>
<ItemStyle Width="45%" HorizontalAlign="Left" />
<HeaderStyle Width="45%" HorizontalAlign="Left" />
</telerik:GridTemplateColumn>
.

.

.

</Columns>
</MasterTableView>
</telerik:RadGrid>

I believe the sticking point is the use of static headers with the grid template columns. If I remove either the template columns or the UseStaticHeaders declarative, the problem goes away.

This is an older app that i am supporting and it is using the 2015.1.225.35 version of the assembly.
Pavlina
Telerik team
 answered on 01 Mar 2016
1 answer
171 views

I am using a RadGrid with batch edit mode. I want to have keyboard navigation turned on so that a user can tab through the columns in the current row. When this is turned on the default behavior is that when a user hits tab on the last control of a row, when there are additional rows in the grid, the user is navigated to the next row. What I want to prevent is the navigation to the next row when the last control in the edited row is currently being edited and the user presses tab. Is this possible? Is it possible to save that row edit if tab is pressed on that last control?

 

Thank you for your time.

Kostadin
Telerik team
 answered on 01 Mar 2016
0 answers
67 views

Hello

in a combobox the user writes the city and the program should search for this city according to written characters obviously do a search in a sql table that has over 9000 records. I set of keywords to speed everything but I ask you, which of the two methods of code is more powerful?

 

Protected Sub luogoresidenza_ItemsRequested(sender As Object, e As RadComboBoxItemsRequestedEventArgs) Handles luogoresidenza.ItemsRequested
        Using Context As New touristEntities
                If Not [String].IsNullOrEmpty(e.Text) Then
                    Dim Query = (From c In Context.Tab_comuni_nazioni
                                 Where c.c_descrizione.StartsWith(e.Text)
                                 Order By c.c_descrizione
                                 Select c.c_idrecord, c.c_descrizione).ToList
 
                    Dim query1 = Query.Skip(e.NumberOfItems).Take(10)
                    luogoresidenza.DataSource = query1
                    luogoresidenza.DataBind()
 
                    Dim endOffset As Integer = e.NumberOfItems + query1.Count()
                    Dim totalCount As Integer = Query.Count()
 
                    If endOffset = totalCount Then
                        e.EndOfItems = True
                    End If
 
                    e.Message = [String].Format("Items <b>1</b>-<b>{0}</b> out of <b>{1}</b>", endOffset, totalCount)
                End If
        End Using
    End Sub

Or better to use a web service?

 

 

Fabio Cirillo
Top achievements
Rank 1
 asked on 01 Mar 2016
4 answers
231 views
 I have a rad rotator. I want to show a tooltip On radrotator OnClientItemClicked event
. I also Want to get the text of lblDescription in to tootip's Label1. . Is  there any way to do this in client side.My code is Here.. Thanks in Advance

<telerik:RadRotator ID="RadRotator1" runat="server" FrameDuration="1"
                     ScrollDirection="up" Height="140px"  ScrollDuration="2000"  OnClientItemClicked="itemclicked"
                    Width="100%"   >

                    <ItemTemplate>
      
                  
                        <asp:LinkButton ID="LinkButton1" runat="server" Font-Size="Small" Font-Italic="False" ForeColor="#0033CC">
                                             <%#  Eval("Title")%></asp:LinkButton>
                              <asp:Label ID="lblDescription" runat="server" ><%# Eval("Description")%>                  </asp:Label>

                    </ItemTemplate>
    </telerik:RadRotator>


     <telerik:RadToolTip runat="server" ID="RadToolTip2"  ShowEvent="FromCode"  ShowDelay="0" TargetControlID="LinkButton1" Animation="Slide"
                        HideEvent="ManualClose" Width="300px" RelativeTo="Element" Position="MiddleRight" >
                        
                          <asp:Label ID="Label2" runat="server" >             </asp:Label>

                        </telerik:RadToolTip>
Stamo Gochev
Telerik team
 answered on 01 Mar 2016
3 answers
2.4K+ views

I'm experiencing an issue getting my UpdatePanel to work properly in a C# ASP.NET project.  It's identical code to multiple other pages in my solution, but has unusual behavior on this page.  The goal is simply to allow the user to change a radio button which then alters the visibility of various table rows further down in the UpdatePanel.  Interestingly enough, the CheckBox works as expected.

In my current page, I have the following code:

<asp:UpdatePanel ID="updatePanel" runat="server" UpdateMode="Conditional">
    <ContentTemplate>
        <span class="stepTitle">Set Fluid Properties</span>
        <div class="calculateInnerDiv">
            <asp:RadioButtonList ID="FluidTypeList" runat="server" AutoPostBack="true" RepeatDirection="Horizontal" TabIndex="101" OnSelectedIndexChanged="FluidTypeList_Changed">
                 <asp:ListItem Text="" Value="Liquid" />
                 <asp:ListItem Text="" Value="Gas" />
                 <asp:ListItem Text="" Value="Steam" />
             </asp:RadioButtonList>
             <asp:CheckBox ID="IsCompressibleCheckBox" runat="server" AutoPostBack="true"  Text="Fluid Is Compressible" Checked="<%# model.isCompressible %>" TabIndex="101" OnCheckedChanged="IsCompressible_Changed" />
.
.
.

However, when it renders, there is an extra RadAjaxPanel that is being created, as seen below.  This panel does not get generated in any of the other pages with a similar process.  Due to the extra panel, I receive a JS error of "Uncaught TypeError: Cannot read property 'id' of null" in "Telerik.Web.UI.WebResource.axd:3776".  It also displays "867|updatePanel|ctl00_ctl00_mainHolder_FluidTypeListPanel|" on the page.

<div id="mainHolder_updatePanel"> <!-- this is the main UpdatePanel -->
    <span class="stepTitle">Set Fluid Properties</span>
    <div class="calculateInnerDiv">
        <div class="RadAjaxPanel" id="ctl00_ctl00_mainHolder_FluidTypeListPanel"> <!-- this should not exist and throws errors like I have nested update panels -->
        <table id="mainHolder_FluidTypeList">
            <tr>...</tr>
        </table>
    </div>
    <input id="mainHolder_IsCompressibleCheckBox" type="checkbox" name="ctl00$mainHolder$IsCompressibleCheckBox" onclick="javascript:setTimeout('__doPostBack(\'ctl00$mainHolder$IsCompressibleCheckBox\',\'\')', 0)" tabindex="101" />
.

For my codebehind, I run a case statement that hides/displays certain fields based on the selection, and then it calls updatePanel.Update().  Any suggestions are absolutely welcome as I'm at my wit's end on this.

 

Thank you for your time.

Viktor Tachev
Telerik team
 answered on 01 Mar 2016
Narrow your results
Selected tags
Tags
+? more
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?