Click here to Skip to main content
15,887,135 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: I want column wise gridview paging Pin
joginder-banger25-Dec-13 15:41
professionaljoginder-banger25-Dec-13 15:41 
QuestionNew Pin
tsunamigang17-Dec-13 17:27
tsunamigang17-Dec-13 17:27 
AnswerRe: New Pin
thatraja17-Dec-13 23:35
professionalthatraja17-Dec-13 23:35 
QuestionUsing gridview onrowcommand on saving and displaying the data? Pin
Member 840570017-Dec-13 1:38
Member 840570017-Dec-13 1:38 
AnswerRe: Using gridview onrowcommand on saving and displaying the data? Pin
Tom Marvolo Riddle17-Dec-13 2:05
professionalTom Marvolo Riddle17-Dec-13 2:05 
GeneralRe: Using gridview onrowcommand on saving and displaying the data? Pin
Member 840570017-Dec-13 6:28
Member 840570017-Dec-13 6:28 
GeneralRe: Using gridview onrowcommand on saving and displaying the data? Pin
Tom Marvolo Riddle17-Dec-13 17:44
professionalTom Marvolo Riddle17-Dec-13 17:44 
GeneralRe: Using gridview onrowcommand on saving and displaying the data? Pin
Member 840570018-Dec-13 5:32
Member 840570018-Dec-13 5:32 
I tried to use the new mark-up you gave me and I also tried to put the child gridview inside the updatepanel and the last mark up I finally came up to is shown below so I was modifying the mark-up for the third time but none of them works, the problem is getting worse because my gvParentGrid_RowCommand is not firing anymore and it does nothing no matter how many times you click the button. What did we miss from this? Here's my update mark-up on my webform...

ASP.NET
asp:GridView ID="gvParentGrid" runat="server" Width="395px"
AutoGenerateColumns="false"  GridLines="None" BorderStyle="Solid" BorderWidth="0px"
            BorderColor="White" DataKeyNames="ID" onrowcommand="gvParentGrid_RowCommand"
            onrowdatabound="gvParentGrid_RowDataBound" >

<Columns>
<asp:TemplateField >
<ItemTemplate>

 <tr>
     <td id ="comment" class ="highlightab" style ="border-bottom :2px solid Blue;border-bottom-color :Gray; border-left :0px; border-left-color :White; border-right :0px; border-right-color :White; border-top :0px; border-top-color :White;background-color :White;border-bottom :2px solid Blue;border-bottom-color :Gray; border-left :0px; border-left-color :White; border-right :0px; border-right-color :White; border-top :0px; border-top-color :White;background-color :White; height :100px; width :395px; margin-bottom :5px">
              
               <asp:Image ID="Image1" runat="server" style="  margin-right :5px; background-image :url('Image/imagebackground.png');"  ImageAlign ="Left" Height ="60px" Width="60px" />
               <asp:Label ID ="ComID" runat ="server" style="display :none" Text =' <%#Eval("ID") %>' />
              <asp:Label ID="name" runat="server"  Font-Bold="True" Text='<%# Eval("Name")%>' ForeColor="Blue"></asp:Label>
             <p id ="content" class="minimize" style =" border-radius: 4px 4px 4px 4px; max-width :395px; min-height :5px; margin-top :5px; margin-bottom :5px; margin-left :65px; display :block; background-color: #CCCCFF;"> <%# DataBinder.Eval(Container.DataItem,"Comments").ToString() %> </p>
           <a href="JavaScript:divexpandcollapse('div<%# Eval("ID") %>');" style ="margin-left :65px; margin-top :1px" >
             <input id="btndiv<%# Eval("ID") %>" type="button" value="Reply" style ="border:0px; background-color :White; color :blue; cursor :pointer " />
          </a>
               
     </td>
 </tr>
                      
</ItemTemplate>
</asp:TemplateField>

<asp:TemplateField>
<ItemTemplate>

 <asp:UpdatePanel ID="UpdatePanel1" runat="server">
       <ContentTemplate>
  <!--This is the child gridview -->
<div id="div<%# Eval("ID") %>" style="display: none; position:relative; left: 65px; overflow: auto; margin-top :1px">

<asp:GridView ID="gvChildGrid" runat="server" AutoGenerateColumns="false" BorderStyle="Double"  BorderColor="white" GridLines="None" Width="325px" onrowcommand="gvChildGrid_RowCommand" onrowdatabound="gvChildGrid_RowDataBound">

<Columns >

