datagrid的pageindexchanged事件是怎么搞的........  报错:  老是提示说page下找不pageindexchanged事件.....是怎么回事????? 可否提供几本关于委托方面的书和资料让小弟学习学习,小弟感激不尽!!!!!

解决方案 »

  1.   

    委托是C#中的一种引用类型,类似于C/C++中的函数指针。与函数指针不同的是,委托是面向对象、类型安全的,而且委托可以引用静态方法和实例方法,而函数指针只能引用静态函数。委托主要用于 .NET Framework 中的事件处理程序和回调函数。一个委托可以看作一个特殊的类,因而它的定义可以像常规类一样放在同样的位置。与其他类一样,委托必须先定义以后,再实例化。与类不同的是,实例化的委托没有与之相应的术语(类的实例化称作对象),作为区分我们将实例化的委托称为委托实例。去网上找一下吧..有你想了解的概念问题
      

  2.   

    vs.net的帮助索引里面也好像这么说!!!(小弟爱说老实话!)
      

  3.   

    本来就是COPY那上面的....难道一些理论上的东西我还自己写出来吧.那样我可以到微软写开发文档去了。呵呵。
      

  4.   

    一个简单的委托例子:
    using System;
    public class SamplesDelegate
    {
    //定义一个委托类型的_____类
    public delegate String myMethodDelegate(int myInt);
    public class mySampleClass
    {
    public String myStringMethod ( int myInt )
    {
    if ( myInt > 0 )
    return( "positive" );
    if ( myInt < 0 )
    return( "negative" );
    return ( "zero" );
    }
    public static String myStaticStringMethod ( int myInt )
    {
    if ( myInt > 0 )
    return( "+" );
    if ( myInt < 0 )
    return( "-" );
    return ( "" );
    }
    }
    public static void Main()
    {
    mySampleClass mySC = new mySampleClass();
    myMethodDelegate StringMethod = new myMethodDelegate( mySC.myStringMethod );
    myMethodDelegate StaticMethod = new myMethodDelegate( mySampleClass.myStaticStringMethod );
    Console.WriteLine( "{0} is {1}; use the sign \"{2}\".", 5, StringMethod( 5 ), StaticMethod( 5 ) );
    Console.WriteLine( "{0} is {1}; use the sign \"{2}\".", -3, StringMethod( -3 ), StaticMethod( -3 ) );
    Console.WriteLine( "{0} is {1}; use the sign \"{2}\".", 0, StringMethod( 0 ), StaticMethod( 0 ) );
    Console.ReadLine();
    }
    }
      

  5.   

    你自己写的datagrid控件么?为什么会找不到事件?
      

  6.   

    datagrid的属性onpageindexchanged="(your function name)"
      

  7.   


    private void InitializeComponent()
    {    
    //这里加上事件声明 }
      

  8.   

    http://community.csdn.net/Expert/topic/3168/3168824.xml?temp=.8241693