This is a migrated thread and some comments may be shown as answers.

[Solved] Aggregate Column error at "Rebind()"

0 Answers 84 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Fei
Top achievements
Rank 1
Fei asked on 28 Mar 2013, 02:18 AM
I use 3 control's to update a hierarchy radgrid view
control 1 changed the select column ,like this,
dropdownlist  a,  item 1    :      select   workhour  as p1  from table1
dropdownlist  a , item 2    :       select  workhour*salary as p1  from table1

control 2 and 3  do not  change the  select column
all of the 3 control are in  ajaxmanager , like this....
all of the 3 control autopostback is true ,  and called  RadGrid1.MasterTableView.Rebind()  method;
~~~~~~~~~~~~~
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
                <AjaxSettings>
                    <telerik:AjaxSetting AjaxControlID="RadGrid1">
                        <UpdatedControls>
                            <telerik:AjaxUpdatedControl ControlID="RadGrid1" LoadingPanelID="RadAjaxLoadingPanel1" />
                        </UpdatedControls>
                    </telerik:AjaxSetting>
                    <telerik:AjaxSetting AjaxControlID="rbl1">
                        <UpdatedControls>
                            <telerik:AjaxUpdatedControl ControlID="RadGrid1" LoadingPanelID="RadAjaxLoadingPanel1" />
                            <telerik:AjaxUpdatedControl ControlID="rbl1" />
                        </UpdatedControls>
                    </telerik:AjaxSetting>
                    <telerik:AjaxSetting AjaxControlID="cbl1">
                        <UpdatedControls>
                            <telerik:AjaxUpdatedControl ControlID="RadGrid1" LoadingPanelID="RadAjaxLoadingPanel1" />
                            <telerik:AjaxUpdatedControl ControlID="cbl1" />
                        </UpdatedControls>
                    </telerik:AjaxSetting>


~~~~~

the problem is :  if I don't  use  aggregate column to sum  the column,   it works  fine,

if I use aggregate column  to sum the column ,  when I change control 1 ,  It will report an error   at   Rebind() method.

protected void RadGrid1_Rebind(object sender, EventArgs e)
        {
            RadGrid1.MasterTableView.Rebind();
        }

when I change control 2 , 3 , it works fine too....


I cannot find the way .......

(Hope someone can understand what I'm saying)

update:

I found the reason ,
dropdownlist a, item 1 : select workhour as p1 from table1 ,   workhour is   decimal  type
dropdownlist a , item 2 : select cast(workhour*salary as int)  as p1 from table1,  workhour*salary   is  int  type.....


I use Numericrow ,and format it to {0:G0}
it works fine

No answers yet. Maybe you can help?

Tags
Grid
Asked by
Fei
Top achievements
Rank 1
Share this question
or