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

Dynamic assigning sqldatasource is not accessing columns

5 Answers 60 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Syed
Top achievements
Rank 1
Syed asked on 10 May 2009, 12:20 PM
Hi,

I have come across different situation when connecting to Sqldatasource to grid.  Most of time i drag a RadGrid on the form and configure the sqldatasource. Everything works fine me.

This time i got a requirement which i am binding my sqldatasource during the page load event. In this way also its working fine, i can able to insert, delete and update the records in  the RadGrid.

But when i am trying to use the following property. I am receiving the error : Cannot find column bound to field 'ProductName'

RadGrid1.Columns.FindByDataField(

"ProductName").Display = False

The grid is displaying the 12 columns where i can able to insert/delete/update. But when i count the columns it displaying only 2.
Radgrid1.Columns.Count.

Please tell me how to access the RadGrid fields.

I have to lot things to do with. Also tell me how to "sum" all columns values with this kind of situation.

Thanks.

Regards
Syed Arshad

 

5 Answers, 1 is accepted

Sort by
0
Syed
Top achievements
Rank 1
answered on 10 May 2009, 12:25 PM
On load even the following one:

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
       RadGrid1.DataSourceID = "SqlDataSourceJanuary"
    End Sub
--------------------------------------------------------------------------


Please find the aspx code:

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="RadComboBox2">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadComboBox3" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="RadGrid1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadGrid1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>
    <br />
    <div style="text-align: center; font-family: Arial; font-size: larger;">
        <table style="width: 100%">
            <tr>
                <td style="width: 100%; background-color: saddlebrown">
                    <span style="color: #ffffff">Resource Details</span></td>
            </tr>
        </table>
        <br />
    </div>
    <br />
    <div style="text-align: left; font-family: Arial; font-size: larger; margin-left: 15px;">
        <table style="width: 46%" cellpadding="5" cellspacing="0">
            <tr>
                <td style="width: 17%; font-weight: bold; font-size: 10pt; font-family: Arial;">
                    Resource</td>
                <td style="width: 35%;">
                    <telerik:RadComboBox ID="RadComboBox1" runat="server" DataSourceID="SqlDataSource1"
                        DataTextField="Resource_Name" DataValueField="Resource_Name" Skin="Black" Width="208px">
                    </telerik:RadComboBox>
                    <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:ResourceUtilizationDBConnectionString %>"
                        SelectCommand="SELECT [Resource_ID], [Resource_Name] FROM [Resource_Information]">
                    </asp:SqlDataSource>
                </td>
            </tr>
            <tr>
                <td style="width: 17%; font-weight: bold; font-size: 10pt; font-family: Arial;">
                    Division</td>
                <td style="width: 35%;">
                    <telerik:RadComboBox ID="RadComboBox2" runat="server" AutoPostBack="True" DataSourceID="SqlDataSource2"
                        DataTextField="Division_Name" DataValueField="Division_ID" Skin="Forest" Width="208px">
                    </telerik:RadComboBox>
                    <asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:ResourceUtilizationDBConnectionString %>"
                        SelectCommand="SELECT [Division_ID], [Division_Name] FROM [NSS_Divisions]"></asp:SqlDataSource>
                </td>
            </tr>
            <tr>
                <td style="width: 17%; font-weight: bold; font-size: 10pt; font-family: Arial;">
                    Section</td>
                <td style="width: 35%;">
                    <telerik:RadComboBox ID="RadComboBox3" runat="server" DataSourceID="SqlDataSource3"
                        DataTextField="Section_Name" DataValueField="Section_ID" Skin="Forest" Width="208px">
                    </telerik:RadComboBox>
                    <asp:SqlDataSource ID="SqlDataSource3" runat="server" ConnectionString="<%$ ConnectionStrings:ResourceUtilizationDBConnectionString %>"
                        SelectCommand="SELECT [Section_ID], [Section_Name] FROM [Division_Sections] WHERE ([Divsion_ID] = @Divsion_ID)">
                        <SelectParameters>
                            <asp:ControlParameter ControlID="RadComboBox2" Name="Divsion_ID" PropertyName="SelectedValue"
                                Type="Int32" />
                        </SelectParameters>
                    </asp:SqlDataSource>
                </td>
            </tr>
        </table>
        <br />
        &nbsp;<br />
        <telerik:RadGrid ID="RadGrid1" runat="server" AllowAutomaticDeletes="True" AllowAutomaticInserts="True"
            AllowAutomaticUpdates="True" AllowPaging="True" AutoGenerateDeleteColumn="True"
            AutoGenerateEditColumn="True" GridLines="None" ShowFooter="True" Skin="Vista">
            <MasterTableView CellSpacing="-1" CommandItemDisplay="Top">
                <RowIndicatorColumn>
                    <HeaderStyle Width="20px" />
                </RowIndicatorColumn>
                <ExpandCollapseColumn>
                    <HeaderStyle Width="20px" />
                </ExpandCollapseColumn>
            </MasterTableView>
        </telerik:RadGrid><br />
        <br />
        &nbsp;<asp:SqlDataSource ID="SqlDataSourceMay" runat="server" ConnectionString="<%$ ConnectionStrings:ResourceUtilizationDBConnectionString %>"
            SelectCommand="SELECT [Assignment], [Task], [M9_Sep], [M10_Oct], [M11_Nov], [M12_Dec], [M1_Jan], [M2_Feb], [M3_Mar], [M4_Apr], [M5_May], [sno] FROM [Resource_Data]" ConflictDetection="CompareAllValues" DeleteCommand="DELETE FROM [Resource_Data] WHERE [sno] = @original_sno AND (([Assignment] = @original_Assignment) OR ([Assignment] IS NULL AND @original_Assignment IS NULL)) AND (([Task] = @original_Task) OR ([Task] IS NULL AND @original_Task IS NULL)) AND (([M9_Sep] = @original_M9_Sep) OR ([M9_Sep] IS NULL AND @original_M9_Sep IS NULL)) AND (([M10_Oct] = @original_M10_Oct) OR ([M10_Oct] IS NULL AND @original_M10_Oct IS NULL)) AND (([M11_Nov] = @original_M11_Nov) OR ([M11_Nov] IS NULL AND @original_M11_Nov IS NULL)) AND (([M12_Dec] = @original_M12_Dec) OR ([M12_Dec] IS NULL AND @original_M12_Dec IS NULL)) AND (([M1_Jan] = @original_M1_Jan) OR ([M1_Jan] IS NULL AND @original_M1_Jan IS NULL)) AND (([M2_Feb] = @original_M2_Feb) OR ([M2_Feb] IS NULL AND @original_M2_Feb IS NULL)) AND (([M3_Mar] = @original_M3_Mar) OR ([M3_Mar] IS NULL AND @original_M3_Mar IS NULL)) AND (([M4_Apr] = @original_M4_Apr) OR ([M4_Apr] IS NULL AND @original_M4_Apr IS NULL)) AND (([M5_May] = @original_M5_May) OR ([M5_May] IS NULL AND @original_M5_May IS NULL))" InsertCommand="INSERT INTO [Resource_Data] ([Assignment], [Task], [M9_Sep], [M10_Oct], [M11_Nov], [M12_Dec], [M1_Jan], [M2_Feb], [M3_Mar], [M4_Apr], [M5_May]) VALUES (@Assignment, @Task, @M9_Sep, @M10_Oct, @M11_Nov, @M12_Dec, @M1_Jan, @M2_Feb, @M3_Mar, @M4_Apr, @M5_May)" OldValuesParameterFormatString="original_{0}" UpdateCommand="UPDATE [Resource_Data] SET [Assignment] = @Assignment, [Task] = @Task, [M9_Sep] = @M9_Sep, [M10_Oct] = @M10_Oct, [M11_Nov] = @M11_Nov, [M12_Dec] = @M12_Dec, [M1_Jan] = @M1_Jan, [M2_Feb] = @M2_Feb, [M3_Mar] = @M3_Mar, [M4_Apr] = @M4_Apr, [M5_May] = @M5_May WHERE [sno] = @original_sno AND (([Assignment] = @original_Assignment) OR ([Assignment] IS NULL AND @original_Assignment IS NULL)) AND (([Task] = @original_Task) OR ([Task] IS NULL AND @original_Task IS NULL)) AND (([M9_Sep] = @original_M9_Sep) OR ([M9_Sep] IS NULL AND @original_M9_Sep IS NULL)) AND (([M10_Oct] = @original_M10_Oct) OR ([M10_Oct] IS NULL AND @original_M10_Oct IS NULL)) AND (([M11_Nov] = @original_M11_Nov) OR ([M11_Nov] IS NULL AND @original_M11_Nov IS NULL)) AND (([M12_Dec] = @original_M12_Dec) OR ([M12_Dec] IS NULL AND @original_M12_Dec IS NULL)) AND (([M1_Jan] = @original_M1_Jan) OR ([M1_Jan] IS NULL AND @original_M1_Jan IS NULL)) AND (([M2_Feb] = @original_M2_Feb) OR ([M2_Feb] IS NULL AND @original_M2_Feb IS NULL)) AND (([M3_Mar] = @original_M3_Mar) OR ([M3_Mar] IS NULL AND @original_M3_Mar IS NULL)) AND (([M4_Apr] = @original_M4_Apr) OR ([M4_Apr] IS NULL AND @original_M4_Apr IS NULL)) AND (([M5_May] = @original_M5_May) OR ([M5_May] IS NULL AND @original_M5_May IS NULL))">
            <DeleteParameters>
                <asp:Parameter Name="original_sno" Type="Int64" />
                <asp:Parameter Name="original_Assignment" Type="String" />
                <asp:Parameter Name="original_Task" Type="String" />
                <asp:Parameter Name="original_M9_Sep" Type="Int16" />
                <asp:Parameter Name="original_M10_Oct" Type="Int16" />
                <asp:Parameter Name="original_M11_Nov" Type="Int16" />
                <asp:Parameter Name="original_M12_Dec" Type="Int16" />
                <asp:Parameter Name="original_M1_Jan" Type="Int16" />
                <asp:Parameter Name="original_M2_Feb" Type="Int16" />
                <asp:Parameter Name="original_M3_Mar" Type="Int16" />
                <asp:Parameter Name="original_M4_Apr" Type="Int16" />
                <asp:Parameter Name="original_M5_May" Type="Int16" />
            </DeleteParameters>
            <UpdateParameters>
                <asp:Parameter Name="Assignment" Type="String" />
                <asp:Parameter Name="Task" Type="String" />
                <asp:Parameter Name="M9_Sep" Type="Int16" />
                <asp:Parameter Name="M10_Oct" Type="Int16" />
                <asp:Parameter Name="M11_Nov" Type="Int16" />
                <asp:Parameter Name="M12_Dec" Type="Int16" />
                <asp:Parameter Name="M1_Jan" Type="Int16" />
                <asp:Parameter Name="M2_Feb" Type="Int16" />
                <asp:Parameter Name="M3_Mar" Type="Int16" />
                <asp:Parameter Name="M4_Apr" Type="Int16" />
                <asp:Parameter Name="M5_May" Type="Int16" />
                <asp:Parameter Name="original_sno" Type="Int64" />
                <asp:Parameter Name="original_Assignment" Type="String" />
                <asp:Parameter Name="original_Task" Type="String" />
                <asp:Parameter Name="original_M9_Sep" Type="Int16" />
                <asp:Parameter Name="original_M10_Oct" Type="Int16" />
                <asp:Parameter Name="original_M11_Nov" Type="Int16" />
                <asp:Parameter Name="original_M12_Dec" Type="Int16" />
                <asp:Parameter Name="original_M1_Jan" Type="Int16" />
                <asp:Parameter Name="original_M2_Feb" Type="Int16" />
                <asp:Parameter Name="original_M3_Mar" Type="Int16" />
                <asp:Parameter Name="original_M4_Apr" Type="Int16" />
                <asp:Parameter Name="original_M5_May" Type="Int16" />
            </UpdateParameters>
            <InsertParameters>
                <asp:Parameter Name="Assignment" Type="String" />
                <asp:Parameter Name="Task" Type="String" />
                <asp:Parameter Name="M9_Sep" Type="Int16" />
                <asp:Parameter Name="M10_Oct" Type="Int16" />
                <asp:Parameter Name="M11_Nov" Type="Int16" />
                <asp:Parameter Name="M12_Dec" Type="Int16" />
                <asp:Parameter Name="M1_Jan" Type="Int16" />
                <asp:Parameter Name="M2_Feb" Type="Int16" />
                <asp:Parameter Name="M3_Mar" Type="Int16" />
                <asp:Parameter Name="M4_Apr" Type="Int16" />
                <asp:Parameter Name="M5_May" Type="Int16" />
            </InsertParameters>
        </asp:SqlDataSource>
        <asp:SqlDataSource ID="SqlDataSourceJune" runat="server" ConnectionString="<%$ ConnectionStrings:ResourceUtilizationDBConnectionString %>"
            SelectCommand="SELECT [Assignment], [Task], [M10_Oct], [M11_Nov], [M12_Dec], [M1_Jan], [M2_Feb], [M3_Mar], [M4_Apr], [M5_May], [M6_Jun], [sno] FROM [Resource_Data]" ConflictDetection="CompareAllValues" DeleteCommand="DELETE FROM [Resource_Data] WHERE [sno] = @original_sno AND (([Assignment] = @original_Assignment) OR ([Assignment] IS NULL AND @original_Assignment IS NULL)) AND (([Task] = @original_Task) OR ([Task] IS NULL AND @original_Task IS NULL)) AND (([M10_Oct] = @original_M10_Oct) OR ([M10_Oct] IS NULL AND @original_M10_Oct IS NULL)) AND (([M11_Nov] = @original_M11_Nov) OR ([M11_Nov] IS NULL AND @original_M11_Nov IS NULL)) AND (([M12_Dec] = @original_M12_Dec) OR ([M12_Dec] IS NULL AND @original_M12_Dec IS NULL)) AND (([M1_Jan] = @original_M1_Jan) OR ([M1_Jan] IS NULL AND @original_M1_Jan IS NULL)) AND (([M2_Feb] = @original_M2_Feb) OR ([M2_Feb] IS NULL AND @original_M2_Feb IS NULL)) AND (([M3_Mar] = @original_M3_Mar) OR ([M3_Mar] IS NULL AND @original_M3_Mar IS NULL)) AND (([M4_Apr] = @original_M4_Apr) OR ([M4_Apr] IS NULL AND @original_M4_Apr IS NULL)) AND (([M5_May] = @original_M5_May) OR ([M5_May] IS NULL AND @original_M5_May IS NULL)) AND (([M6_Jun] = @original_M6_Jun) OR ([M6_Jun] IS NULL AND @original_M6_Jun IS NULL))" InsertCommand="INSERT INTO [Resource_Data] ([Assignment], [Task], [M10_Oct], [M11_Nov], [M12_Dec], [M1_Jan], [M2_Feb], [M3_Mar], [M4_Apr], [M5_May], [M6_Jun]) VALUES (@Assignment, @Task, @M10_Oct, @M11_Nov, @M12_Dec, @M1_Jan, @M2_Feb, @M3_Mar, @M4_Apr, @M5_May, @M6_Jun)" OldValuesParameterFormatString="original_{0}" UpdateCommand="UPDATE [Resource_Data] SET [Assignment] = @Assignment, [Task] = @Task, [M10_Oct] = @M10_Oct, [M11_Nov] = @M11_Nov, [M12_Dec] = @M12_Dec, [M1_Jan] = @M1_Jan, [M2_Feb] = @M2_Feb, [M3_Mar] = @M3_Mar, [M4_Apr] = @M4_Apr, [M5_May] = @M5_May, [M6_Jun] = @M6_Jun WHERE [sno] = @original_sno AND (([Assignment] = @original_Assignment) OR ([Assignment] IS NULL AND @original_Assignment IS NULL)) AND (([Task] = @original_Task) OR ([Task] IS NULL AND @original_Task IS NULL)) AND (([M10_Oct] = @original_M10_Oct) OR ([M10_Oct] IS NULL AND @original_M10_Oct IS NULL)) AND (([M11_Nov] = @original_M11_Nov) OR ([M11_Nov] IS NULL AND @original_M11_Nov IS NULL)) AND (([M12_Dec] = @original_M12_Dec) OR ([M12_Dec] IS NULL AND @original_M12_Dec IS NULL)) AND (([M1_Jan] = @original_M1_Jan) OR ([M1_Jan] IS NULL AND @original_M1_Jan IS NULL)) AND (([M2_Feb] = @original_M2_Feb) OR ([M2_Feb] IS NULL AND @original_M2_Feb IS NULL)) AND (([M3_Mar] = @original_M3_Mar) OR ([M3_Mar] IS NULL AND @original_M3_Mar IS NULL)) AND (([M4_Apr] = @original_M4_Apr) OR ([M4_Apr] IS NULL AND @original_M4_Apr IS NULL)) AND (([M5_May] = @original_M5_May) OR ([M5_May] IS NULL AND @original_M5_May IS NULL)) AND (([M6_Jun] = @original_M6_Jun) OR ([M6_Jun] IS NULL AND @original_M6_Jun IS NULL))">
            <DeleteParameters>
                <asp:Parameter Name="original_sno" Type="Int64" />
                <asp:Parameter Name="original_Assignment" Type="String" />
                <asp:Parameter Name="original_Task" Type="String" />
                <asp:Parameter Name="original_M10_Oct" Type="Int16" />
                <asp:Parameter Name="original_M11_Nov" Type="Int16" />
                <asp:Parameter Name="original_M12_Dec" Type="Int16" />
                <asp:Parameter Name="original_M1_Jan" Type="Int16" />
                <asp:Parameter Name="original_M2_Feb" Type="Int16" />
                <asp:Parameter Name="original_M3_Mar" Type="Int16" />
                <asp:Parameter Name="original_M4_Apr" Type="Int16" />
                <asp:Parameter Name="original_M5_May" Type="Int16" />
                <asp:Parameter Name="original_M6_Jun" Type="Int16" />
            </DeleteParameters>
            <UpdateParameters>
                <asp:Parameter Name="Assignment" Type="String" />
                <asp:Parameter Name="Task" Type="String" />
                <asp:Parameter Name="M10_Oct" Type="Int16" />
                <asp:Parameter Name="M11_Nov" Type="Int16" />
                <asp:Parameter Name="M12_Dec" Type="Int16" />
                <asp:Parameter Name="M1_Jan" Type="Int16" />
                <asp:Parameter Name="M2_Feb" Type="Int16" />
                <asp:Parameter Name="M3_Mar" Type="Int16" />
                <asp:Parameter Name="M4_Apr" Type="Int16" />
                <asp:Parameter Name="M5_May" Type="Int16" />
                <asp:Parameter Name="M6_Jun" Type="Int16" />
                <asp:Parameter Name="original_sno" Type="Int64" />
                <asp:Parameter Name="original_Assignment" Type="String" />
                <asp:Parameter Name="original_Task" Type="String" />
                <asp:Parameter Name="original_M10_Oct" Type="Int16" />
                <asp:Parameter Name="original_M11_Nov" Type="Int16" />
                <asp:Parameter Name="original_M12_Dec" Type="Int16" />
                <asp:Parameter Name="original_M1_Jan" Type="Int16" />
                <asp:Parameter Name="original_M2_Feb" Type="Int16" />
                <asp:Parameter Name="original_M3_Mar" Type="Int16" />
                <asp:Parameter Name="original_M4_Apr" Type="Int16" />
                <asp:Parameter Name="original_M5_May" Type="Int16" />
                <asp:Parameter Name="original_M6_Jun" Type="Int16" />
            </UpdateParameters>
            <InsertParameters>
                <asp:Parameter Name="Assignment" Type="String" />
                <asp:Parameter Name="Task" Type="String" />
                <asp:Parameter Name="M10_Oct" Type="Int16" />
                <asp:Parameter Name="M11_Nov" Type="Int16" />
                <asp:Parameter Name="M12_Dec" Type="Int16" />
                <asp:Parameter Name="M1_Jan" Type="Int16" />
                <asp:Parameter Name="M2_Feb" Type="Int16" />
                <asp:Parameter Name="M3_Mar" Type="Int16" />
                <asp:Parameter Name="M4_Apr" Type="Int16" />
                <asp:Parameter Name="M5_May" Type="Int16" />
                <asp:Parameter Name="M6_Jun" Type="Int16" />
            </InsertParameters>
        </asp:SqlDataSource>
        <asp:SqlDataSource ID="SqlDataSourceJuly" runat="server" ConnectionString="<%$ ConnectionStrings:ResourceUtilizationDBConnectionString %>"
            SelectCommand="SELECT [Assignment], [Task], [M11_Nov], [M12_Dec], [M1_Jan], [M2_Feb], [M3_Mar], [M4_Apr], [M5_May], [M6_Jun], [M7_Jul], [sno] FROM [Resource_Data]" ConflictDetection="CompareAllValues" DeleteCommand="DELETE FROM [Resource_Data] WHERE [sno] = @original_sno AND (([Assignment] = @original_Assignment) OR ([Assignment] IS NULL AND @original_Assignment IS NULL)) AND (([Task] = @original_Task) OR ([Task] IS NULL AND @original_Task IS NULL)) AND (([M11_Nov] = @original_M11_Nov) OR ([M11_Nov] IS NULL AND @original_M11_Nov IS NULL)) AND (([M12_Dec] = @original_M12_Dec) OR ([M12_Dec] IS NULL AND @original_M12_Dec IS NULL)) AND (([M1_Jan] = @original_M1_Jan) OR ([M1_Jan] IS NULL AND @original_M1_Jan IS NULL)) AND (([M2_Feb] = @original_M2_Feb) OR ([M2_Feb] IS NULL AND @original_M2_Feb IS NULL)) AND (([M3_Mar] = @original_M3_Mar) OR ([M3_Mar] IS NULL AND @original_M3_Mar IS NULL)) AND (([M4_Apr] = @original_M4_Apr) OR ([M4_Apr] IS NULL AND @original_M4_Apr IS NULL)) AND (([M5_May] = @original_M5_May) OR ([M5_May] IS NULL AND @original_M5_May IS NULL)) AND (([M6_Jun] = @original_M6_Jun) OR ([M6_Jun] IS NULL AND @original_M6_Jun IS NULL)) AND (([M7_Jul] = @original_M7_Jul) OR ([M7_Jul] IS NULL AND @original_M7_Jul IS NULL))" InsertCommand="INSERT INTO [Resource_Data] ([Assignment], [Task], [M11_Nov], [M12_Dec], [M1_Jan], [M2_Feb], [M3_Mar], [M4_Apr], [M5_May], [M6_Jun], [M7_Jul]) VALUES (@Assignment, @Task, @M11_Nov, @M12_Dec, @M1_Jan, @M2_Feb, @M3_Mar, @M4_Apr, @M5_May, @M6_Jun, @M7_Jul)" OldValuesParameterFormatString="original_{0}" UpdateCommand="UPDATE [Resource_Data] SET [Assignment] = @Assignment, [Task] = @Task, [M11_Nov] = @M11_Nov, [M12_Dec] = @M12_Dec, [M1_Jan] = @M1_Jan, [M2_Feb] = @M2_Feb, [M3_Mar] = @M3_Mar, [M4_Apr] = @M4_Apr, [M5_May] = @M5_May, [M6_Jun] = @M6_Jun, [M7_Jul] = @M7_Jul WHERE [sno] = @original_sno AND (([Assignment] = @original_Assignment) OR ([Assignment] IS NULL AND @original_Assignment IS NULL)) AND (([Task] = @original_Task) OR ([Task] IS NULL AND @original_Task IS NULL)) AND (([M11_Nov] = @original_M11_Nov) OR ([M11_Nov] IS NULL AND @original_M11_Nov IS NULL)) AND (([M12_Dec] = @original_M12_Dec) OR ([M12_Dec] IS NULL AND @original_M12_Dec IS NULL)) AND (([M1_Jan] = @original_M1_Jan) OR ([M1_Jan] IS NULL AND @original_M1_Jan IS NULL)) AND (([M2_Feb] = @original_M2_Feb) OR ([M2_Feb] IS NULL AND @original_M2_Feb IS NULL)) AND (([M3_Mar] = @original_M3_Mar) OR ([M3_Mar] IS NULL AND @original_M3_Mar IS NULL)) AND (([M4_Apr] = @original_M4_Apr) OR ([M4_Apr] IS NULL AND @original_M4_Apr IS NULL)) AND (([M5_May] = @original_M5_May) OR ([M5_May] IS NULL AND @original_M5_May IS NULL)) AND (([M6_Jun] = @original_M6_Jun) OR ([M6_Jun] IS NULL AND @original_M6_Jun IS NULL)) AND (([M7_Jul] = @original_M7_Jul) OR ([M7_Jul] IS NULL AND @original_M7_Jul IS NULL))">
            <DeleteParameters>
                <asp:Parameter Name="original_sno" Type="Int64" />
                <asp:Parameter Name="original_Assignment" Type="String" />
                <asp:Parameter Name="original_Task" Type="String" />
                <asp:Parameter Name="original_M11_Nov" Type="Int16" />
                <asp:Parameter Name="original_M12_Dec" Type="Int16" />
                <asp:Parameter Name="original_M1_Jan" Type="Int16" />
                <asp:Parameter Name="original_M2_Feb" Type="Int16" />
                <asp:Parameter Name="original_M3_Mar" Type="Int16" />
                <asp:Parameter Name="original_M4_Apr" Type="Int16" />
                <asp:Parameter Name="original_M5_May" Type="Int16" />
                <asp:Parameter Name="original_M6_Jun" Type="Int16" />
                <asp:Parameter Name="original_M7_Jul" Type="Int16" />
            </DeleteParameters>
            <UpdateParameters>
                <asp:Parameter Name="Assignment" Type="String" />
                <asp:Parameter Name="Task" Type="String" />
                <asp:Parameter Name="M11_Nov" Type="Int16" />
                <asp:Parameter Name="M12_Dec" Type="Int16" />
                <asp:Parameter Name="M1_Jan" Type="Int16" />
                <asp:Parameter Name="M2_Feb" Type="Int16" />
                <asp:Parameter Name="M3_Mar" Type="Int16" />
                <asp:Parameter Name="M4_Apr" Type="Int16" />
                <asp:Parameter Name="M5_May" Type="Int16" />
                <asp:Parameter Name="M6_Jun" Type="Int16" />
                <asp:Parameter Name="M7_Jul" Type="Int16" />
                <asp:Parameter Name="original_sno" Type="Int64" />
                <asp:Parameter Name="original_Assignment" Type="String" />
                <asp:Parameter Name="original_Task" Type="String" />
                <asp:Parameter Name="original_M11_Nov" Type="Int16" />
                <asp:Parameter Name="original_M12_Dec" Type="Int16" />
                <asp:Parameter Name="original_M1_Jan" Type="Int16" />
                <asp:Parameter Name="original_M2_Feb" Type="Int16" />
                <asp:Parameter Name="original_M3_Mar" Type="Int16" />
                <asp:Parameter Name="original_M4_Apr" Type="Int16" />
                <asp:Parameter Name="original_M5_May" Type="Int16" />
                <asp:Parameter Name="original_M6_Jun" Type="Int16" />
                <asp:Parameter Name="original_M7_Jul" Type="Int16" />
            </UpdateParameters>
            <InsertParameters>
                <asp:Parameter Name="Assignment" Type="String" />
                <asp:Parameter Name="Task" Type="String" />
                <asp:Parameter Name="M11_Nov" Type="Int16" />
                <asp:Parameter Name="M12_Dec" Type="Int16" />
                <asp:Parameter Name="M1_Jan" Type="Int16" />
                <asp:Parameter Name="M2_Feb" Type="Int16" />
                <asp:Parameter Name="M3_Mar" Type="Int16" />
                <asp:Parameter Name="M4_Apr" Type="Int16" />
                <asp:Parameter Name="M5_May" Type="Int16" />
                <asp:Parameter Name="M6_Jun" Type="Int16" />
                <asp:Parameter Name="M7_Jul" Type="Int16" />
            </InsertParameters>
        </asp:SqlDataSource>
        <asp:SqlDataSource ID="SqlDataSourceAugust" runat="server" ConnectionString="<%$ ConnectionStrings:ResourceUtilizationDBConnectionString %>"
            SelectCommand="SELECT [Assignment], [Task], [M12_Dec], [M1_Jan], [M2_Feb], [M3_Mar], [M4_Apr], [M5_May], [M6_Jun], [M7_Jul], [M8_Aug], [sno] FROM [Resource_Data]" ConflictDetection="CompareAllValues" DeleteCommand="DELETE FROM [Resource_Data] WHERE [sno] = @original_sno AND (([Assignment] = @original_Assignment) OR ([Assignment] IS NULL AND @original_Assignment IS NULL)) AND (([Task] = @original_Task) OR ([Task] IS NULL AND @original_Task IS NULL)) AND (([M12_Dec] = @original_M12_Dec) OR ([M12_Dec] IS NULL AND @original_M12_Dec IS NULL)) AND (([M1_Jan] = @original_M1_Jan) OR ([M1_Jan] IS NULL AND @original_M1_Jan IS NULL)) AND (([M2_Feb] = @original_M2_Feb) OR ([M2_Feb] IS NULL AND @original_M2_Feb IS NULL)) AND (([M3_Mar] = @original_M3_Mar) OR ([M3_Mar] IS NULL AND @original_M3_Mar IS NULL)) AND (([M4_Apr] = @original_M4_Apr) OR ([M4_Apr] IS NULL AND @original_M4_Apr IS NULL)) AND (([M5_May] = @original_M5_May) OR ([M5_May] IS NULL AND @original_M5_May IS NULL)) AND (([M6_Jun] = @original_M6_Jun) OR ([M6_Jun] IS NULL AND @original_M6_Jun IS NULL)) AND (([M7_Jul] = @original_M7_Jul) OR ([M7_Jul] IS NULL AND @original_M7_Jul IS NULL)) AND (([M8_Aug] = @original_M8_Aug) OR ([M8_Aug] IS NULL AND @original_M8_Aug IS NULL))" InsertCommand="INSERT INTO [Resource_Data] ([Assignment], [Task], [M12_Dec], [M1_Jan], [M2_Feb], [M3_Mar], [M4_Apr], [M5_May], [M6_Jun], [M7_Jul], [M8_Aug]) VALUES (@Assignment, @Task, @M12_Dec, @M1_Jan, @M2_Feb, @M3_Mar, @M4_Apr, @M5_May, @M6_Jun, @M7_Jul, @M8_Aug)" OldValuesParameterFormatString="original_{0}" UpdateCommand="UPDATE [Resource_Data] SET [Assignment] = @Assignment, [Task] = @Task, [M12_Dec] = @M12_Dec, [M1_Jan] = @M1_Jan, [M2_Feb] = @M2_Feb, [M3_Mar] = @M3_Mar, [M4_Apr] = @M4_Apr, [M5_May] = @M5_May, [M6_Jun] = @M6_Jun, [M7_Jul] = @M7_Jul, [M8_Aug] = @M8_Aug WHERE [sno] = @original_sno AND (([Assignment] = @original_Assignment) OR ([Assignment] IS NULL AND @original_Assignment IS NULL)) AND (([Task] = @original_Task) OR ([Task] IS NULL AND @original_Task IS NULL)) AND (([M12_Dec] = @original_M12_Dec) OR ([M12_Dec] IS NULL AND @original_M12_Dec IS NULL)) AND (([M1_Jan] = @original_M1_Jan) OR ([M1_Jan] IS NULL AND @original_M1_Jan IS NULL)) AND (([M2_Feb] = @original_M2_Feb) OR ([M2_Feb] IS NULL AND @original_M2_Feb IS NULL)) AND (([M3_Mar] = @original_M3_Mar) OR ([M3_Mar] IS NULL AND @original_M3_Mar IS NULL)) AND (([M4_Apr] = @original_M4_Apr) OR ([M4_Apr] IS NULL AND @original_M4_Apr IS NULL)) AND (([M5_May] = @original_M5_May) OR ([M5_May] IS NULL AND @original_M5_May IS NULL)) AND (([M6_Jun] = @original_M6_Jun) OR ([M6_Jun] IS NULL AND @original_M6_Jun IS NULL)) AND (([M7_Jul] = @original_M7_Jul) OR ([M7_Jul] IS NULL AND @original_M7_Jul IS NULL)) AND (([M8_Aug] = @original_M8_Aug) OR ([M8_Aug] IS NULL AND @original_M8_Aug IS NULL))">
            <DeleteParameters>
                <asp:Parameter Name="original_sno" Type="Int64" />
                <asp:Parameter Name="original_Assignment" Type="String" />
                <asp:Parameter Name="original_Task" Type="String" />
                <asp:Parameter Name="original_M12_Dec" Type="Int16" />
                <asp:Parameter Name="original_M1_Jan" Type="Int16" />
                <asp:Parameter Name="original_M2_Feb" Type="Int16" />
                <asp:Parameter Name="original_M3_Mar" Type="Int16" />
                <asp:Parameter Name="original_M4_Apr" Type="Int16" />
                <asp:Parameter Name="original_M5_May" Type="Int16" />
                <asp:Parameter Name="original_M6_Jun" Type="Int16" />
                <asp:Parameter Name="original_M7_Jul" Type="Int16" />
                <asp:Parameter Name="original_M8_Aug" Type="Int16" />
            </DeleteParameters>
            <UpdateParameters>
                <asp:Parameter Name="Assignment" Type="String" />
                <asp:Parameter Name="Task" Type="String" />
                <asp:Parameter Name="M12_Dec" Type="Int16" />
                <asp:Parameter Name="M1_Jan" Type="Int16" />
                <asp:Parameter Name="M2_Feb" Type="Int16" />
                <asp:Parameter Name="M3_Mar" Type="Int16" />
                <asp:Parameter Name="M4_Apr" Type="Int16" />
                <asp:Parameter Name="M5_May" Type="Int16" />
                <asp:Parameter Name="M6_Jun" Type="Int16" />
                <asp:Parameter Name="M7_Jul" Type="Int16" />
                <asp:Parameter Name="M8_Aug" Type="Int16" />
                <asp:Parameter Name="original_sno" Type="Int64" />
                <asp:Parameter Name="original_Assignment" Type="String" />
                <asp:Parameter Name="original_Task" Type="String" />
                <asp:Parameter Name="original_M12_Dec" Type="Int16" />
                <asp:Parameter Name="original_M1_Jan" Type="Int16" />
                <asp:Parameter Name="original_M2_Feb" Type="Int16" />
                <asp:Parameter Name="original_M3_Mar" Type="Int16" />
                <asp:Parameter Name="original_M4_Apr" Type="Int16" />
                <asp:Parameter Name="original_M5_May" Type="Int16" />
                <asp:Parameter Name="original_M6_Jun" Type="Int16" />
                <asp:Parameter Name="original_M7_Jul" Type="Int16" />
                <asp:Parameter Name="original_M8_Aug" Type="Int16" />
            </UpdateParameters>
            <InsertParameters>
                <asp:Parameter Name="Assignment" Type="String" />
                <asp:Parameter Name="Task" Type="String" />
                <asp:Parameter Name="M12_Dec" Type="Int16" />
                <asp:Parameter Name="M1_Jan" Type="Int16" />
                <asp:Parameter Name="M2_Feb" Type="Int16" />
                <asp:Parameter Name="M3_Mar" Type="Int16" />
                <asp:Parameter Name="M4_Apr" Type="Int16" />
                <asp:Parameter Name="M5_May" Type="Int16" />
                <asp:Parameter Name="M6_Jun" Type="Int16" />
                <asp:Parameter Name="M7_Jul" Type="Int16" />
                <asp:Parameter Name="M8_Aug" Type="Int16" />
            </InsertParameters>
        </asp:SqlDataSource>
        <asp:SqlDataSource ID="SqlDataSourceSeptember" runat="server" ConnectionString="<%$ ConnectionStrings:ResourceUtilizationDBConnectionString %>"
            SelectCommand="SELECT [Assignment], [Task], [M1_Jan], [M2_Feb], [M3_Mar], [M4_Apr], [M5_May], [M6_Jun], [M7_Jul], [M8_Aug], [M9_Sep], [sno] FROM [Resource_Data]" ConflictDetection="CompareAllValues" DeleteCommand="DELETE FROM [Resource_Data] WHERE [sno] = @original_sno AND (([Assignment] = @original_Assignment) OR ([Assignment] IS NULL AND @original_Assignment IS NULL)) AND (([Task] = @original_Task) OR ([Task] IS NULL AND @original_Task IS NULL)) AND (([M1_Jan] = @original_M1_Jan) OR ([M1_Jan] IS NULL AND @original_M1_Jan IS NULL)) AND (([M2_Feb] = @original_M2_Feb) OR ([M2_Feb] IS NULL AND @original_M2_Feb IS NULL)) AND (([M3_Mar] = @original_M3_Mar) OR ([M3_Mar] IS NULL AND @original_M3_Mar IS NULL)) AND (([M4_Apr] = @original_M4_Apr) OR ([M4_Apr] IS NULL AND @original_M4_Apr IS NULL)) AND (([M5_May] = @original_M5_May) OR ([M5_May] IS NULL AND @original_M5_May IS NULL)) AND (([M6_Jun] = @original_M6_Jun) OR ([M6_Jun] IS NULL AND @original_M6_Jun IS NULL)) AND (([M7_Jul] = @original_M7_Jul) OR ([M7_Jul] IS NULL AND @original_M7_Jul IS NULL)) AND (([M8_Aug] = @original_M8_Aug) OR ([M8_Aug] IS NULL AND @original_M8_Aug IS NULL)) AND (([M9_Sep] = @original_M9_Sep) OR ([M9_Sep] IS NULL AND @original_M9_Sep IS NULL))" InsertCommand="INSERT INTO [Resource_Data] ([Assignment], [Task], [M1_Jan], [M2_Feb], [M3_Mar], [M4_Apr], [M5_May], [M6_Jun], [M7_Jul], [M8_Aug], [M9_Sep]) VALUES (@Assignment, @Task, @M1_Jan, @M2_Feb, @M3_Mar, @M4_Apr, @M5_May, @M6_Jun, @M7_Jul, @M8_Aug, @M9_Sep)" OldValuesParameterFormatString="original_{0}" UpdateCommand="UPDATE [Resource_Data] SET [Assignment] = @Assignment, [Task] = @Task, [M1_Jan] = @M1_Jan, [M2_Feb] = @M2_Feb, [M3_Mar] = @M3_Mar, [M4_Apr] = @M4_Apr, [M5_May] = @M5_May, [M6_Jun] = @M6_Jun, [M7_Jul] = @M7_Jul, [M8_Aug] = @M8_Aug, [M9_Sep] = @M9_Sep WHERE [sno] = @original_sno AND (([Assignment] = @original_Assignment) OR ([Assignment] IS NULL AND @original_Assignment IS NULL)) AND (([Task] = @original_Task) OR ([Task] IS NULL AND @original_Task IS NULL)) AND (([M1_Jan] = @original_M1_Jan) OR ([M1_Jan] IS NULL AND @original_M1_Jan IS NULL)) AND (([M2_Feb] = @original_M2_Feb) OR ([M2_Feb] IS NULL AND @original_M2_Feb IS NULL)) AND (([M3_Mar] = @original_M3_Mar) OR ([M3_Mar] IS NULL AND @original_M3_Mar IS NULL)) AND (([M4_Apr] = @original_M4_Apr) OR ([M4_Apr] IS NULL AND @original_M4_Apr IS NULL)) AND (([M5_May] = @original_M5_May) OR ([M5_May] IS NULL AND @original_M5_May IS NULL)) AND (([M6_Jun] = @original_M6_Jun) OR ([M6_Jun] IS NULL AND @original_M6_Jun IS NULL)) AND (([M7_Jul] = @original_M7_Jul) OR ([M7_Jul] IS NULL AND @original_M7_Jul IS NULL)) AND (([M8_Aug] = @original_M8_Aug) OR ([M8_Aug] IS NULL AND @original_M8_Aug IS NULL)) AND (([M9_Sep] = @original_M9_Sep) OR ([M9_Sep] IS NULL AND @original_M9_Sep IS NULL))">
            <DeleteParameters>
                <asp:Parameter Name="original_sno" Type="Int64" />
                <asp:Parameter Name="original_Assignment" Type="String" />
                <asp:Parameter Name="original_Task" Type="String" />
                <asp:Parameter Name="original_M1_Jan" Type="Int16" />
                <asp:Parameter Name="original_M2_Feb" Type="Int16" />
                <asp:Parameter Name="original_M3_Mar" Type="Int16" />
                <asp:Parameter Name="original_M4_Apr" Type="Int16" />
                <asp:Parameter Name="original_M5_May" Type="Int16" />
                <asp:Parameter Name="original_M6_Jun" Type="Int16" />
                <asp:Parameter Name="original_M7_Jul" Type="Int16" />
                <asp:Parameter Name="original_M8_Aug" Type="Int16" />
                <asp:Parameter Name="original_M9_Sep" Type="Int16" />
            </DeleteParameters>
            <UpdateParameters>
                <asp:Parameter Name="Assignment" Type="String" />
                <asp:Parameter Name="Task" Type="String" />
                <asp:Parameter Name="M1_Jan" Type="Int16" />
                <asp:Parameter Name="M2_Feb" Type="Int16" />
                <asp:Parameter Name="M3_Mar" Type="Int16" />
                <asp:Parameter Name="M4_Apr" Type="Int16" />
                <asp:Parameter Name="M5_May" Type="Int16" />
                <asp:Parameter Name="M6_Jun" Type="Int16" />
                <asp:Parameter Name="M7_Jul" Type="Int16" />
                <asp:Parameter Name="M8_Aug" Type="Int16" />
                <asp:Parameter Name="M9_Sep" Type="Int16" />
                <asp:Parameter Name="original_sno" Type="Int64" />
                <asp:Parameter Name="original_Assignment" Type="String" />
                <asp:Parameter Name="original_Task" Type="String" />
                <asp:Parameter Name="original_M1_Jan" Type="Int16" />
                <asp:Parameter Name="original_M2_Feb" Type="Int16" />
                <asp:Parameter Name="original_M3_Mar" Type="Int16" />
                <asp:Parameter Name="original_M4_Apr" Type="Int16" />
                <asp:Parameter Name="original_M5_May" Type="Int16" />
                <asp:Parameter Name="original_M6_Jun" Type="Int16" />
                <asp:Parameter Name="original_M7_Jul" Type="Int16" />
                <asp:Parameter Name="original_M8_Aug" Type="Int16" />
                <asp:Parameter Name="original_M9_Sep" Type="Int16" />
            </UpdateParameters>
            <InsertParameters>
                <asp:Parameter Name="Assignment" Type="String" />
                <asp:Parameter Name="Task" Type="String" />
                <asp:Parameter Name="M1_Jan" Type="Int16" />
                <asp:Parameter Name="M2_Feb" Type="Int16" />
                <asp:Parameter Name="M3_Mar" Type="Int16" />
                <asp:Parameter Name="M4_Apr" Type="Int16" />
                <asp:Parameter Name="M5_May" Type="Int16" />
                <asp:Parameter Name="M6_Jun" Type="Int16" />
                <asp:Parameter Name="M7_Jul" Type="Int16" />
                <asp:Parameter Name="M8_Aug" Type="Int16" />
                <asp:Parameter Name="M9_Sep" Type="Int16" />
            </InsertParameters>
        </asp:SqlDataSource>
        <asp:SqlDataSource ID="SqlDataSourceOctober" runat="server" ConnectionString="<%$ ConnectionStrings:ResourceUtilizationDBConnectionString %>"
            SelectCommand="SELECT [Assignment], [Task], [M2_Feb], [M3_Mar], [M4_Apr], [M5_May], [M6_Jun], [M7_Jul], [M8_Aug], [M9_Sep], [M10_Oct], [sno] FROM [Resource_Data]" ConflictDetection="CompareAllValues" DeleteCommand="DELETE FROM [Resource_Data] WHERE [sno] = @original_sno AND (([Assignment] = @original_Assignment) OR ([Assignment] IS NULL AND @original_Assignment IS NULL)) AND (([Task] = @original_Task) OR ([Task] IS NULL AND @original_Task IS NULL)) AND (([M2_Feb] = @original_M2_Feb) OR ([M2_Feb] IS NULL AND @original_M2_Feb IS NULL)) AND (([M3_Mar] = @original_M3_Mar) OR ([M3_Mar] IS NULL AND @original_M3_Mar IS NULL)) AND (([M4_Apr] = @original_M4_Apr) OR ([M4_Apr] IS NULL AND @original_M4_Apr IS NULL)) AND (([M5_May] = @original_M5_May) OR ([M5_May] IS NULL AND @original_M5_May IS NULL)) AND (([M6_Jun] = @original_M6_Jun) OR ([M6_Jun] IS NULL AND @original_M6_Jun IS NULL)) AND (([M7_Jul] = @original_M7_Jul) OR ([M7_Jul] IS NULL AND @original_M7_Jul IS NULL)) AND (([M8_Aug] = @original_M8_Aug) OR ([M8_Aug] IS NULL AND @original_M8_Aug IS NULL)) AND (([M9_Sep] = @original_M9_Sep) OR ([M9_Sep] IS NULL AND @original_M9_Sep IS NULL)) AND (([M10_Oct] = @original_M10_Oct) OR ([M10_Oct] IS NULL AND @original_M10_Oct IS NULL))" InsertCommand="INSERT INTO [Resource_Data] ([Assignment], [Task], [M2_Feb], [M3_Mar], [M4_Apr], [M5_May], [M6_Jun], [M7_Jul], [M8_Aug], [M9_Sep], [M10_Oct]) VALUES (@Assignment, @Task, @M2_Feb, @M3_Mar, @M4_Apr, @M5_May, @M6_Jun, @M7_Jul, @M8_Aug, @M9_Sep, @M10_Oct)" OldValuesParameterFormatString="original_{0}" UpdateCommand="UPDATE [Resource_Data] SET [Assignment] = @Assignment, [Task] = @Task, [M2_Feb] = @M2_Feb, [M3_Mar] = @M3_Mar, [M4_Apr] = @M4_Apr, [M5_May] = @M5_May, [M6_Jun] = @M6_Jun, [M7_Jul] = @M7_Jul, [M8_Aug] = @M8_Aug, [M9_Sep] = @M9_Sep, [M10_Oct] = @M10_Oct WHERE [sno] = @original_sno AND (([Assignment] = @original_Assignment) OR ([Assignment] IS NULL AND @original_Assignment IS NULL)) AND (([Task] = @original_Task) OR ([Task] IS NULL AND @original_Task IS NULL)) AND (([M2_Feb] = @original_M2_Feb) OR ([M2_Feb] IS NULL AND @original_M2_Feb IS NULL)) AND (([M3_Mar] = @original_M3_Mar) OR ([M3_Mar] IS NULL AND @original_M3_Mar IS NULL)) AND (([M4_Apr] = @original_M4_Apr) OR ([M4_Apr] IS NULL AND @original_M4_Apr IS NULL)) AND (([M5_May] = @original_M5_May) OR ([M5_May] IS NULL AND @original_M5_May IS NULL)) AND (([M6_Jun] = @original_M6_Jun) OR ([M6_Jun] IS NULL AND @original_M6_Jun IS NULL)) AND (([M7_Jul] = @original_M7_Jul) OR ([M7_Jul] IS NULL AND @original_M7_Jul IS NULL)) AND (([M8_Aug] = @original_M8_Aug) OR ([M8_Aug] IS NULL AND @original_M8_Aug IS NULL)) AND (([M9_Sep] = @original_M9_Sep) OR ([M9_Sep] IS NULL AND @original_M9_Sep IS NULL)) AND (([M10_Oct] = @original_M10_Oct) OR ([M10_Oct] IS NULL AND @original_M10_Oct IS NULL))">
            <DeleteParameters>
                <asp:Parameter Name="original_sno" Type="Int64" />
                <asp:Parameter Name="original_Assignment" Type="String" />
                <asp:Parameter Name="original_Task" Type="String" />
                <asp:Parameter Name="original_M2_Feb" Type="Int16" />
                <asp:Parameter Name="original_M3_Mar" Type="Int16" />
                <asp:Parameter Name="original_M4_Apr" Type="Int16" />
                <asp:Parameter Name="original_M5_May" Type="Int16" />
                <asp:Parameter Name="original_M6_Jun" Type="Int16" />
                <asp:Parameter Name="original_M7_Jul" Type="Int16" />
                <asp:Parameter Name="original_M8_Aug" Type="Int16" />
                <asp:Parameter Name="original_M9_Sep" Type="Int16" />
                <asp:Parameter Name="original_M10_Oct" Type="Int16" />
            </DeleteParameters>
            <UpdateParameters>
                <asp:Parameter Name="Assignment" Type="String" />
                <asp:Parameter Name="Task" Type="String" />
                <asp:Parameter Name="M2_Feb" Type="Int16" />
                <asp:Parameter Name="M3_Mar" Type="Int16" />
                <asp:Parameter Name="M4_Apr" Type="Int16" />
                <asp:Parameter Name="M5_May" Type="Int16" />
                <asp:Parameter Name="M6_Jun" Type="Int16" />
                <asp:Parameter Name="M7_Jul" Type="Int16" />
                <asp:Parameter Name="M8_Aug" Type="Int16" />
                <asp:Parameter Name="M9_Sep" Type="Int16" />
                <asp:Parameter Name="M10_Oct" Type="Int16" />
                <asp:Parameter Name="original_sno" Type="Int64" />
                <asp:Parameter Name="original_Assignment" Type="String" />
                <asp:Parameter Name="original_Task" Type="String" />
                <asp:Parameter Name="original_M2_Feb" Type="Int16" />
                <asp:Parameter Name="original_M3_Mar" Type="Int16" />
                <asp:Parameter Name="original_M4_Apr" Type="Int16" />
                <asp:Parameter Name="original_M5_May" Type="Int16" />
                <asp:Parameter Name="original_M6_Jun" Type="Int16" />
                <asp:Parameter Name="original_M7_Jul" Type="Int16" />
                <asp:Parameter Name="original_M8_Aug" Type="Int16" />
                <asp:Parameter Name="original_M9_Sep" Type="Int16" />
                <asp:Parameter Name="original_M10_Oct" Type="Int16" />
            </UpdateParameters>
            <InsertParameters>
                <asp:Parameter Name="Assignment" Type="String" />
                <asp:Parameter Name="Task" Type="String" />
                <asp:Parameter Name="M2_Feb" Type="Int16" />
                <asp:Parameter Name="M3_Mar" Type="Int16" />
                <asp:Parameter Name="M4_Apr" Type="Int16" />
                <asp:Parameter Name="M5_May" Type="Int16" />
                <asp:Parameter Name="M6_Jun" Type="Int16" />
                <asp:Parameter Name="M7_Jul" Type="Int16" />
                <asp:Parameter Name="M8_Aug" Type="Int16" />
                <asp:Parameter Name="M9_Sep" Type="Int16" />
                <asp:Parameter Name="M10_Oct" Type="Int16" />
            </InsertParameters>
        </asp:SqlDataSource>
        <asp:SqlDataSource ID="SqlDataSourceNovember" runat="server" ConnectionString="<%$ ConnectionStrings:ResourceUtilizationDBConnectionString %>"
            SelectCommand="SELECT [Assignment], [Task], [M3_Mar], [M4_Apr], [M5_May], [M6_Jun], [M7_Jul], [M8_Aug], [M9_Sep], [M10_Oct], [M11_Nov], [sno] FROM [Resource_Data]" ConflictDetection="CompareAllValues" DeleteCommand="DELETE FROM [Resource_Data] WHERE [sno] = @original_sno AND (([Assignment] = @original_Assignment) OR ([Assignment] IS NULL AND @original_Assignment IS NULL)) AND (([Task] = @original_Task) OR ([Task] IS NULL AND @original_Task IS NULL)) AND (([M3_Mar] = @original_M3_Mar) OR ([M3_Mar] IS NULL AND @original_M3_Mar IS NULL)) AND (([M4_Apr] = @original_M4_Apr) OR ([M4_Apr] IS NULL AND @original_M4_Apr IS NULL)) AND (([M5_May] = @original_M5_May) OR ([M5_May] IS NULL AND @original_M5_May IS NULL)) AND (([M6_Jun] = @original_M6_Jun) OR ([M6_Jun] IS NULL AND @original_M6_Jun IS NULL)) AND (([M7_Jul] = @original_M7_Jul) OR ([M7_Jul] IS NULL AND @original_M7_Jul IS NULL)) AND (([M8_Aug] = @original_M8_Aug) OR ([M8_Aug] IS NULL AND @original_M8_Aug IS NULL)) AND (([M9_Sep] = @original_M9_Sep) OR ([M9_Sep] IS NULL AND @original_M9_Sep IS NULL)) AND (([M10_Oct] = @original_M10_Oct) OR ([M10_Oct] IS NULL AND @original_M10_Oct IS NULL)) AND (([M11_Nov] = @original_M11_Nov) OR ([M11_Nov] IS NULL AND @original_M11_Nov IS NULL))" InsertCommand="INSERT INTO [Resource_Data] ([Assignment], [Task], [M3_Mar], [M4_Apr], [M5_May], [M6_Jun], [M7_Jul], [M8_Aug], [M9_Sep], [M10_Oct], [M11_Nov]) VALUES (@Assignment, @Task, @M3_Mar, @M4_Apr, @M5_May, @M6_Jun, @M7_Jul, @M8_Aug, @M9_Sep, @M10_Oct, @M11_Nov)" OldValuesParameterFormatString="original_{0}" UpdateCommand="UPDATE [Resource_Data] SET [Assignment] = @Assignment, [Task] = @Task, [M3_Mar] = @M3_Mar, [M4_Apr] = @M4_Apr, [M5_May] = @M5_May, [M6_Jun] = @M6_Jun, [M7_Jul] = @M7_Jul, [M8_Aug] = @M8_Aug, [M9_Sep] = @M9_Sep, [M10_Oct] = @M10_Oct, [M11_Nov] = @M11_Nov WHERE [sno] = @original_sno AND (([Assignment] = @original_Assignment) OR ([Assignment] IS NULL AND @original_Assignment IS NULL)) AND (([Task] = @original_Task) OR ([Task] IS NULL AND @original_Task IS NULL)) AND (([M3_Mar] = @original_M3_Mar) OR ([M3_Mar] IS NULL AND @original_M3_Mar IS NULL)) AND (([M4_Apr] = @original_M4_Apr) OR ([M4_Apr] IS NULL AND @original_M4_Apr IS NULL)) AND (([M5_May] = @original_M5_May) OR ([M5_May] IS NULL AND @original_M5_May IS NULL)) AND (([M6_Jun] = @original_M6_Jun) OR ([M6_Jun] IS NULL AND @original_M6_Jun IS NULL)) AND (([M7_Jul] = @original_M7_Jul) OR ([M7_Jul] IS NULL AND @original_M7_Jul IS NULL)) AND (([M8_Aug] = @original_M8_Aug) OR ([M8_Aug] IS NULL AND @original_M8_Aug IS NULL)) AND (([M9_Sep] = @original_M9_Sep) OR ([M9_Sep] IS NULL AND @original_M9_Sep IS NULL)) AND (([M10_Oct] = @original_M10_Oct) OR ([M10_Oct] IS NULL AND @original_M10_Oct IS NULL)) AND (([M11_Nov] = @original_M11_Nov) OR ([M11_Nov] IS NULL AND @original_M11_Nov IS NULL))">
            <DeleteParameters>
                <asp:Parameter Name="original_sno" Type="Int64" />
                <asp:Parameter Name="original_Assignment" Type="String" />
                <asp:Parameter Name="original_Task" Type="String" />
                <asp:Parameter Name="original_M3_Mar" Type="Int16" />
                <asp:Parameter Name="original_M4_Apr" Type="Int16" />
                <asp:Parameter Name="original_M5_May" Type="Int16" />
                <asp:Parameter Name="original_M6_Jun" Type="Int16" />
                <asp:Parameter Name="original_M7_Jul" Type="Int16" />
                <asp:Parameter Name="original_M8_Aug" Type="Int16" />
                <asp:Parameter Name="original_M9_Sep" Type="Int16" />
                <asp:Parameter Name="original_M10_Oct" Type="Int16" />
                <asp:Parameter Name="original_M11_Nov" Type="Int16" />
            </DeleteParameters>
            <UpdateParameters>
                <asp:Parameter Name="Assignment" Type="String" />
                <asp:Parameter Name="Task" Type="String" />
                <asp:Parameter Name="M3_Mar" Type="Int16" />
                <asp:Parameter Name="M4_Apr" Type="Int16" />
                <asp:Parameter Name="M5_May" Type="Int16" />
                <asp:Parameter Name="M6_Jun" Type="Int16" />
                <asp:Parameter Name="M7_Jul" Type="Int16" />
                <asp:Parameter Name="M8_Aug" Type="Int16" />
                <asp:Parameter Name="M9_Sep" Type="Int16" />
                <asp:Parameter Name="M10_Oct" Type="Int16" />
                <asp:Parameter Name="M11_Nov" Type="Int16" />
                <asp:Parameter Name="original_sno" Type="Int64" />
                <asp:Parameter Name="original_Assignment" Type="String" />
                <asp:Parameter Name="original_Task" Type="String" />
                <asp:Parameter Name="original_M3_Mar" Type="Int16" />
                <asp:Parameter Name="original_M4_Apr" Type="Int16" />
                <asp:Parameter Name="original_M5_May" Type="Int16" />
                <asp:Parameter Name="original_M6_Jun" Type="Int16" />
                <asp:Parameter Name="original_M7_Jul" Type="Int16" />
                <asp:Parameter Name="original_M8_Aug" Type="Int16" />
                <asp:Parameter Name="original_M9_Sep" Type="Int16" />
                <asp:Parameter Name="original_M10_Oct" Type="Int16" />
                <asp:Parameter Name="original_M11_Nov" Type="Int16" />
            </UpdateParameters>
            <InsertParameters>
                <asp:Parameter Name="Assignment" Type="String" />
                <asp:Parameter Name="Task" Type="String" />
                <asp:Parameter Name="M3_Mar" Type="Int16" />
                <asp:Parameter Name="M4_Apr" Type="Int16" />
                <asp:Parameter Name="M5_May" Type="Int16" />
                <asp:Parameter Name="M6_Jun" Type="Int16" />
                <asp:Parameter Name="M7_Jul" Type="Int16" />
                <asp:Parameter Name="M8_Aug" Type="Int16" />
                <asp:Parameter Name="M9_Sep" Type="Int16" />
                <asp:Parameter Name="M10_Oct" Type="Int16" />
                <asp:Parameter Name="M11_Nov" Type="Int16" />
            </InsertParameters>
        </asp:SqlDataSource>
        <asp:SqlDataSource ID="SqlDataSourceDecember" runat="server" ConnectionString="<%$ ConnectionStrings:ResourceUtilizationDBConnectionString %>"
            SelectCommand="SELECT [Assignment], [Task], [M4_Apr], [M5_May], [M6_Jun], [M7_Jul], [M8_Aug], [M9_Sep], [M10_Oct], [M11_Nov], [M12_Dec], [sno] FROM [Resource_Data]">
        </asp:SqlDataSource>
        <asp:SqlDataSource ID="SqlDataSourceJanuary" runat="server" ConnectionString="<%$ ConnectionStrings:ResourceUtilizationDBConnectionString %>"
            SelectCommand="SELECT [Assignment], [Task], [M5_May], [M6_Jun], [M7_Jul], [M8_Aug], [M9_Sep], [M10_Oct], [M11_Nov], [M12_Dec], [M1_Jan], [sno] FROM [Resource_Data]">
        </asp:SqlDataSource>
        <asp:SqlDataSource ID="SqlDataSourceFebruary" runat="server" ConnectionString="<%$ ConnectionStrings:ResourceUtilizationDBConnectionString %>"
            SelectCommand="SELECT [Assignment], [Task], [M6_Jun], [M7_Jul], [M8_Aug], [M9_Sep], [M10_Oct], [M11_Nov], [M12_Dec], [M1_Jan], [M2_Feb], [sno] FROM [Resource_Data]">
        </asp:SqlDataSource>
        <asp:SqlDataSource ID="SqlDataSourceMarch" runat="server" ConnectionString="<%$ ConnectionStrings:ResourceUtilizationDBConnectionString %>"
            SelectCommand="SELECT [Assignment], [Task], [M7_Jul], [M8_Aug], [M9_Sep], [M10_Oct], [M11_Nov], [M12_Dec], [M1_Jan], [M2_Feb], [M3_Mar], [sno] FROM [Resource_Data]">
        </asp:SqlDataSource>
        <asp:SqlDataSource ID="SqlDataSourceApril" runat="server" ConnectionString="<%$ ConnectionStrings:ResourceUtilizationDBConnectionString %>"
            SelectCommand="SELECT [Assignment], [Task], [M8_Aug], [M9_Sep], [M10_Oct], [M11_Nov], [M12_Dec], [M1_Jan], [M2_Feb], [M3_Mar], [M4_Apr], [sno] FROM [Resource_Data]">
        </asp:SqlDataSource>
        <br />
        &nbsp;
    </div>
    <br />
    <br />
    <br />
    <br />
    <br />
    <br />
