Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
210 views

I am relatively new to RadGrid and have run into a situation when editing a record in the grid. I am able to get text values in with no issue but when trying to create a dropdown list and set it's selected value to the value from the row selected I get the following error:

 

" 'ddlEmpType' has a SelectedValue which is invalid because it does not exist in the list of items. "

I'm not sure where my code is wrong. Here is a snippet:

 

<EditFormSettings EditFormType="Template">
                                    <FormTemplate>
                                        <table id="Table2" cellspacing="2" cellpadding="1" width="100%" border="0" rules="none"
                                            style="border-collapse: collapse;">
                                            <tr class="EditFormHeader">
                                                <td colspan="2">
                                                    <b>Employee Details</b>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td>
                                                    <table id="Table3" width="450px" border="0" class="module">
                                                        <tr>
                                                            <td>Employee ID:</td>
                                                            <td>
                                                                <asp:TextBox ID="tbEmployeeID" runat="server" Text='<%# Bind("IDNUM") %>'></asp:TextBox>
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td>Last Name:</td>
                                                            <td>
                                                                <asp:TextBox ID="tbLastName" runat="server" Text='<%# Bind("LASTNAME") %>'></asp:TextBox>
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td>First Name:</td>
                                                            <td>
                                                                <asp:TextBox ID="tbFirstName" runat="server" Text='<%# Bind("FIRSTNAME") %>'></asp:TextBox>
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td>Employee Type:</td>
                                                            <td>
                                                                <asp:DropDownList ID="ddlEmpType" runat="server" SelectedValue='<%# Bind("EMP_TYPE") %>'
                                                                    DataSourceID="SQL_EmpType" AppendDataBoundItems="True">
                                                                    <asp:ListItem Selected="True" Text="Select" Value=""></asp:ListItem>
                                                                </asp:DropDownList>
                                                            </td>
                                                        </tr>                                                        
                                                    </table>
                                                </td>                                
                                            </tr>
                                            <tr>
                                                <td colspan="2"></td>
                                            </tr>
                                            <tr>
                                                <td></td>
                                                <td></td>
                                            </tr>
                                            <tr>
                                                <td align="right" colspan="2">
                                                    <asp:Button ID="btnUpdate" Text="Update" runat="server" CommandName="Update"></asp:Button>&nbsp;
                                                    <asp:Button ID="btnCancel" Text="Cancel" runat="server" CausesValidation="False" CommandName="Cancel"></asp:Button>
                                                </td>
                                            </tr>
                                        </table>
                                    </FormTemplate>
                                </EditFormSettings>

 

The datasource is set up as follows:

<asp:SqlDataSource ID="SQL_EmpType" runat="server" ConnectionString="<%$ ConnectionStrings:TECU_WS %>" 
     SelectCommand="SELECT DISTINCT EMP_TYPE FROM vwGetEmployees v WHERE ACTIVESTATUS is not NULL">  
</asp:SqlDataSource>

Hopefully this is enough information to go on.

Doncho
Telerik team
 answered on 13 Jan 2021
1 answer
167 views

I am fairly new to telerik and web forms but I have a page with a RadGrid and separate button for the export. When I click on the export button I get an ArgumentOutOfRangeException. I set export settings on the RadGrid as follows 

<ExportSettings
      IgnorePaging="true"
      ExportOnlyData="true"
      Excel-Format="Xlsx"
      OpenInNewWindow="true">
ExportSettings>

For the export button:

protected void rbtnExport_Click(object sender, EventArgs e)

{
            rgBidActivity.ExportSettings.FileName = "BidActivity";
            rgBidActivity.MasterTableView.ExportToExcel();
}

 

So I am not sure what exactly is causing the error in the attached image. Any suggetions?

 

Attila Antal
Telerik team
 answered on 13 Jan 2021
7 answers
224 views
I have a dropdownlist and when the user selects a certain item i would like to open up the radwindow.
I have the following

protected

 

 

void ddlSentencing_SelectedIndexChanged(object sender, EventArgs e)

 

{

 

 

 

    if (selectedVal == 2 || selectedVal == 3)

 

    {

        ddlSentencing.Attributes.Add(

 

"onclick", "openRadWinNew(); return false;");

 

    }

}

 

 

function openRadWinNew() {

 

 

 

var url = "Dialog.aspx";

 

 

 

var oWnd = radopen(url, "ResponsePopup").setSize(500, 300)

 

}

it works but always only on second click, one step behind. Can ypu please help me fix this?

Thanks

Attila Antal
Telerik team
 answered on 13 Jan 2021
1 answer
110 views

I have a radgrid that has X number of rows. On grid export item command, would it be possible to use a different datasource with Y number of rows(which is > x rows in the grid) that can be saved when exporting?

 

Thanks

Anitha

Attila Antal
Telerik team
 answered on 13 Jan 2021
3 answers
1.4K+ views

Hello,

I wonder if you have bootstrap themes to use in my projects?

 

 

Vessy
Telerik team
 answered on 13 Jan 2021
3 answers
2.4K+ views

I had a working app service that I published to azure.  I have been publishing it for years.  Recently it stopped working. 

When I hit F12 I see the following errors:

Telerik.Web.UI.WebResource.axd:1 Failed to load resource: the server responded with a status of 500 (Internal Server Error)

Uncaught ReferenceError: Sys is not defined   at login.aspx:232

After researching it I believe it has to do with Telerik.Web.UI.WebResource.axd

It's a large web form application so I created a new (telerik based) smaller app and tried to publish to azure but received the same error. 

