﻿<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>StrataFrame Forum » .NET Forums » General .NET Discussion  » trouble converting VB IWebBusinessBindable to C#</title><generator>InstantForum 2017-1 Final</generator><description>StrataFrame Forum</description><link>http://forum.strataframe.net/</link><webMaster>StrataFrame Forum</webMaster><lastBuildDate>Tue, 09 Jun 2026 00:17:52 GMT</lastBuildDate><ttl>20</ttl><item><title>trouble converting VB IWebBusinessBindable to C#</title><link>http://forum.strataframe.net/FindPost18745.aspx</link><description>Hi all,&lt;br&gt;
&lt;br&gt;
I'm trying to implement the IWebBusinessBindable and IWebListControl with a Telerik RadComboBox. I think I'm on the right track by just copying the code from Strataframe source code, but I'm stuck the conversion of the VB code C#. I ran the code through an online VB-&gt; C# converter and most of it compiles fine except for the "Events" section where the IWebListControl event ListPopulating needs to be implement. The C# code that the converter generates doesn't compile.&lt;br&gt;
&lt;br&gt;
Here's the IWebListControl interface snippet&lt;br&gt;
[codesnippet]Event ListPopulating(ByVal e As ListPopulatingEventArgs)[/codesnippet]&lt;br&gt;
&lt;br&gt;
Here's how Strataframe implements it in Microfour.Strataframe.UI.Web.DropDownList&lt;br&gt;
[codesnippet]        Public Event ListPopulating(ByVal e As ListPopulatingEventArgs) Implements IWebListControl.ListPopulating&lt;br&gt;
&lt;br&gt;
        Friend Sub RaiseListPopulatingEvent(ByVal e As ListPopulatingEventArgs) Implements IWebListControl.RaiseListPopulatingEvent&lt;br&gt;
                 RaiseEvent ListPopulating(e)        &lt;br&gt;
End Sub[/codesnippet]&lt;br&gt;
&lt;br&gt;
Here's the converter generated code, which doesn't compile&lt;br&gt;
[codesnippet]&lt;br&gt;
public event  IWebListControl.ListPopulating;&lt;br&gt;
&lt;br&gt;
internal void IWebListControl.RaiseListPopulatingEvent(ListPopulatingEventArgs e)&lt;br&gt;
{&lt;br&gt;
if (ListPopulating != null) {&lt;br&gt;
ListPopulating(e);&lt;br&gt;
}&lt;br&gt;
}[/codesnippet]&lt;br&gt;
&lt;br&gt;
If anyone could shed some light on this, it would be very helpful as I'm not that experienced in .net development.&lt;br&gt;
&lt;br&gt;
Thank You,&lt;br&gt;
Govinda</description><pubDate>Tue, 26 Aug 2008 13:33:18 GMT</pubDate><dc:creator>Govinda Berrio</dc:creator></item><item><title>RE: trouble converting VB IWebBusinessBindable to C#</title><link>http://forum.strataframe.net/FindPost18762.aspx</link><description>I looks like the solution is that... Thanks Greg.&lt;br&gt;
[codesnippet]public event MicroFour.StrataFrame.UI.IWebListControl.ListPopulatingEventHandler ListPopulating;&lt;br&gt;
&lt;br&gt;
void IWebListControl.RaiseListPopulatingEvent(ListPopulatingEventArgs e)&lt;br&gt;
{&lt;br&gt;
if (ListPopulating != null) {&lt;br&gt;
ListPopulating(e);&lt;br&gt;
}&lt;br&gt;
}[/codesnippet]&lt;br&gt;
&lt;br&gt;
But now the IWebListControl.PopulateList(params object[] Parameters) interface method won't compile. The error that I'm getting is [quote]Argument '1': cannot convert from 'GKG.WebControls.sfRadComboBox' to 'System.Web.UI.WebControls.ListControl'[/quote]&lt;br&gt;
[codesnippet]        void IWebListControl.PopulateList(params object[] Parameters)&lt;br&gt;
        {&lt;br&gt;
            if (!this.DesignMode)&lt;br&gt;
            {&lt;br&gt;
                WebListControl.PopulateCombo(this, (MicroFour.StrataFrame.Tools.ITypeResolver)this.Page, Parameters);&lt;br&gt;
            }&lt;br&gt;
        }[/codesnippet]&lt;br&gt;
&lt;br&gt;
I believe this is because the Telerik RadComboBox doesn't have System.Web.UI.WebControls.ListControl in it's inheritance hierarchy. Can any of the developers look into this because I would really like to use these controls with Strataframe.&lt;br&gt;
&lt;br&gt;
Thank You</description><pubDate>Tue, 26 Aug 2008 13:33:18 GMT</pubDate><dc:creator>Govinda Berrio</dc:creator></item><item><title>RE: trouble converting VB IWebBusinessBindable to C#</title><link>http://forum.strataframe.net/FindPost18758.aspx</link><description>I'm not a C# expert, but I think the problem is in the declaration of the event:&lt;br&gt;
&lt;br&gt;
[codesnippet]public event IWebListControl.ListPopulating;[/codesnippet]&lt;br&gt;
&lt;br&gt;
which is missing a type. You need to add the delegate type:&lt;br&gt;
&lt;br&gt;
[codesnippet]public event ListPopulatingEventHandler IWebListControl.ListPopulating;[/codesnippet]&lt;br&gt;
&lt;br&gt;
That probably isn't quite it, but the form needs to be:&lt;br&gt;
&lt;br&gt;
[codesnippet]public event [delegate type] [event name];[/codesnippet]&lt;br&gt;
&lt;br&gt;
Hope that is helpful! :D</description><pubDate>Tue, 26 Aug 2008 13:16:07 GMT</pubDate><dc:creator>Greg McGuffey</dc:creator></item></channel></rss>