<asp:TemplateField >
<ItemTemplate >
<tr>
  <td style ="border-bottom :2px solid Blue;border-bottom-color :Gray; border-left :0px; border-left-color :White; border-right :0px; border-right-color :White; border-top :0px; border-top-color :White;background-color :White; height :100px; width :325px">
  
 <asp:Image ID="Image1" runat="server" style=" margin-right :5px; background-image :url('Image/imagebackground.png');"  ImageAlign ="Left" Height ="60px" Width="60px" />
 
 <asp:Label ID="name" runat="server"  Font-Bold="True" Text='<%# Eval("Name")%>' ForeColor="Blue"></asp:Label>
 <p id ="content" class="minimize" style =" border-radius: 4px 4px 4px 4px; max-width :325px; min-height :5px; margin-top :5px; margin-left :65px; display :block; background-color: #CCCCFF;"> <%# DataBinder.Eval(Container.DataItem,"Replies").ToString() %> </p>
    
  </td>
</tr>
</ItemTemplate>
</asp:TemplateField>
  
</Columns>

</asp:GridView>


<!-- This is the inputbox and the reply button -->
<asp:Label ID="Label3" runat="server" Text="Name"></asp:Label>
   <br />
  <asp:TextBox ID="TextBox3" runat="server"></asp:TextBox>
  <br />
  <asp:TextBox ID="TextBox4" Height ="200px" Width ="325px" TextMode ="MultiLine" runat="server"></asp:TextBox>
  <br />
  <asp:Button ID="Button2" runat="server" Text="Post Reply" CommandName="reply" />

</div>
</ContentTemplate>
<Triggers>
  <asp:AsyncPostBackTrigger ControlID="Button2" />
</Triggers>
    </asp:UpdatePanel>   

</ItemTemplate>
</asp:TemplateField>
</Columns>

</asp:GridView
>
GeneralRe: Using gridview onrowcommand on saving and displaying the data? Pin
Tom Marvolo Riddle18-Dec-13 17:23
professionalTom Marvolo Riddle18-Dec-13 17:23 
GeneralRe: Using gridview onrowcommand on saving and displaying the data? Pin
Member 840570019-Dec-13 4:44
Member 840570019-Dec-13 4:44 
GeneralCustomize MVC Help Pin
shki17-Dec-13 0:19
shki17-Dec-13 0:19 
GeneralRe: Customize MVC Help Pin
JV999917-Dec-13 0:23
professionalJV999917-Dec-13 0:23 
JokeRe: Customize MVC Help Pin
Kornfeld Eliyahu Peter17-Dec-13 0:28
professionalKornfeld Eliyahu Peter17-Dec-13 0:28 
GeneralRe: Customize MVC Help Pin
JV999917-Dec-13 0:31
professionalJV999917-Dec-13 0:31 
GeneralRe: Customize MVC Help Pin
OriginalGriff17-Dec-13 0:44
mveOriginalGriff17-Dec-13 0:44 
GeneralRe: Customize MVC Help Pin
devenv.exe17-Dec-13 0:35
professionaldevenv.exe17-Dec-13 0:35 
GeneralRe: Customize MVC Help PinPopular
Pete O'Hanlon17-Dec-13 0:44
mvePete O'Hanlon17-Dec-13 0:44 
GeneralRe: Customize MVC Help PinPopular
Chris Maunder17-Dec-13 2:11
cofounderChris Maunder17-Dec-13 2:11 
GeneralRe: Customize MVC Help Pin
Simon Lee Shugar17-Dec-13 1:40
Simon Lee Shugar17-Dec-13 1:40 
AnswerRe: Customize MVC Help Pin
Rahul Rajat Singh19-Dec-13 18:25
professionalRahul Rajat Singh19-Dec-13 18:25 
QuestionAllow / Deny IP Address via Web.config Pin
Member 947380916-Dec-13 23:05
Member 947380916-Dec-13 23:05 
AnswerRe: Allow / Deny IP Address via Web.config Pin
Richard Deeming16-Dec-13 23:28
mveRichard Deeming16-Dec-13 23:28 
AnswerRe: Allow / Deny IP Address via Web.config Pin
joginder-banger25-Dec-13 15:55
professionaljoginder-banger25-Dec-13 15:55 
QuestionWebsite appearance format Pin
Otekpo Emmanuel16-Dec-13 5:19
Otekpo Emmanuel16-Dec-13 5:19 
AnswerRe: Website appearance format Pin
jkirkerx17-Dec-13 12:31
professionaljkirkerx17-Dec-13 12:31 

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.