I have listed my web config, any thought on what could be the issue?  Your help is greatly appreciated. 

<?xml version="1.0"?>
<configuration>
  <appSettings>
    <add key="Telerik.Skin" value="Bootstrap"/>
    <add key="Telerik.ScriptManager.TelerikCdn" value="Disabled"/>
    <add key="Telerik.StyleSheetManager.TelerikCdn" value="Disabled"/>
    <add key="Telerik.Web.UI.RenderMode" value="lightweight"/>
  </appSettings>
  <system.web>
    <compilation debug="true" targetFramework="4.5.2"/>
    <httpRuntime targetFramework="4.5.2"/>
    <pages>
      <controls>
        <add tagPrefix="telerik" namespace="Telerik.Web.UI" assembly="Telerik.Web.UI"/>
      </controls>
    </pages>
    <httpHandlers>
      <add path="ChartImage.axd" type="Telerik.Web.UI.ChartHttpHandler" verb="*" validate="false"/>
      <add path="Telerik.Web.UI.SpellCheckHandler.axd" type="Telerik.Web.UI.SpellCheckHandler" verb="*" validate="false"/>
      <add path="Telerik.Web.UI.DialogHandler.aspx" type="Telerik.Web.UI.DialogHandler" verb="*" validate="false"/>
      <add path="Telerik.RadUploadProgressHandler.ashx" type="Telerik.Web.UI.RadUploadProgressHandler" verb="*" validate="false"/>
      <add path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource" verb="*" validate="false"/>
    </httpHandlers>
  </system.web>
  <system.webServer>
    <validation validateIntegratedModeConfiguration="false"/>
    <handlers>
      <remove name="ChartImage_axd"/>
      <add name="ChartImage_axd" path="ChartImage.axd" type="Telerik.Web.UI.ChartHttpHandler" verb="*" preCondition="integratedMode"/>
      <remove name="Telerik_Web_UI_SpellCheckHandler_axd"/>
      <add name="Telerik_Web_UI_SpellCheckHandler_axd" path="Telerik.Web.UI.SpellCheckHandler.axd" type="Telerik.Web.UI.SpellCheckHandler" verb="*" preCondition="integratedMode"/>
      <remove name="Telerik_Web_UI_DialogHandler_aspx"/>
      <add name="Telerik_Web_UI_DialogHandler_aspx" path="Telerik.Web.UI.DialogHandler.aspx" type="Telerik.Web.UI.DialogHandler" verb="*" preCondition="integratedMode"/>
      <remove name="Telerik_RadUploadProgressHandler_ashx"/>
      <add name="Telerik_RadUploadProgressHandler_ashx" path="Telerik.RadUploadProgressHandler.ashx" type="Telerik.Web.UI.RadUploadProgressHandler" verb="*" preCondition="integratedMode"/>
      <remove name="Telerik_Web_UI_WebResource_axd"/>
      <add name="Telerik_Web_UI_WebResource_axd" path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource" verb="*" preCondition="integratedMode"/>
    </handlers>
  </system.webServer>
</configuration>

Attila Antal
Telerik team
 answered on 13 Jan 2021
7 answers
366 views

After moving our site to newer version of IIS (10.x), PDF viewer stopped working.

Is there something that it might be missing from web.config etc?

Other components are working file (upload, excel, etc). Also, PDF viewer is working on other sites on the same server.

- Mikko

 

Rumen
Telerik team
 answered on 13 Jan 2021
1 answer
113 views
I have an upload that our users drag and drop from outlook into. It looks like doing this in chrome causes the email to be deleted. It appears its an issue with Chrome setting the dragover event to none instead of copy. I can override this on the dropzone but if a user drops directly on the control it still deletes. Is there a way to prevent this behavior? Its possible this is really easy but any help would be appreciated.
Peter Milchev
Telerik team
 answered on 12 Jan 2021
5 answers
175 views
Hi,

I am using RadListBox in one of my project.I just want to set my own css classes to the buttons(To left,To right,All right,All Left)buttons
i didn't find any properties to set these css classes and i dnt want to use default skins/classes provided by telerik
Can you please suggest some thing on this

Regards
Kumar

Doncho
Telerik team
 answered on 12 Jan 2021
1 answer
132 views

While using the filter fix suggested in the documentation here , it causes an issue when tabbing into and then immediately out of a combobox.  

If you tab into a combobox with the fix in place and then tab out without entering any other text, the tab out causes the suggested fix to fire sender.showDropDown().  At this point you've already moved to the next field, so I think what is happening is the dropdown gets shown then hid and in that process it then selects the first item in the list as the SelectedItem, but it doesn't change the actually item displayed in the combobox.  So this results in a different item being reported as selected compared to what the user sees.

Changing the suggested fix to not fire for the tab key fixes the problem.  Suggested fix should be:

<telerik:RadComboBox RenderMode="Lightweight"
     ID="rco_1"
     Filter="Contains"
     AllowCustomText="false"
     OnClientKeyPressing="HandleComboBoxKeyPress"
     runat="server"   >                               
</telerik:RadComboBox>

 

<script type="text/javascript">
  function HandleComboBoxKeyPress(sender, e) {
    if (!sender.get_dropDownVisible()) {
      if (e.get_domEvent().keyCode != 9) {
        // not tab out, show the dropdown to filter
        sender.showDropDown();
      }                       
    }
  }
</script>
Vessy
Telerik team
 answered on 12 Jan 2021
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?