Hello,
I have the following problem, but didn't found a method or propertie to solve this.
I have a combobox that is 'filled' with databinding.
There are about +100 names that goes in the ComboBox, so when i open the list, the list is very long. (even goes out of the screen)
Is there a way to get a scrollbar in the list (like in a standard dropdownlist)?
Thanks
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="testAjaxPanel._Default" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" Height="200px"
Width="300px">
<asp:Button ID="Button1" runat="server" Text="Button" OnClick="Button1_Click" />
<asp:TextBox ID="TextBox1" runat="server" />
</telerik:RadAjaxPanel>
</div>
</form>
</body>
</html>
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
namespace testAjaxPanel
{
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (Page.IsPostBack)
{
TextBox1.Text += "NOOOO";
}
}
protected void Button1_Click(object sender, EventArgs e)
{
TextBox1.Text += "Po";
}
}
}
| var q = from f in dc.Faturas |
| where f.MesReferencia >= Convert.ToDateTime("01/01/2005") |
| && f.MesReferencia <= Convert.ToDateTime("01/05/2005") |
| group f by new |
| { |
| f.Conta.UnidadeGestora_link_Empresa.Empresa.TipoServico.NmTipoServico, |
| f.MesReferencia |
| } into g |
| orderby g.Key.NmTipoServico, g.Key.MesReferencia |
| select new |
| { |
| g.Key.NmTipoServico, |
| g.Key.MesReferencia, |
| Consumo = g.Sum(f => f.Consumo) |
| }; |
| e.Result = q; |
| NmTipoServico | MesReferencia | Consumo |
| Água e Esgoto | 01/2005 | 87080 |
| Água e Esgoto | 02/2005 | 82731 |
| Água e Esgoto | 03/2005 | 94414 |
| Água e Esgoto | 04/2005 | 87396 |
| Água e Esgoto | 05/2005 | 87490 |
| Eletricidade | 01/2005 | 53439474 |
| Eletricidade | 02/2005 | 53415549 |
| Eletricidade | 03/2005 | 54183221 |
| Eletricidade | 04/2005 | 56598759 |
| Eletricidade | 05/2005 | 55553372 |
| Gás | 01/2005 | 23572 |
| Gás | 02/2005 | 22319 |
| Gás | 03/2005 | 19459 |
| Gás | 04/2005 | 26683 |
| Gás | 05/2005 | 32863 |
| Telefonia | 01/2005 | 2123603 |
| Telefonia | 02/2005 | 2111587 |
| Telefonia | 03/2005 | 2015812 |
| Telefonia | 04/2005 | 2071964 |
| Telefonia | 05/2005 | 2079275 |

| <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="Data Source=MACHOINE1;Initial Catalog=myDB;Persist Security Info=True;User ID=user;Password=password" | |
| ProviderName="System.Data.SqlClient" SelectCommand="SELECT * FROM [JobCodes]" ConflictDetection="CompareAllValues" | |
| DeleteCommand="DELETE FROM [JobCodes] WHERE [JobCodeId] = @original_JobCodeId" | |
| InsertCommand="INSERT INTO [JobCodes] ([JobId], [CodeId], [QuantityRequired], [QuantityCompleted], [Comment]) VALUES (@JobId, @CodeId, @QuantityRequired, @QuantityCompleted, @Comment)" OldValuesParameterFormatString="original_{0}" | |
| UpdateCommand="UPDATE [JobCodes] SET [JobId] = @JobId, [CodeId] = @CodeId, [QuantityRequired] = @QuantityRequired, [QuantityCompleted] = @QuantityCompleted, [Comment] = @Comment WHERE [JobCodeId] = @original_JobCodeId AND [JobId] = @original_JobId AND [CodeId] = @original_CodeId AND [QuantityRequired] = @original_QuantityRequired AND [QuantityCompleted] = @original_QuantityCompleted AND [Comment] = @original_Comment"> | |
| <DeleteParameters> | |
| <asp:Parameter Name="original_JobCodeId" Type="Int32" /> | |
| </DeleteParameters> | |
| <UpdateParameters> | |
| <asp:Parameter Name="JobId" Type="Int32" /> | |
| <asp:Parameter Name="CodeId" Type="Int32" /> | |
| <asp:Parameter Name="QuantityRequired" Type="Decimal" /> | |
| <asp:Parameter Name="QuantityCompleted" Type="Decimal" /> | |
| <asp:Parameter Name="Comment" Type="String" /> | |
| <asp:Parameter Name="original_JobCodeId" Type="Int32" /> | |
| <asp:Parameter Name="original_JobId" Type="Int32" /> | |
| <asp:Parameter Name="original_CodeId" Type="Int32" /> | |
| <asp:Parameter Name="original_QuantityRequired" Type="Decimal" /> | |
| <asp:Parameter Name="original_QuantityCompleted" Type="Decimal" /> | |
| <asp:Parameter Name="original_Comment" Type="String" /> | |
| </UpdateParameters> | |
| <InsertParameters> | |
| <asp:Parameter Name="JobId" Type="Int32" /> | |
| <asp:Parameter Name="CodeId" Type="Int32" /> | |
| <asp:Parameter Name="QuantityRequired" Type="Decimal" /> | |
| <asp:Parameter Name="QuantityCompleted" Type="Decimal" /> | |
| <asp:Parameter Name="Comment" Type="String" /> | |
| </InsertParameters> | |
| </asp:SqlDataSource> |
When ever I try to save one of the rows i edit i get an sql exception of:
"The data types text and nvarchar are incompatible in the equal to operator".
The comment field is set to be of type text in the database. I googled and found some suggestions on trying to set the db type to be nvarchar(MAX) but this didnt help.