Help me Please Friends
-
Friends, I want to hide the item of last row named(Down) inside my gridview. It is a linkbutton. I have already done how to hide first row but I don't understand how can I find the last row or total rows inside the gridview. To hide the first row I am using following method < asp: linkbutton ID="lblUp" runat="serveR" Font-Underline="true" ForeColor="blue" Text="Up" Visible="<%# IIf(CType(Container, GridViewRow).RowIndex = 0, false, true) %>" CommandName="MoveUp" CommandArgument="<%# Container.DataItemIndex %>" > Please note that I am using this linkbutton in Item Template. Please help me in this regard.
-
Friends, I want to hide the item of last row named(Down) inside my gridview. It is a linkbutton. I have already done how to hide first row but I don't understand how can I find the last row or total rows inside the gridview. To hide the first row I am using following method < asp: linkbutton ID="lblUp" runat="serveR" Font-Underline="true" ForeColor="blue" Text="Up" Visible="<%# IIf(CType(Container, GridViewRow).RowIndex = 0, false, true) %>" CommandName="MoveUp" CommandArgument="<%# Container.DataItemIndex %>" > Please note that I am using this linkbutton in Item Template. Please help me in this regard.
Please 1 - don't double post 2 - use a header that makes sense You will need to store the number of rows in your data source, or the size of a page, then you can write similar code to work based on that data. Without the row count, you're kind of hosed.
Christian Graus - Microsoft MVP - C++ "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )