Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
98 views
It seems the OnClientBlur event is not firing with the latest version - unless you tab off the control.  If you blur by clicking your mouse outside of the combobox the event is not fired...  
Ivan Danchev
Telerik team
 answered on 17 May 2016
3 answers
299 views

I am using a radGrid which is inside an RadAjaxPanel.  I want to capture the DataKey value of Selected Row on a button Click Outside the Grid.   Though the button is also contained in the same RadAjaxPanel.   But Everytime I click the button, It returns 0 value for selected row.  I have tried using following code. 

 

 Protected Sub btnUpload_Click(sender As Object, e As EventArgs)
        Dim PersonEducationID As Long = -1      

        For Each item As GridDataItem In radEducationDetail.MasterTableView.Items
            If item.Selected Then
                Dim strKey As String = item.GetDataKeyValue("ID").ToString()
                PersonEducationID = strKey
            End If
        Next
    End Sub

 

Following is the design code for my grid

<telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server">

                

                <telerik:RadGrid ID="radEducationDetail" AllowAutomaticUpdates="false" AllowAutomaticDeletes="true" AllowAutomaticInserts="false" OnItemDataBound="radEducationDetail_ItemDataBound" DataSourceID="sqlEducation"
                    AllowSorting="True" AllowPaging="True" runat="server" PageSize="50" Skin="WebBlue" MasterTableView-DataKeyNames="ID" AutoGenerateColumns="false" ShowGroupPanel="false"
                    EnableHierarchyExpandAll="false" EnableLinqExpressions="false" GridLines="None">
                    <PagerStyle Mode="NextPrevAndNumeric"></PagerStyle>
                    <MasterTableView Width="100%" CommandItemDisplay="Top" Font-Bold="true" DataSourceID="sqlEducation" DataKeyNames="ID" AutoGenerateColumns="false" ShowGroupFooter="true">
                        <CommandItemSettings
                            AddNewRecordText="Add Education Detail"
                            RefreshImageUrl="../../Images/Refresh.png" />
                        <Columns>

                            <telerik:GridBoundColumn DataField="ID" HeaderText="ID" UniqueName="ID" SortExpression="ID" HeaderStyle-Font-Bold="true" ItemStyle-Font-Bold="false" Visible="false" />

                            <telerik:GridBoundColumn DataField="ProviderName" HeaderText="Provider Name" UniqueName="ProviderName" SortExpression="ProviderName" HeaderStyle-Font-Bold="true" ItemStyle-Font-Bold="false" />

                            <telerik:GridBoundColumn DataField="ProgramName" HeaderText="Program Name" UniqueName="ProgramName" SortExpression="ProgramName" HeaderStyle-Font-Bold="true" ItemStyle-Font-Bold="false" />

                            <telerik:GridBoundColumn DataField="EducationLevel" HeaderText="Education Level" UniqueName="EducationLevel" SortExpression="EducationLevel" HeaderStyle-Font-Bold="true" ItemStyle-Font-Bold="false" />

                            <telerik:GridBoundColumn DataField="StartDate" HeaderText="Start Date" SortExpression="StartDate" UniqueName="StartDate" DataType="System.DateTime" DataFormatString="{0:M/d/yyyy}" HeaderStyle-Font-Bold="true" ItemStyle-Font-Bold="false" />

                            <telerik:GridBoundColumn DataField="EndDate" HeaderText="EndDate" SortExpression="EndDate" UniqueName="EndDate" DataType="System.DateTime" DataFormatString="{0:M/d/yyyy}" HeaderStyle-Font-Bold="true" ItemStyle-Font-Bold="false" />

                            <telerik:GridEditCommandColumn ButtonType="LinkButton" UniqueName="EditCommandColumn" />

                            <telerik:GridButtonColumn Text="Delete" CommandName="Delete" ButtonType="LinkButton" UniqueName="DeleteCommandColumn" ConfirmText="Delete Row?" ConfirmTitle="Delete?" />

                        </Columns>

                        

                    </MasterTableView>
                    <ClientSettings AllowDragToGroup="true" AllowColumnsReorder="True">
                        <Selecting AllowRowSelect="True"></Selecting>
                    </ClientSettings>
                    <GroupingSettings ShowUnGroupButton="true" />
                </telerik:RadGrid>

                <div>
                    <br />
                    <table>
                        <tr>
                            <td>Upload Document:</td>
                            <td>
                                <asp:FileUpload ID="FileUploadJquery" runat="server" multiple="multiple" class="multi" ClientIdMode="Static" title="Browse" TabIndex="25" onchange="UploadEducationFiles();" /></td>
                            <td>
                                <asp:Button ID="btnUpload" runat="server" OnClick="btnUpload_Click" Text="Upload" /></td>
                        </tr>
                        <tr>
                            <td colspan="3">
                                <p id="demo"></p>
                            </td>
                        </tr>
                    </table>
                </div>

            </telerik:RadAjaxPanel>

