this might seem like a silly question, but m having a problem with my grid view, each time i insert a new item into it, the grid view goes like one line down!, so how can i maintain the position of the grid view?
View Complete Post
I have a problem displaying data in a Grid View control when I set a row to visible = false when a certain condition is true.
For example, if a DataRowData value has a condition set to true (custom in table) I set the visible property to false, so the data row will not be visible at run time.
The problem is that I'm using paging (10 rows per page) and if 8 of those rows fall into the true condition that won't show the row, that grid view page will only show two rows of data in page 1. The worst scenario is that if I go to page 2 of the grid view and all the rows (10) fall into the true condition, that grid view page will not show any data at all.
How can I show 10 rows of data at all times in a gridview? In other words, I would like to just show the visible rows at all times.
Any help will be greatly appreciated.
You'll have to excuse my ignorance, I'm coming at this from a front-end perspective, and don't really know how to deal with data views in ASP.NET.
Basically, I'm trying to change the layout of some repeated data from a straight table, to something more design-heavy. It's the same data, just re-organised slightly. The current ASP.NET code looks like this:
<asp:GridView ID="GVMoments" runat="server" AllowPaging="True" AllowSorting="True"
AutoGenerateColumns="False" PageSize="20" RowHeaderColumn="FirstName"
<PagerSettings Mode="NumericFirstLast" PageButtonCount="20" Position="TopAndBottom" />
<asp:BoundField DataField="moment_id" HeaderText="moment_id" ReadOnly="True" SortExpression="moment_id"
Hi Gurus ,
It happened to add an extra Gridveiw Header in row_databound event , It did worked fine on !Postback but disappered on Page.Postback . Quick google search guided me to move the event to Row_Created event and every thing is okay .
Can any expert post some pointers , differnces between grid row_created vs row_databount with some sample table data created dynamically behaviour of both the events in !Postback and page.Postback .
Thanks a tonne in Advance and any inputs will be valued and appreciated .
i have a table there is 17 columns in 17 column 3 are number and other are varchar . when i try to display all data of that column error occures.
one more intersting think is when i try to display 6 column then grid show there data an no more error occures.
when i run my project this error occures in grid view
Arithmetic operation resulted in an overflow.