Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/334.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# JANUS GridEX:如何根据不同列C的值对某些列进行排序#_C#_Winforms_Janus_Gridex - Fatal编程技术网

C# JANUS GridEX:如何根据不同列C的值对某些列进行排序#

C# JANUS GridEX:如何根据不同列C的值对某些列进行排序#,c#,winforms,janus,gridex,C#,Winforms,Janus,Gridex,我需要对列进行排序,使其值为显示日期的字符串。 如果我按thw列的标题对其进行排序,则效果不佳。 因此,我希望在单击列的标题进行排序时,它会根据不同列的不同值对列进行排序 比如: 列:dateDescription 列:date 我希望在单击列标题dateDescription时,按列date中的值排序,而不是按默认值排序:dateDescription 我尝试在代码中编写如下内容: private void M_MortagagePaymentGrid_ColumnHeaderClick(ob

我需要对列进行排序,使其值为显示日期的字符串。 如果我按thw列的标题对其进行排序,则效果不佳。 因此,我希望在单击列的标题进行排序时,它会根据不同列的不同值对列进行排序

比如:

列:
dateDescription
列:
date

我希望在单击列标题
dateDescription
时,按列
date
中的值排序,而不是按默认值排序:
dateDescription

我尝试在代码中编写如下内容:

private void M_MortagagePaymentGrid_ColumnHeaderClick(object sender, Janus.Windows.GridEX.ColumnActionEventArgs e)
{
    if (e.Column.Index == 4)// this column: dateDescription 
    {
      //hear I want to sort by the values of the column date
      // what to write hear??
    }
}

我不知道Janus.GridEx的具体情况,但您可能应该使用更改后的Eventargument调用base ColumnHeaderClick事件。查看Janus文档以获得需要调用的基函数的名称。 下面给出了示例代码

private void M_MortagagePaymentGrid_ColumnHeaderClick(object sender, Janus.Windows.GridEX.ColumnActionEventArgs e)
{
    if (e.Column.Index == 4)// this column: dateDescription 
    {
        e.Column.Index = 3; //use the column index for the date column
    }
    //Call the base Event handler here with (sender, e)

}

你能说得更具体一点吗?什么都没发生