Results 1 to 3 of 3

Thread: [RESOLVED] [02/03] turn form into a user control problem

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Sep 2005
    Posts
    586

    Resolved [RESOLVED] [02/03] turn form into a user control problem

    Hi,

    (visual studio 2003)

    I've made a form with a grid that displays records from an sql table, and allows the user to sorts it when clicking on its colums.

    the code works ok when I use it as an aspx form, but when I'd like to make it into a user control - when I click the columns, or try to click any of the buttons, the form just refreshes without doing anything.



    when I converted this code to a user control all I did was to create a new user control and then copy the html and codes (all of it from right after the initial declarations)


    here's a part of my code:



    <asp:datagrid id="Dg" runat="server" Height="160px" Width="672px" AutoGenerateColumns="False"
    AllowSorting="True">
    <Columns>
    <asp:TemplateColumn>
    <ItemTemplate>
    <asp:CheckBox ID="chkSendMasil" Runat="server" Checked="false"></asp:CheckBox>
    </ItemTemplate>
    </asp:TemplateColumn>
    <asp:TemplateColumn>
    <ItemTemplate>
    <asp:Button id="Delete" runat="server" Text="delete record" CommandName="Delete" />
    </ItemTemplate>
    </asp:TemplateColumn>
    <asp:BoundColumn DataField="ID" SortExpression="ID" HeaderText="#"></asp:BoundColumn>

  2. #2
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: [02/03] turn form into a user control problem

    Set a breakpoint, are any of the events actually being hit, related to the grid?

  3. #3

    Thread Starter
    Fanatic Member
    Join Date
    Sep 2005
    Posts
    586

    Re: [02/03] turn form into a user control problem

    solved, I just did the process all over again and now it works.

    thanks,

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width