Using Ext.Net giving Ambiguity errors for System.Web.UI.WebControls and Ext.Net controls.

  1. #1

    Using Ext.Net giving Ambiguity errors for System.Web.UI.WebControls and Ext.Net controls.

    Hi,

    I was using ASP.NET repeater control to bind data.
    But now I am using Ext.Net GridPanel for the same.
    On Edit I am binding data to different ASP.Net controls which are in a ASP.Net panel which is set to Visible="false" initially.
    But now while editing on CommandColumn, Panel is not getting visible or values are not getting set in ASP.Net control.
    According to some posts we have to use .Update() method to update ASP.Net controls.
    But my issue is I have used namespace like

    using ext = Ext.Net;

    And can not use it as using Ext.Net; because its giving me Ambiguity errors for System.Web.UI.WebControls and Ext.Net controls.
  2. #2
    Hi,

    You can accessing ambiguous Ext.NET classes explicitly:
    Ext.Net.Button b = new Ext.Net.Button();
  3. #3
    Hi Daniil,

    To avoid the ambiguity issue I have done Using Ext = Ext.Net
    And it's working fine. But I am trying to use Ext.Net controls with existing ASP.NET controls.
    So to update these ASP.NET controls on DirectEvent, I have to call the Ext.Net extension method like Control.Update().

    But I am not getting this extension method as I have used namespace as mentioned above.

    So how can I use this Control.Update() method in my scenario.

    here is some extract from my code.


    using ext = Ext.Net;
    .
    .
    .
    .
    .
     
    protected void EditRecord(object sender, ext.DirectEventArgs e)
        {
            short bankID = short.Parse(e.ExtraParams["BankID"]);
            string commandName = e.ExtraParams["command"];
    
            switch (commandName)
            {
                case "Edit":
                    this.EditBank(bankID);
                    break;
                case "Delete":
                    this.DeleteBank(bankID);
                    break;
            }
        }
    
    
    private void EditBank(short bankID)
    {
    
    
     // some code to load bank object
    
    pnlEntryForm.Visible = true; // this is ASP.Net panel control
    
    pnlEntryForm.Update(); // how can I do this
    
    }
    Last edited by itskvini; Dec 22, 2011 at 3:31 PM.
  4. #4
    Thanks for the clarification.

    Then please use the Update method this way:
    ext.Extensions.Update(control);
  5. #5
    Hi Daniil,

    Thanks for the reply. What you suggested is working fine.
    But I think it's kind of tedious to use Ext.Net and ASP.Net controls together.
    As I need to update each and every ASP.Net control to work properly.

    Anyways, thanks again for your reply.
  6. #6
    Well, if you update many ASP.NET controls during a DirectEvent, you could iterate all pages controls and call Update for them.

    It would be not tedious, but, I'm afraid, it can decrease the application performance.

Similar Threads

  1. Replies: 8
    Last Post: Jul 20, 2012, 1:33 PM
  2. Replies: 12
    Last Post: May 25, 2012, 11:34 AM
  3. Replies: 4
    Last Post: Feb 01, 2011, 11:54 AM
  4. Using other WebControls
    By Dominik in forum 1.x Help
    Replies: 8
    Last Post: Dec 13, 2010, 3:23 PM
  5. Replies: 2
    Last Post: Aug 31, 2009, 6:03 PM

Tags for this Thread

Posting Permissions