</asp:Content>
0
Shinu
Top achievements
Rank 1
answered on 11 May 2009, 04:37 AM
Hi Syed,

In the above given aspx code I was not able to find a column named ProductName. Can you confirm whether a column named ProductName exists in the DataSource(SqlDataSourceJanuary).

Shinu
0
Syed
Top achievements
Rank 1
answered on 11 May 2009, 05:57 AM

"ProductName" Field exist in the sqldatasource.  This field cannot be viewed in the code because the RadGrid did not attach to sqldatasource. RadGrid is choosing data source on the page load even.

On the form, I drag a sqldatasource and configure to database  but did not choose to data source for the Radgrid.

I have 12 different sqldatasources and attaching only based on the condition.

Let be more specific with the following example:

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        DynamicConnectionDatabase()
End Sub

Public Sub DynamicConnectionDatabase()
        Dim RMonth As Integer = Now.Month
        Select Case Now.Month
            Case 1
                RadGrid1.DataSourceID = "SqlDataSourceJanuary"
            Case 2
                RadGrid1.DataSourceID = "SqlDataSourceFebruary"
            Case 3
                RadGrid1.DataSourceID = "SqlDataSourceMarch"
            Case 4
                RadGrid1.DataSourceID = "SqlDataSourceApril"
            Case 5
                RadGrid1.DataSourceID = "SqlDataSourceMay"
            Case 6
                RadGrid1.DataSourceID = "SqlDataSourceJune"
            Case 7
                RadGrid1.DataSourceID = "SqlDataSourceJuly"
            Case 8
                RadGrid1.DataSourceID = "SqlDataSourceAugust"
            Case 9
                RadGrid1.DataSourceID = "SqlDataSourceSeptember"
            Case 10
                RadGrid1.DataSourceID = "SqlDataSourceOctober"
            Case 11
                RadGrid1.DataSourceID = "SqlDataSourceNovember"
            Case 12
                RadGrid1.DataSourceID = "SqlDataSourceDecember"

        End Select
    End Sub


