Click here to Skip to main content
15,891,253 members
Home / Discussions / ASP.NET
   

ASP.NET

 
Questionavoid multiple instances of an application Pin
deepaks36-Sep-06 9:20
deepaks36-Sep-06 9:20 
AnswerRe: avoid multiple instances of an application Pin
minhpc_bk6-Sep-06 14:20
minhpc_bk6-Sep-06 14:20 
QuestionDatagrid - how to avoid adding an item Pin
thowra6-Sep-06 6:36
thowra6-Sep-06 6:36 
AnswerRe: Datagrid - how to avoid adding an item Pin
minhpc_bk6-Sep-06 14:23
minhpc_bk6-Sep-06 14:23 
Questiondelete confirm in asp.net with vb.net 1.1 Pin
amaneet6-Sep-06 6:26
amaneet6-Sep-06 6:26 
AnswerRe: delete confirm in asp.net with vb.net 1.1 Pin
postmaster@programmingknowledge.com6-Sep-06 14:38
postmaster@programmingknowledge.com6-Sep-06 14:38 
QuestionGridView / ObjectDataSource problem [modified] Pin
Robin C6-Sep-06 5:53
Robin C6-Sep-06 5:53 
AnswerRe: GridView / ObjectDataSource problem Pin
minhpc_bk6-Sep-06 20:08
minhpc_bk6-Sep-06 20:08 
I guess that your sample code to build the gridview control relies on something such as the data binding expression ... that requires the Repeater's ObjectDataSource to execute its Select command. Below is a working sample with the two tables Categories and Products of the Northwind:

<asp:Repeater ID="Repeater1" runat="server" DataSourceID="ObjectDataSource1">
    <ItemTemplate>
        <%# Eval("CategoryName") %>
        <br />
            <asp:Label runat="server" ID="lblCategoryID" Visible="false" Text='<%# Eval("CategoryID") %>'></asp:Label>
            <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataSourceID="ObjectDataSource2">
            <Columns>
                <asp:CommandField ShowEditButton="True" />
                <asp:BoundField DataField="ProductID" HeaderText="ProductID" />
                <asp:BoundField DataField="ProductName" HeaderText="ProductName" />
                <asp:BoundField DataField="UnitPrice" HeaderText="UnitPrice" />
            </Columns>
        </asp:GridView>
        <asp:ObjectDataSource ID="ObjectDataSource2" runat="server" SelectMethod="GetProducts"
            TypeName="Samples.AspNet.ObjectDataSource.NorthwindData">
            <SelectParameters>
                <asp:ControlParameter ControlID="lblCategoryID" Name="categoryID" PropertyName="Text" Type="Int32" />
            </SelectParameters>
        </asp:ObjectDataSource>
    </ItemTemplate>
</asp:Repeater>
<asp:ObjectDataSource ID="ObjectDataSource1" runat="server" OnSelecting="ObjectDataSource1_Selecting"
    SelectMethod="GetCategories" TypeName="Samples.AspNet.ObjectDataSource.NorthwindData">
    <SelectParameters>
        <asp:Parameter DefaultValue="%" Name="name" Type="String" />
    </SelectParameters>
</asp:ObjectDataSource>
<br />
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataSourceID="ObjectDataSource2">
    <Columns>
        <asp:BoundField DataField="CategoryID" HeaderText="CategoryID" />
    </Columns>
</asp:GridView>
<asp:ObjectDataSource ID="ObjectDataSource2" runat="server" SelectMethod="GetCategories"
    TypeName="Samples.AspNet.ObjectDataSource.NorthwindData">
    <SelectParameters>
        <asp:Parameter DefaultValue="%" Name="name" Type="String" />
    </SelectParameters>
</asp:ObjectDataSource>

You might want to post your code snippets if you still cannot figure it out.



GeneralRe: GridView / ObjectDataSource problem Pin
Robin C7-Sep-06 11:12
Robin C7-Sep-06 11:12 
GeneralRe: GridView / ObjectDataSource problem Pin
minhpc_bk7-Sep-06 22:56
minhpc_bk7-Sep-06 22:56 
QuestionInfragistics ultrawebgrid Pin
shivarishxxxx6-Sep-06 4:17
shivarishxxxx6-Sep-06 4:17 
AnswerRe: Infragistics ultrawebgrid Pin
g00fyman6-Sep-06 4:43
g00fyman6-Sep-06 4:43 
GeneralRe: Infragistics ultrawebgrid Pin
shivarishxxxx6-Sep-06 5:05
shivarishxxxx6-Sep-06 5:05 
QuestionRuntimeTabstrip Control Pin
shivarishxxxx6-Sep-06 3:22
shivarishxxxx6-Sep-06 3:22 
AnswerRe: RuntimeTabstrip Control Pin
g00fyman6-Sep-06 3:50
g00fyman6-Sep-06 3:50 
GeneralRe: RuntimeTabstrip Control [modified] Pin
shivarishxxxx6-Sep-06 4:13
shivarishxxxx6-Sep-06 4:13 
GeneralRe: RuntimeTabstrip Control Pin
g00fyman6-Sep-06 4:41
g00fyman6-Sep-06 4:41 
QuestionAuthentication Problems Pin
HRiazi6-Sep-06 3:18
HRiazi6-Sep-06 3:18 
AnswerRe: Authentication Problems Pin
g00fyman6-Sep-06 4:49
g00fyman6-Sep-06 4:49 
AnswerAuthentication Problems Pin
Britney S. Morales6-Sep-06 11:03
Britney S. Morales6-Sep-06 11:03 
GeneralRe: Authentication Problems Pin
Not Active6-Sep-06 11:15
mentorNot Active6-Sep-06 11:15 
QuestionGof Design pattern Pin
Parwej Ahamad6-Sep-06 3:09
professionalParwej Ahamad6-Sep-06 3:09 
AnswerRe: Gof Design pattern Pin
Colin Angus Mackay6-Sep-06 3:15
Colin Angus Mackay6-Sep-06 3:15 
AnswerRe: Gof Design pattern Pin
g00fyman6-Sep-06 3:42
g00fyman6-Sep-06 3:42 
AnswerRe: Gof Design pattern Pin
Not Active6-Sep-06 6:50
mentorNot Active6-Sep-06 6:50 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.