Telerik Forums
UI for ASP.NET AJAX Forum
7 answers
182 views
Hi 

I'm using v2012.3.1308.35 and am running into an issue where I am getting an empty Value for the selected entry in the autocomplete box.

Here's my markup:
Note that InputType="Text" and I have registered an OnTextChanged handler.

<telerik:RadAutoCompleteBox
  ID="OperatorAutoCompleteBox"
  runat="server"
  DataSourceID="sqlOperatorsLookupList"
  DataTextField="Full_Name"
  DataValueField="Operator_ID"
  Filter="Contains"
  InputType="Text"
  OnTextChanged="OperatorAutoCompleteBox_SelectedOperatorChanged">
 
  <TextSettings SelectionMode="Single" />
 
</telerik:RadAutoCompleteBox>

Now in the codebehind if I do the following, then the selectedText gets the actual selected text but the selectedValue is an empty string.

If OperatorAutCompleteBox.Entries.Count > 0 Then
  selectedText = OperatorAutoCompleteBox.Entries(0).Text
  selectedValue = OperatorAutoCompleteBox.Entries(0).Value
End If

Strangely the Entries(0).Value starts to function normally (i.e return the selected value) if I remove the OnTextChanged="....." line from the markup. So to me it seems like registering the OnTextChanged somehow causes the RadAutoCompleteBox to lose its Value property.

Is this a known bug?
Could this be something from the remains of when InputType="Text" did not support the Value property?

