custom datagrid sample code

Discussion in 'ASP .Net Building Controls' started by Gopal Krish, Oct 25, 2004.

  1. Gopal Krish

    Gopal Krish Guest

    Folks,

    I have created a fully reusable, sortable, pageable datagrid as a
    composite control (Compiled to a DLL). It works great.

    I took that fully working code and tried to implement it as a derived
    custom control and it does not display anything on the Browser. I
    debugged in line by line and all the logic is executed correctly but
    when the control goes to the browser, it just displays a blank screen.
    I'm sure I'm doing something silly in my derived control.

    Can anyone post a very simple derived datagrid control code or point
    me to a sample code on the internet?

    Thanks much
     
    Gopal Krish, Oct 25, 2004
    #1
    1. Advertisements

  2. Gopal Krish

    Gopal Krish Guest

    All,

    I finally figured out. It was a stupid mistake. However I'm now facing
    a new problem.

    I have a statement like this which caches a dataview and retrieves
    like the following

    Cache.Insert(DataViewCacheName, myDataView, null,
    DateTime.Now.AddMinutes(_CACHEDURATION),Cache.NoSlidingExpiration);

    myDataView = (DataView)Cache[DataViewCacheName];

    The above lines works perfectly in a typical web page. But I coded the
    same lines inside a derived dtatgrid control, it thorws and error
    saying

    "C:\Inetpub\wwwroot\BugTracker\ControlsClasses\ControlsClasses\ICCDataGrid.cs(214):
    'System.Web.Caching.Cache' denotes a 'class' where a 'variable' was
    expected"

    Any thoughts how to make cache work inside the derived control's code?

    Thanks


    (Gopal Krish) wrote in message news:<>...
    > Folks,
    >
    > I have created a fully reusable, sortable, pageable datagrid as a
    > composite control (Compiled to a DLL). It works great.
    >
    > I took that fully working code and tried to implement it as a derived
    > custom control and it does not display anything on the Browser. I
    > debugged in line by line and all the logic is executed correctly but
    > when the control goes to the browser, it just displays a blank screen.
    > I'm sure I'm doing something silly in my derived control.
    >
    > Can anyone post a very simple derived datagrid control code or point
    > me to a sample code on the internet?
    >
    > Thanks much
     
    Gopal Krish, Oct 26, 2004
    #2
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Dave
    Replies:
    0
    Views:
    695
  2. Jake
    Replies:
    0
    Views:
    748
  3. CHANGE username to westes

    Sample Code That Instruments Java Byte Code?

    CHANGE username to westes, Oct 14, 2003, in forum: Java
    Replies:
    1
    Views:
    1,198
    Robert Olofsson
    Oct 14, 2003
  4. Alex Vinokur
    Replies:
    16
    Views:
    12,786
    Alex Vinokur
    Aug 16, 2004
  5. dave

    sample nested datagrid custom control

    dave, Aug 27, 2004, in forum: ASP .Net Building Controls
    Replies:
    0
    Views:
    181
  6. Siegfried Heintze

    Wanted: Exotic databound Datagrid Sample code

    Siegfried Heintze, Sep 23, 2003, in forum: ASP .Net Datagrid Control
    Replies:
    0
    Views:
    181
    Siegfried Heintze
    Sep 23, 2003
  7. Leah
    Replies:
    1
    Views:
    322
    Lev Burov
    Sep 23, 2004
  8. Tim Chase
    Replies:
    0
    Views:
    238
    Tim Chase
    Feb 16, 2014
Loading...