Thanks.


Regards
Syed Arshad

0
Sean
Top achievements
Rank 1
answered on 20 Sep 2010, 03:52 PM
I am also having this issue....

I am trying to capture the filtering on a radgrid so that I can apply them to a corresponding rad chart, I am capturing the filtering like this:

        protected void RadItemCommand(object source, Telerik.Web.UI.GridCommandEventArgs e)
        {
            if (e.CommandName == Telerik.Web.UI.RadGrid.FilterCommandName)
            {
                Pair filterPair = (Pair)e.CommandArgument;
                filterType.Add(filterPair.First.ToString(), filterPair.First.ToString());
                filterColumn.Add(filterPair.Second.ToString(), filterPair.Second.ToString());
                Telerik.Web.UI.GridFilteringItem filterItem = (Telerik.Web.UI.GridFilteringItem)e.Item;

                // This doesn't work???? (cannot find data field?)
              //  Telerik.Web.UI.GridColumn myColumn = ReportGrid.Columns.FindByDataField("Loaned");
              //  un = myColumn.UniqueName;

                //This was taken from your website and it also does not work, but it only fails to work when dealing with Decimal-              
                // type datafields, it handles the string datafields just fine. What gives? My thought is that the field's unique name does
                //not match the string we are trying to use to access it. I was hoping to find the unique name by finding the column by
                //the datafield, which name matches the filterColumn string. This is failing on ALL Decimal field typse, and works fine
                // if they are casted as varchars from the datasource. However I need them to be decimals, not varchars.
                string currentPattern = (filterItem[((Pair)e.CommandArgument).Second.ToString()].Controls[0] as TextBox).Text;
                filterValue.Add(currentPattern, currentPattern);
            }
        }
0
Maria Ilieva
Telerik team
answered on 23 Sep 2010, 01:08 PM
Hello Sean,

Could you please send us the RadGrid columns declaration so we could further research on the issue? Also if the columns are auto-generated please ensure that a column with the 'Loaned' name exists.


All the best,
Maria Ilieva
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
Grid
Asked by
Syed
Top achievements
Rank 1
Answers by
Syed
Top achievements
Rank 1
Shinu
Top achievements
Rank 1
Sean
Top achievements
Rank 1
Maria Ilieva
Telerik team
Share this question
or