I also tried to enable Autopostback on row selection but that did not help. 

Can you please suggest me why is this happening. I am struggling from hours now. 

Viktor Tachev
Telerik team
 answered on 17 May 2016
12 answers
656 views
Hi,

Please help in the following issue .
The asp.net validator controls (like required field validator, compare validator etc) are firing after the postback (when the submit or rad grid insert button is pressed). This is happening in the case when the RadAjaxPanel is used.



Thanks & Regards,
AbdulRahman
TCS
Maria Ilieva
Telerik team
 answered on 17 May 2016
2 answers
202 views

Hi,

I have problem with export to csv footer total.In scv file not display footer total.
When I export the same data into pdf, i have no problem.


Thanks,
Igor

suyash
Top achievements
Rank 1
 answered on 17 May 2016
3 answers
259 views
I'm using a RadGrid in a multi-language/multi-cultural web application.  This grid contains columns with fractional Width values and am seeing the rendered HTML is invalid when the page's culture is set to one that uses commas for decimal places.  To recreate the issue, I created a very simple web app with a RadGrid and added a GridDateTimeColumn defined like this:

<telerik:RadGrid runat="server" ID="RadGrid1">
  <MasterTableView>
    <Columns>
      <telerik:GridDateTimeColumn HeaderStyle-Width="10.5em" UniqueName="Col1" DataField="Col1" />
      <telerik:GridDateTimeColumn HeaderStyle-Width="15.8em" UniqueName="Col2" DataField="Col2" />
    </Columns>
  </MasterTableView>
</telerik:RadGrid>

When setting the Page's Culture property to one that uses a comma as the decimal place (for example "fr-FR") the rendered grid also has the format applied to the property value, which is certainly undesirable.  In Internet Explorer, these invalid strings are ignored and replaced with an empty property value, however Chrome renders these grids as follows:

<table class="rgMasterTable" id="RadGrid1_ctl00" style="width:100%;table-layout:auto;empty-cells:show;">
  <colgroup>
    <col style="width:10,5em" />
    <col style="width:15,8em" />
  </colgroup>
<thead>

While the browsers appear to output some default column widths (thus ignoring the invalid values), where things really go wrong is when trying to persist the grid's settings using a RadPersistenceManager.  When trying to reload the grid's columns widths, an error is encountered due to trying to load the invalid number formats, or in other cases the grid is rendered with the columns completely missing from the display.

I'm not sure if it's against best practice to use fractional values for Width properties, but we have done this in a number of places in our application and it does not appear to be a problem with generic ASP.NET controls such as GridViews where they aren't trying to apply a format to a property value.

I would appreciate some guidance... are we violating a best practice, missing something obvious, or is this a bug in the RadGrid, column control, or (less likely) the RadPersistenceManager?


I'm running the 2016-Q2 release of the controls and am developing in a .NET 4.5 application.

Konstantin Dikov
Telerik team
 answered on 17 May 2016