(see: http://www.telerik.com/community/forums/aspnet-ajax/autocompletebox/entry-value-is-empty.aspx#2219318 )

FYI - Switching to InputType=Token, or removing the OnTextChanged is not an option for me as I need to limit a single selection and also use the OnTextChanged to populate other controls on what the user has selected.

Thanks 

Nencho
Telerik team
 answered on 01 May 2014
10 answers
1.4K+ views
Suppose a file is uploaded, placed in the temporary folder, the page posts back, but then an error or something occurs before calling 

UploadedFile.SaveAs().

 
In that case, the temporary file is not deleted, and over similar repeated events, those files will accumulate on disk.  Is there any way to manually cause the temporary file to be deleted?

Thanks.
miksh
Top achievements
Rank 1
Iron
 answered on 01 May 2014
6 answers
430 views
Hey there!

I actually have searched the whole forum and found no specific solution to my problem - even though I am sure, somebody else has the same needs I do.

I have a header, a footer and a content Div in the middle with a Splitter control. Setting width and height to 100% with height offset (just like in your example) works fine, but then depending on the height of the content each pane has its own scrollbar.

My goal is to have one scrollbar for the whole page, so the splitter should resize its height according to the content of the "longest" pane. I just found a solution here with javascript getting the inner height of the panes, but this does not work on runtime (for example with an accordeon control inside the pane!). Is there any other chance to basically make the splitter to not define the height of the splitter-table at all? That would be the easiest solution for me by far, because then every browser would resize the splitter-table perfectly according to the content.

Thanks a lot in advance, sincerely,

Felix (from Germany, excuse my english)
Murali
Top achievements
Rank 1
 answered on 01 May 2014
3 answers
578 views
I am facing an issue with Radgrid while exporting to excel. The <BR> tag not creating a new line in the excel instead it take it as a BR text. Please help
Support
Top achievements
Rank 1
 answered on 01 May 2014
1 answer
160 views
Hi, 

Since adding a RadAjaxManager to the page my RadGrid isn't being populated on page load.  there are 2 dropdowns that when changed will trigger the grid being updated, I just can't get it loading correctly.

Works 100% fine with the manager removed.

Note; there is no backend code.  there is nothing on the Masterpage other than a single RadScriptManager.
Thanks in advance for any help you can provide.

<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="rcbPeriods">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadHtmlChart1" LoadingPanelID="RadAjaxLoadingPanel1" />
                    <telerik:AjaxUpdatedControl ControlID="rgOustanding" LoadingPanelID="RadAjaxLoadingPanel1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="rcbRegion">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadHtmlChart1" LoadingPanelID="RadAjaxLoadingPanel1" />
                    <telerik:AjaxUpdatedControl ControlID="rgOustanding" LoadingPanelID="RadAjaxLoadingPanel1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="rgOustanding" />
        </AjaxSettings>
 
    </telerik:RadAjaxManager>
     
    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Skin="Default">
    </telerik:RadAjaxLoadingPanel>
<div style="width:900px;margin-left:auto; margin-right:auto;">
    <table>
        <tr>
            <td style="vertical-align:top;">
                <div style="float: right; width: 570px; border: solid 0px blue;">
                    <div class="panels">
                        <div class="headersDiv">
                            <h3 class="headersh3">
                                Dashboard
                            </h3>
                        </div>
                        <div style="margin:10px;" >
                            <p>
                                <strong>Select Period: </strong>
                                <telerik:RadComboBox ID="rcbPeriods" runat="server" AutoPostBack="true"  AppendDataBoundItems="true"
                                    DataSourceID="sdsPeriods" DataTextField="PeriodLongName" DataValueField="PeriodCode">
                                </telerik:RadComboBox>
 
                                <strong>Select Region: </strong>
                                <telerik:RadComboBox ID="rcbRegion" runat="server" AutoPostBack="true"  AppendDataBoundItems="true"
                                    DataSourceID="sdsRegion" DataTextField="Region" DataValueField="Region">
                                </telerik:RadComboBox>
                            </p>
                            <asp:SqlDataSource ID="sdsPeriods" runat="server" ConnectionString="<%$ ConnectionStrings:csOHS %>"
                                SelectCommand="uspSelectFilteredPeriods" SelectCommandType="StoredProcedure">
                            </asp:SqlDataSource>
                            <asp:SqlDataSource ID="sdsRegion" runat="server" ConnectionString="<%$ ConnectionStrings:csOHS %>"
                                SelectCommand="uspSelectRegion" SelectCommandType="StoredProcedure">
                            </asp:SqlDataSource>
                            <br />
                            <telerik:RadHtmlChart ID="RadHtmlChart1" runat="server" DataSourceID="sdsChart" Width="550px" Height="500px">
                                <ChartTitle Text="12 Month Rolling Totals">
                                    <Appearance>
                                        <TextStyle FontSize="16px"></TextStyle>
                                    </Appearance>
                                </ChartTitle>
                                <PlotArea>
                                    <Series>
                                        <telerik:ColumnSeries DataFieldY="LTINo" Name="LTI">
                                            <LabelsAppearance Visible="false"></LabelsAppearance>
                                        </telerik:ColumnSeries>
                                        <telerik:ColumnSeries DataFieldY="DARTRWI" Name="DARTRWI">
                                            <LabelsAppearance Visible="false"></LabelsAppearance>
                                        </telerik:ColumnSeries>
                                        <telerik:ColumnSeries DataFieldY="MTINo" Name="MTINo">
                                            <LabelsAppearance Visible="false"></LabelsAppearance>
                                        </telerik:ColumnSeries>
                                        <telerik:ColumnSeries DataFieldY="FAINo" Name="FAINo">
                                            <LabelsAppearance Visible="false"></LabelsAppearance>
                                        </telerik:ColumnSeries>
                                        <telerik:ColumnSeries DataFieldY="SI" Name="SI">
                                            <LabelsAppearance Visible="false"></LabelsAppearance>
                                        </telerik:ColumnSeries>
                                    </Series>
                                    <XAxis DataLabelsField="SiteName">
                                        <LabelsAppearance RotationAngle="75"></LabelsAppearance>
                                    </XAxis>
                                </PlotArea>
                            </telerik:RadHtmlChart>
                            <asp:SqlDataSource ID="sdsChart" runat="server" ConnectionString="<%$ ConnectionStrings:csOHS %>"
                                SelectCommand="uspChartStats" SelectCommandType="StoredProcedure">
                                <SelectParameters>
                                    <asp:ControlParameter ControlID="rcbPeriods" Name="PeriodCode" Type="String" PropertyName="SelectedValue" />
                                    <asp:ControlParameter ControlID="rcbRegion" Name="Region" Type="String" PropertyName="SelectedValue" />
                                </SelectParameters>
                            </asp:SqlDataSource>
                        </div>
                    </div>
                </div>
            </td>
            <td style="vertical-align:top;">
                <div class="panels" style="width:150px">
                    <div class="headersDiv">
                        <h3 class="headersh3">Outstanding Sites</h3>
                    </div>
                    <div style="margin:5px;" >
                        <telerik:RadGrid ID="rgOustanding" runat="server" DataSourceID="sdsOutstanding"  EnableAJAX="false">
                        </telerik:RadGrid>
                        <asp:SqlDataSource ID="sdsOutstanding" runat="server" ConnectionString="<%$ ConnectionStrings:csOHS %>"
                            SelectCommand="uspScorecardOutstanding" SelectCommandType="StoredProcedure">
                            <SelectParameters>
                                <asp:ControlParameter ControlID="rcbPeriods" Name="PeriodCode" Type="String" PropertyName="SelectedValue" />
                                <asp:ControlParameter ControlID="rcbRegion" Name="Region" Type="String" PropertyName="SelectedValue" />
                            </SelectParameters>
                        </asp:SqlDataSource>
                    </div>
                </div>
            </td>
        </tr>
    </table>
</div>


Eyup
Telerik team
 answered on 01 May 2014
2 answers
258 views
In a nutshell, I need to add an additional row to the grid's header so that I can visibly group columns together.  After reading the following thread, Adding Multiple Header Rows at Runtime in RadGrid , I was successfully able to make this happen, but ran into a sizing issue.  I realize that this situation is not supported but was hoping somebody will be able to help me out. 

Simply put, when setting the colspan property of the new GridTableHeaderCell, the width of the columns shrink and I want them to stay fixed.  Attached is a before & after pic.  The before is by commenting out the dgHeader_PreRender event.  The after has the same event uncommented.  The width of dgHeader needs to equal the width of dgDetail, columns widths especially.

Please run the code with event dgHeader_PreRender commented out first to see what the column widths should always look like.

Here is my code:

ASPX

<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default3.aspx.vb" Inherits="Default3" %>
  
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
        <telerik:RadScriptManager runat="server" ID="mgrJS" >
        </telerik:RadScriptManager>
    <div>
    <table>
        <tr>
            <td align="left" valign="top">
                <telerik:RadGrid runat="server" ID="dgHeader" Skin="Web20" AllowSorting="true" >
                    <ClientSettings>
                        <Scrolling UseStaticHeaders="True" />
                    </ClientSettings>
                     <MasterTableView BorderWidth="1px" GridLines="Both" style="border-collapse: collapse !Important;" Font-Bold="false" TableLayout="Fixed" AutoGenerateColumns="false" ShowHeader="True">
                        <Columns>
                            <telerik:GridBoundColumn DataField="N1" HeaderText="N 1" UniqueName="N1">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="N2" HeaderText="N 2" UniqueName="N2">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="N3" HeaderText="N 3" UniqueName="N3">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="C1" HeaderText="C 1" UniqueName="C1">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="C2" HeaderText="C 2" UniqueName="C2">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="C3" HeaderText="C 3" UniqueName="C3">
                            </telerik:GridBoundColumn>
                        </Columns>
                    </MasterTableView>
                </telerik:RadGrid>
            </td>
        </tr>
        <tr>
            <td align="left" valign="top">
                <telerik:RadGrid runat="server" ID="dgDetail" Skin="Web20" AllowSorting="true">
                    <ClientSettings>
                        <Scrolling UseStaticHeaders="True" />
                    </ClientSettings>
                     <MasterTableView BorderWidth="1px" GridLines="Both" style="border-collapse: collapse !Important;" Font-Bold="false" TableLayout="Fixed" AutoGenerateColumns="false" ShowHeader="False">
                        <Columns>
                            <telerik:GridBoundColumn DataField="N1" HeaderText="N 1" UniqueName="N1">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="N2" HeaderText="N 2" UniqueName="N2">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="N3" HeaderText="N 3" UniqueName="N3">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="C1" HeaderText="C 1" UniqueName="C1">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="C2" HeaderText="C 2" UniqueName="C2">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="C3" HeaderText="C 3" UniqueName="C3">
                            </telerik:GridBoundColumn>
                        </Columns>
                    </MasterTableView>
                </telerik:RadGrid>
            </td>
        </tr>
    </table>
    </div>
    </form>
</body>
</html>

 

VB

 

Partial Class Default3
  
    Inherits System.Web.UI.Page
  
    Private Sub dg_Init(ByRef dg As RadGrid, ByVal isHeader As Boolean)
        With dg
            If isHeader Then
                For Each col As GridBoundColumn In dg.MasterTableView.Columns
                    'Need to set width's to 54 in order to line up with dtDetail's columns below
                    col.HeaderStyle.Width = 54
                    col.ItemStyle.Width = 54
                    col.ItemStyle.HorizontalAlign = HorizontalAlign.Right
                Next
            Else
                For Each col As GridBoundColumn In dg.MasterTableView.Columns
                    col.HeaderStyle.Width = 60
                    col.ItemStyle.Width = 60
                    col.ItemStyle.HorizontalAlign = HorizontalAlign.Right
                Next
            End If
        End With
    End Sub
  
    Protected Sub Page_Init(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Init
        dg_Init(dgHeader, True)
        dg_Init(dgDetail, False)
    End Sub
  
    Protected Sub dgHeader_NeedDataSource(ByVal source As Object, ByVal e As Telerik.Web.UI.GridNeedDataSourceEventArgs) Handles dgHeader.NeedDataSource
        dgHeader.DataSource = GetHeaderDatasource()
    End Sub
  
    Protected Sub dgDetail_NeedDataSource(ByVal source As Object, ByVal e As Telerik.Web.UI.GridNeedDataSourceEventArgs) Handles dgDetail.NeedDataSource
        dgDetail.DataSource = GetDetailDatasource()
    End Sub
  
    Protected Sub dgHeader_PreRender(ByVal sender As Object, ByVal e As System.EventArgs) Handles dgHeader.PreRender
        Dim header As GridHeaderItem = DirectCast(dgHeader.MasterTableView.GetItems(GridItemType.Header)(0), GridHeaderItem)
        Dim head As GridTHead = DirectCast(header.Parent, GridTHead)
  
        'create a new GridHeaderItem which will be the new row  
        Dim newHeaderItem As New GridHeaderItem(dgHeader.MasterTableView, 0, 0)
  
        'add 2 empty table header cells, as there are 2 hidden columns always created in RadGrid
        newHeaderItem.Cells.Add(New GridTableHeaderCell())
        newHeaderItem.Cells.Add(New GridTableHeaderCell())
  
        'Add as many header cells as you need with required colspans
        newHeaderItem.Cells.Add(New GridTableHeaderCell() With {.Text = "Numbers", .ColumnSpan = 3})
        newHeaderItem.Cells.Add(New GridTableHeaderCell() With {.Text = "Characters", .ColumnSpan = 3})
  
        head.Controls.AddAt(0, newHeaderItem)
    End Sub
  
    Private Function GetHeaderDatasource() As DataTable
        If Me.Session("dgHeader_DataSource") Is Nothing Then
            Dim dt As DataTable = CreateDataTable()
            Dim r As DataRow = dt.NewRow
            r.ItemArray = New Object() {"100", "200", "300", "X", "Y", "Z"}
            dt.Rows.Add(r)
            Session("dgHeader_DataSource") = dt
        End If
        Return Session("dgHeader_DataSource")
    End Function
  
    Private Function GetDetailDatasource() As DataTable
        If Me.Session("dgDetail_DataSource") Is Nothing Then
            Dim dt As DataTable = CreateDataTable()
            Dim r As DataRow = dt.NewRow
            r.ItemArray = New Object() {"50", "100", "150", "X", "Y", "Z"}
            dt.Rows.Add(r)
            r = dt.NewRow
            r.ItemArray = New Object() {"50", "100", "150", "X", "Y", "Z"}
            dt.Rows.Add(r)
            Session("dgDetail_DataSource") = dt
        End If
        Return Session("dgDetail_DataSource")
    End Function
  
    Private Function CreateDataTable() As DataTable
        Dim dt As New DataTable
        dt.Columns.Add("N1", GetType(String))
        dt.Columns.Add("N2", GetType(String))
        dt.Columns.Add("N3", GetType(String))
        dt.Columns.Add("C1", GetType(String))
        dt.Columns.Add("C2", GetType(String))
        dt.Columns.Add("C3", GetType(String))
        Return dt
    End Function
  
End Class
venkat
Top achievements
Rank 1
 answered on 01 May 2014
7 answers
441 views
Hi,

Is the functionality of Reordering the columns supported in RadTreeList. That is dragging and dropping of columns.

Also in RadTreeList, how can we implement it so that the client can increase and decrease the width of the columns. I am using TreeListboundColumn currently.

Thanks in advance.
Marin
Telerik team
 answered on 01 May 2014
3 answers
231 views
We have a MultiPage in part of our app, it's essentially an email preview here:
<code> 
<telerik:RadPageView ID="RadPageView1" runat="server" Visible="true">
                        <div id="divHTMLContent" runat="server">
                            </div>
                    </telerik:RadPageView>
                    <telerik:RadPageView ID="RadPageView2" runat="server" Visible="true">
                        <div id="divPlainText" runat="server">
                            </div>
                    </telerik:RadPageView>
</code>

The problem arises that the HTML Content can contain styles, such as
<code>
<style type="text/css">    
 body      {      
      background-color: #efefef;
      color: #777777;
      font-face: Garamond !important;
      }
</style>
</code>

(deliberately chosen to demonstrate the effects)

These global styles are indeed global. In another context, I was able to <ol><li>introduce an iframe <li>HTMLEncode the content and <li>use jQuery to load the iframe at render time</ol> Any suggestions on how to get similar behaviour?



Ivan Zhekov
Telerik team
 answered on 01 May 2014
1 answer
61 views
Hi,

I'm attempting to replace an existing editor with Telerik.  So far its been ok, except that the statistics module is showing underneath buttons that I have below the editor and I'm not sure why. (image attached)

I note that the editor is in a table which is inside another table and the buttons are in a separate row cell inside the main table.

Thanks
Cheryl
Top achievements
Rank 1
Iron
 answered on 01 May 2014
5 answers
122 views
Hi

Does anyone know how to change the column style when a column is filtered, in a similar way to when you sort a column?

I have a number of grids which are loaded with default filters and it would be nice if I can highlight somehow which filters are already applied when a grid loads.

If it is not possible to change the column style then some other form of highlighting, such as the filter textbox style, would work just as well.

Thanks in advance for any help

Cheers
Rob
Pavlina
Telerik team
 answered on 30 Apr 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?