Hi there! I need your help on the WebDropDown control. I changed the existing control to Infragistics' latest version control for the Drop Down and this is the error I got.
"Compiler Error Message: CS0433: The type 'Infragistics.Web.UI.ListControls.WebDropDown' exists in both 'c:\Windows\assembly\GAC_MSIL\Infragistics35.Web.v9.2\9.2.20092.1003__7dd5c3163f2cd0cb\Infragistics35.Web.v9.2.dll' and 'c:\Windows\Microsoft.NET\assembly\GAC_MSIL\Infragistics4.Web.v14.1\v4.0_14.1.20141.1015__7dd5c3163f2cd0cb\Infragistics4.Web.v14.1.dll'"
What should I do in order to have it working? Thank you.
Hello Andrea,
This error indicates that there are both 9.2 and 14.1 assemblies referenced in the project. I would therefore suggest removing all 9.2 assemblies from the project references, web.config and the individual pages and ensuring that only a single version of the IG assemblies is ultimately referenced. A similar scenario is described at:
http://es.infragistics.com/community/forums/t/33439.aspx
Hope this helps. Please feel free to contact me if you have any questions.
Do I need to remove these too?
<add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/> <add tagPrefix="asp" namespace="System.Web.UI.WebControls" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
If so, what should I change them with?
Please feel free to contact me if you have any further questions regarding this matter.
The WebDropDown worked already. I edited the SourceData. However, is there a way that the items would not appear as a link?
In order to not have anchors rendered for items, the EnableRenderingAnchors property can be set to false.
Hope this helps. Please let me know if you have any additional questions.
Hi Petar,
That solved it! :) Is there a way for a text not included in the DataSource to appear during load time? I tried DropDown.TextField="*"; but when it runs, the items disappear.
The text of an individual item may be changed after the dropdown has been databound by using the item's Text property. Therefore after data binding, for instance by handling an event like DataBound, the item text may be changed using something like:
protected void WebDropDown1_DataBound(object sender, EventArgs e) { WebDropDown1.Items[0].Text = "Some Changed Text"; }
Hope this helps.
It seems that that issue is already being discussed at:
http://es.infragistics.com/community/forums/t/90694.aspx
Please refer to that thread regarding this matter.
This is the code I have:
protected void setCombo() { string strConn = System.Web.Configuration.WebConfigurationManager.ConnectionStrings["ORIGSAMPLE"].ToString();
SqlConnection cn = new SqlConnection(strConn);
try { cn.Open();
string strSQL = "SELECT * FROM [qry_Original_Brands] ORDER BY 1";
SqlCommand cmd = new SqlCommand(strSQL, cn); SqlDataReader dr = cmd.ExecuteReader();
cboOriginalBrand.Items.Add("*");
if (dr.HasRows) { while (dr.Read()) {cboOriginalBrand.Items.Add(dr[0].ToString()); } }
I'm having a problem with cboOriginalBrand.Items.Add("*"); and cboOriginalBrand.Items.Add(dr[0].ToString());
Please help me in this.