5 answers
770 views
Hi,
          I need to populate text , value pair in RadComboBox. Please help me out to get ride of filling datasource in radcombobox which is placed within radgirid Edit Item Template. Without using DataSourceID="SqlDataSource1" . And binding radcombobox using codebehind on RadGrid Item databound.

        While i click on "ADD NEW RECORD " the RadComboBox within the EditItemTemplate sholud get populated.

<

telerik:GridTemplateColumn HeaderText="Document Type" HeaderButtonType="TextButton">

 

 

<ItemTemplate>

 

 

<asp:Label runat="server" ID="lblDocType" Text='<%# Eval("DocumentType") %>' />

 

 

</ItemTemplate>

 

 

<EditItemTemplate>

 

 

<telerik:RadComboBox ID="RCBAccDocType" runat="server" Width="130px" Skin="Office2007">

 

 

</telerik:RadComboBox>

 

 

</EditItemTemplate>

 

 

<ItemStyle Width="12%" HorizontalAlign="Left" />

 

 

<HeaderStyle Width="12%" HorizontalAlign="Center" />

 

 

</telerik:GridTemplateColumn>

Thanks!,
Happy coding ;-)

 

Kostadin
Telerik team
 answered on 17 May 2016
1 answer
227 views

I am trying to create a pop up window without any shadowing.  

I tried using EnableShadow="false" but the shadow still appears.  What do I need to do?

Thank you

James

 

    <Telerik:RadWindowManager ID="uiWindowMgr" runat="server" EnableShadow="false" VisibleTitlebar="false" >          <Windows>         <telerik:RadWindow ID="uiCalendarPop" runat="server" VisibleTitlebar="false" EnableShadow="false"  Behaviors="Close,Move" >                          <ContentTemplate>                             <div style="width: 250px; height: 25px; background-color:#3F3F3F;padding:5px;font-family:verdana;font-size:12px;color:white;">                                 <iframe src=""></iframe>                                 Select Date                             </div>                                 <iframe src=""></iframe>                                 <div style="height: 30px">                                     <asp:RadioButtonList ID="uiCustomDate" runat="server" CssClass="CustomDates" RepeatDirection="Horizontal">                                         <asp:ListItem Text="Unknown" Value="Unknown"></asp:ListItem>                                         <asp:ListItem Text="N/A" Value="N/A"></asp:ListItem>                                         <asp:ListItem Text="Ongoing" Value="Ongoing"></asp:ListItem>                                     </asp:RadioButtonList>                                 </div>                 <Telerik:RadCalendar ID="uiCal" runat="server" FastNavigationPrevImage="~/Images/cal_prevMonth.gif" EnableShadows="false"                                      FastNavigationNextImage="~/Images/cal_nextMonth.gif" EnableMultiSelect="false" >                                          <ClientEvents  OnLoad="CalendarLoad" OnDateSelected="DateSelected"  />                                          <FooterTemplate>                         <div id="footerDiv" style=""padding:5px;font-family:verdana;font-size:12px;color:black;background-color:#EEEEEE;">                                         <div class="footer" style="text-align: center"><%--                                            <span style="float: right;">  --%>                                                 <input type="button" value="Close" onclick="ClosePopup()" class="button" />                                                <%--                                            </span>--%>                                         </div>                             </div>                     </FooterTemplate>                 </Telerik:RadCalendar>                                 <input type="hidden" id="uiControlToSetDate" />             </ContentTemplate>                      </telerik:RadWindow>         </Windows>                 </Telerik:RadWindowManager>

Marin Bratanov
Telerik team
 answered on 17 May 2016
11 answers
353 views
Is it possible to drag and drop a tree onto an IFRAME? I have tried, but as soon as you drag over the IFRAME the dragged item disapears.

If it is not possible with Telerik is there some sample code that would allow me to do this from a tree control
Shilpa
Top achievements
Rank 1
 answered on 17 May 2016
3 answers
187 views

We are having a problem with setting the text of a SearchBox when not using PostBack.

Following the sample xml and javascript below, the user type something into 'CmbBx_Search1', and when he/she press enter, we want to set the value in 'RdSrchBx_RdWndw_A' by default, then set the focus on 'RdSrchBx_RdWndw_B'.

