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

Row Click Expaning to DetailTable Issue

1 Answer 114 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Shawn
Top achievements
Rank 1
Shawn asked on 02 Mar 2009, 04:44 PM
I have a table that I want to expand the row and display the Detail Table when the row is clicked by the user.  I achieve that like so:
If e.CommandName = "RowClick" Then 
            Dim item As GridDataItem = e.Item 
            If item.Expanded = True Then 
                item.Expanded = False 
            Else 
                item.Expanded = True 
            End If 
        End If 

However I get an error on the "item.expanded = true"

Procedure or function 'sp_Select_Affiliate_Purchased_Breakdown' expects parameter '@source_id', which was not supplied.

<asp:SqlDataSource ID="sqlds_AffiliatePurchasedData" runat="server"  
        ConnectionString="<%$ ConnectionStrings:Company_Master_ConnectionString %>"  
        SelectCommand="sp_Select_Affiliate_Purchased_Breakdown"  
        SelectCommandType="StoredProcedure"
        <SelectParameters> 
            <asp:Parameter Name="source_id" Type="Int32" DefaultValue="@source_id" /> 
        </SelectParameters> 
    </asp:SqlDataSource> 

Why would this be happening?  The Parameter is right in the data source...




1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 03 Mar 2009, 08:33 AM
Hi Shawn,

I am not sure how you are passing value for the parameter. One suggestion will be to pass the value for the parameter in the ItemCommand event which will be called each and every time you click a row.

Thanks
Shinu.
Tags
Grid
Asked by
Shawn
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Share this question
or