Forms Data Controls :: Gridviewhelper Cannot Subtotal 2 Column
Sep 15, 2010gridviewhelper cannot subtotal 2 column
Name HD CPU
A 1 2
A 3 3
4 5
gridviewhelper cannot subtotal 2 column
Name HD CPU
A 1 2
A 3 3
4 5
I have a gridview which is placed inside an updatepanel and a button outside the panel. And each gridview rows contains a radio button with 2 options. When i clicks on the button, an asynchornos post back occurs and I am vlidating the radio button values inside serverside button_click method, and shows an alert if any of the radio button is not checked. Everything is working fine till this point. Then i have introduced a GridViewHelper class[URL]for grouping the categories and displaying it as a group header. This also working fine when the page is loaded for the first time. For creating the group header, below code is placed inside the Page_Load event as mentioned in the link above:
Dim gvhelper As GridViewHelper
gvhelper = New GridViewHelper(Me.GridView1,
False, SortDirection.Ascending)
gvhelper.RegisterGroup("surveyqngroup",
True,
True)
'where "surveyqngroup" is the field name used for grouping
The real problem occurs when i click on the button. Asynchronospostback occurs, serverside method is called, after validating it shows the alert also. But the gridview rows mess up. An extra radiobutton appears in the group header row. Also few rows are missing from the gridview.
i need to export the gridview report which i created using GridViewHelper Class.
View 1 RepliesI am using the GridViewHelper [URL]to display gridview with group and subtotals. This seems to only work on BoundField and I am wondering how to get this work with TemplateField.
Dim helper As New GridViewHelper(Me.GridView1)
helper.RegisterGroup("DeptDesc", True, True) - Works
helper.RegisterSummary("Reg", SummaryOperation.Sum, "DeptDesc") - Throws Error Below
helper.ApplyGroupSort()
DataBinding: 'System.Data.DataRowView' does not contain a property with the name 'Reg'.
<asp:BoundField DataField="DeptDesc" HeaderText="DeptDesc" SortExpression="DeptDesc" />
<asp:TemplateField HeaderText="Reg" SortExpression="Reg">
<ItemTemplate>
<asp:Label ID="Label2" runat="server" Text='<%# IsSplit(Eval("EmployeeID")) %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
How to do sum 2 differences fields as a new column in Subtotal ? I know to do in Microsoft Access and that is easier.
View 2 RepliesI have trawled through the entire web and found that most examples show how to add a total to the footer.
However, I am not after this and I want to add a total for the column 'Office sqm' for each group of addresses ONLY when the value of the 'Summed' is equal to Yes.
[code]....
On behalf of this article : [URL] .....
Lets assume i have four columns
Sr Company Date Billing amount
1 Imtiaz Super Market 11/12/1991 2000
2 Naheed mart 11/12/1991 4000
3 Imtiaz Super Market 11/12/1991 3000
Now it must group by the company name and show running total and net total like :
Sr Company Date Billing amount
1 Imtiaz Super Market 11/12/1991 2000
2 Imtiaz Super Market 11/12/1991 3000 5000
3 Naheed mart 11/12/1991 4000
4 Naheed mart 11/12/1991 5000 9000 14000
NOTE : it must support paging and must be binded with data table
i am trying to add subtotal in gridfooter with has grid inside grid
View 1 RepliesI have a gridview which is binded to a Sqldatasource. I would like to replace a column data field value to 'Not Applicable' if that column has got a value of 2 in database.
View 2 RepliesI am looking to sort a column on my gridview by simply clicking on the column rather than clicking on the column header. In the design I have been given, the column header will not be shown, and I need to be able to give the user to sort this column, by simply just clicking any where on the column.
View 2 Repliesi have a grid view and i use TemplateField.
when i am in ItemTemplate all the column (7 column) are label so it fit to the current screen
by when i use EditItemTemplate or InsertItemTemplate the coulmn don't fit the the current screen and
i have to use the ruler in order to see more information about the cell (which is ok - because in each cell i have a dropdownlist or long textbox)
but when i drag the ruler to the right size to see more information only the cells are moved but the header coulmn stay so i see the current coulmn with worng header coulmn
I'm currently working on a small project and therefore created a gridview, including one bit column which has been linked with a checkbox in both the itemtemplate as the edititemtemplate (autopostback = true).Databinding for these two checkboxes has been linked (two-way) to the bit column.Now I want to display the gridview to end-users. They should be able to just click on the checkbox so they value in the database column gets changed as well (as I want to run update queries behind it), but not passing via the command column 'EDIT'.=> problem I'm having now is that the bit column in the database doesn't get updated.
View 3 Replieswant to display gridview column heading when mouse over to the particular column in the gridview.
View 9 Replies[Code]....
Stacked-column chart has inconsistent column segment widths
How to add a button at first column of gridview and get cell value in another column?
For example, add a button named it as "Click me". Once user clicks will get third column cell's (ID) value.
I have a gridview which has a column of auto generated select buttons, where a user can select a row.However, I would like to add a column header to my auto generated select buttons in order to make the gridview look complete, but I am unable to see how I can do this. Does anyone know how I can add a header text to an auto generated select button?
View 2 RepliesNo sense in showing a competely blank column. how to make a GridView column invisible if every cell in that column is empty?
View 3 RepliesI have a gridview with 3 columns. In second column I want to display some text in 2 rows and then a gridview.
Here is my code:
[Code]....
The problem is my third row is displayed as a row under first column. How do I make it a separate column in my girdview. Not sure what is going wrong.
I have gridviwe having 2 columns:
1) DocNumber 2)Title
query select docnumber,title from tbl_docs.
BindwithGridviwe(sql);
Now the issue is that that every document doesn't has document number. I want to make invisible the docuNumber column of the grid viwe if all values in the docNumber retrieved are null.for example:
docnumber tite
null Document 1
null Document 2
null doucment 3
null document 4
if returned result match above where all docnumber are null then make the gridviwe docnumber column ivisible eslemake the greidviwe column visible.
I am using GridView ,I want to do a validation like if i edit any one of the Cell in that column, it will through the validation when the sum of column value is more than 100. How can i do this validation?
View 10 RepliesSituation: SQL database, Linq to SQL class a ASP.NET page with a LinqDataSource and a gridview. The table has a ID field, a date field and a Serialnr field. In my Grid I like to Page on the datefield but to sort on the serialnr field ( or a selectable other field). Is that possible? Standard the paging is always done on the sort field and when you select a different sort field the page jumps back to the first page., and paging is then done over that sorted column.
View 2 RepliesI have a boundcolumn that outputs string numbers. I have another column of checkboxes next to it. I need to have it so that when a user checks off a check box the value stored in the string column to the left is then plugged into a function on the server. How can I acheive this?Here is my code:
[Code]....
[Code]....
I am stuck to get the second column value based on first column value. I have tableone:
Pid uit
22 as
23 dd
22 cc
24 vv
24 bb
The girdview will show pid and number of uit based on first column pid
Pid number of uit
22 2
23 1
24 2
Here is my code.
ID="GridView1" runat="server" AutoGenerateColumns="False" DataKeyNames="PID" DataSourceID="SqlDataSource1">
<Columns>
<asp:BoundField DataField="PID" HeaderText="PID" ReadOnly="True" SortExpression="PID" />
[Code]....
However, the function: <%# TotalByQty("PID")%> did not get first column value and still is pid.
i am having a problem in counting subtotal in a gridview in asp.net
the gridview contains details like
[code].....
i need to calculate the sum of the user entry for each item and display into the resultant lable.
when ever the user entry is made the value in the result lable should be updated,i am binding a javascript function to the userentry textbox in rowdatabound event in code behind.in the javascript i am able to roll over all the rows of table using jquery, and calculate the value. here is the catch, the labletodispresult should be for that item group only, i.e. i need to get the sum of userentry for A -1,A-2, A-3 rows and seperately for B-1,B-2,B-3 rows, the i am using a class for the userentry textbox, and using this
[code]...
this gives me all the textboxes sum value, but i need the values based on the Item group.
I'm using reporting services in visual studio 2005.
I'm using a matrix and it looks like this.
[code]....