The problem is that after setting the text of 'RdSrchBx_RdWndw_A' it appears grayed out like it has not been set yet. (like a default value)
And if I click on it, the value I set is removed.
You can check the attached screenshot.

What I would like is that once I set the text of nameSearchBox, it appears as normal text. As if the user had typed it directly in the box.
So no grayed out, no reset on focus.

It looks like this is working when using the PostBack event, but I cannot do that, I have to set the value from javascript as a result of the user selection in 'CmbBx_Search1'

 

<telerik:RadSearchBox
    ID="CmbBx_Search1"
    runat="server"
    Width="550px"
    EmptyMessage="Add or Search..."
    OnClientSearch="PerformSearch"
    ShowSearchButton="true">
    <DropDownSettings Height="400" Width="550" />
    <WebServiceSettings Path="Main.aspx" Method="GetResults" />
</telerik:RadSearchBox>
  
<telerik:RadSearchBox
    ID="RdSrchBx_RdWndw_A"
    runat="server"
    OnClientSearch="AddSimpleName"
    OnClientDataRequesting="AddSimpleName"
    ShowSearchButton="true">
    <DropDownSettings Height="400" Width="550" />
    <WebServiceSettings Path="Main.aspx" Method="GetResults" />
</telerik:RadSearchBox>
  
<telerik:RadSearchBox
    ID="RdSrchBx_RdWndw_B"
    runat="server"
    OnClientSearch="AddSimpleType"
    OnClientDataRequesting="AddSimpleType"
    ShowSearchButton="true">
    <DropDownSettings Height="400" Width="550" />
    <WebServiceSettings Path="Main.aspx" Method="GetTypeResults" />
</telerik:RadSearchBox>

function PerformSearch(sender, args) {
    PageMethods.PrepareForSearchResult(args.get_text(), false, ProcessInterfaceResult);
}
  
function ProcessInterfaceResult(pResult) {
    var result = JSON.parse(pResult);
    ClearSearchBox($find("<%= RdSrchBx_RdWndw_A.ClientID %>"), false);
    ClearSearchBox($find("<%= RdSrchBx_RdWndw_B.ClientID %>"), false);
  
    var nameSearchBox = $find("<%= RdSrchBx_RdWndw_A.ClientID %>");
    var nameSearchBoxInput = nameSearchBox.get_inputElement();
    if (isEmpty(result.name) == true) {
        nameSearchBoxInput.focus();
    }
    else {
        nameSearchBoxInput.value = result.name;
  
        var typeSearchBox = $find("<%= RdSrchBx_RdWndw_B.ClientID %>");
        typeSearchBox = typeSearchBox.get_inputElement();
        typeSearchBox.focus();
    }
}
  
function ClearSearchBox(pSearchBox, pIsMobile) {
    pSearchBox.clear();
    var emptyMessage = pSearchBox.get_emptyMessage();
    pSearchBox = pSearchBox.get_inputElement();
    if (pIsMobile == true) {
        pSearchBox.innerHTML = emptyMessage;
    }
    else {
        pSearchBox.innerText = emptyMessage;
    }
    pSearchBox.className = "rsbInput radPreventDecorate rsbEmptyMessage";
}

 

Mickael
Top achievements
Rank 1
 answered on 17 May 2016
4 answers
160 views

I am trying to show the Loading Panel (implicit or explicit) when I click the export button of the RadPivotGrid, can someone help me with that, please?

I've tried two different ways yet, the first one was setting my PivotGrid in the RadAjaxManager, no success, it is not exporting, no errors, no message, no file!

The second one was showing LoadingPanel explicit. now it is exporting, but I(my application) do not know when the exporting process ended. My hope was to implement some token/cookie technique, no success, the client-side do not receive the cookie update after the export method(server-side).

 

Any help would be welcome!

Thanks.

Rafael
Top achievements
Rank 1
 answered on 16 May 2016
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?