Find The Number Of Expanded / Collapsed Master Rows And Grouped Rows In A DevExpress GridView?

Jan 18, 2012

I am currently using DevExpress 10.2 within Visual Studio 2010. In a previous question I was trying to print the current user view of a DevExpress GridControl with the user's choice of expanded or collapsed master rows and/or group sections. I was told this was not possible at this time. I have now decided to use the following code:

[Code]...

View 1 Replies


ADVERTISEMENT

GridControl - How To Get Total Number Of Master And Grouped Rows

Jan 25, 2012

I found out how to keep track of the currently expanded grouped rows by using 2 events:
- gridview.GroupRowExpanded
- gridview.GroupRowCollapsed

Where I increase or decrement an integer that keeps track of how many group rows are currently expanded. I am now tackling the problem of what to do if the user expands or collapses all of the group rows. I currently know when this is done by checking the e.RowHandle. Any way to find the total number of groups rows currently in the GridView (something like rowcount for normal rows) so I know how many to set the tracking integer to.

For Example: If my current count is 2 and the total number of groups are 15 then when the Expand All is fired the current count is set to 15 rather than 3.

View 1 Replies

VS 2008 Insert Rows In Between Rows In Gridview Based On The Parent And Child Nodes?

Jan 20, 2011

I am working on Treeview control and Gridview Control VB.NET08. In the Treeview i have Parent and Child Nodes. Like:

- 31
3101
3102

[Code].....

View 6 Replies

Add Rows Inbetween Rows In Gridview Based On Parent And Child Node

Jan 19, 2011

I am working on Treeview control and Gridview Control VB.NET08. In the Treeview i have Parent and Child Nodes. Like: [Code] Comparing the Parent Node text and first two digits in the Column values. I want to add rows inbetween the gridview rows based on the parent and Child Nodes. If i expand the First Parent Node Called "31" then according to the Number of Child Nodes (for first parent node(31) there are 5 child nodes.) add rows in the gridview.

These New rows should be add under the 31-xxxx. If i expand the 32 Parent Node based on number of Child Nodes, add rows under the 32-xxxx. [Code] I am getting the rows in the end of the Gridrow not in the Specific row.

View 1 Replies

TreeNode Always Expanded - Preventing Nodes From Being Collapsed?

Mar 10, 2009

I'd like my TreeView's nodes to always be expanded. Is there an elegant way of preventing nodes from being collapsed?

View 4 Replies

VS 2008 - Lock Grid Rows To The Number Of Rows In The Data Table?

Jul 27, 2010

when populating a data grid i keep getting a redundant row in the bottom. is there a way to lock grid rows to the number of rows in the data table?

View 1 Replies

Create Sections Of Code Which Can Be Collapsed And Expanded Like A Normal Public Or Private Sub?

Mar 8, 2011

I have been told before that it is possible to create sections of code which can be collapsed and expanded like a normal Public or Private Sub, but containing multiple Public Subs So say I have code for a variety of textboxes I wanted to be able to collapse, how would I do this?

View 3 Replies

Setting A Value In Parent Row For A Column That Is Grouped Sets Child Rows To Nothing

Apr 13, 2012

i have a Janus grid, which has two columns and the rows are organized in a hierarchical order i.e. parent and child rows. One of the columns in the grid is grouped (by dragging the column in the group by box above the grid). I have a cell-changed event that is fired when a cell content is changed. I do this in the cell-changed event:[code]If i change the value, in a parent row, of the grouped column then the child rows are set to Nothing. After the last line in the above snippet, child rows of row are set to Nothing. On the other hand, this problem does not occur if i change the value of the other column (which is not in the group by box). The problem occurs only if i group a column and change its value not otherwise.

View 1 Replies

Find Out The Total Number Of Rows In A Database Through Datareader?

Feb 18, 2009

how to find out the total number of rows in a database through datareader

View 3 Replies

Database - Find Average Of A Specific Number Of Rows/columns In Datatable And Store To Array?

Jun 21, 2012

I am trying to program a noise reduction algorithm that works with a set of datapoints in a VB.NET DataTable after being helped with my other question. Basically, I want to take two integers, a coordinate value (yCoord for example) and a threshold smoothing value (NoiseThresh), and take the average of the values in the range of (yCoord - NoiseThresh, yCoord + NoiseThresh) and store that number into an array. I'd repeat that process for each column (in this example) and end up with a one-dimensional array of average values. My questions are:

1) Did anything I just say make any sense ;), and

2) Can anyone help me with the code? I've got very little experience working with databases.

[Code]...

View 1 Replies

Convert GridView Table To Html Table But Rows Should Be Columns And Columns Should Be Rows

Aug 18, 2011

I have Dataset ds filled up with values Until now I was displaying values in GridView. Now I want that all the rows should be columns and columns should be rows.I have 2 options: Either 1 I can directly convert grid to columns and display it, or 2 I can convert the GridView to html and then write loops to convert. I was trying the 2nd option but I cant figure out how I should do that.[code]With this code I am still getting same as GridView. Please help me for converting rows to columns and vice versa.

View 1 Replies

Add Rows To Gridview From Strings?

Mar 29, 2012

I want to make a gridview with 4 columns. (Checkbox, Hyperlink name Title, Dynamic name Price, Dynamic named ASIN#)I want to be able to add new rows to the gridview from three different strings. I have a function that looks like this:Private Sub displayData(title As String, cost As String, asin As String)Is it possible to even add new data to the gridview with these strings.I've looked all around online and most things deal with databases. I'm also not 100% sure how to initialize at gridview.

View 1 Replies

Clear The Rows Out Of A Gridview?

May 27, 2009

How do you clear the rows out of a gridview

View 1 Replies

Filtering Rows In A Gridview?

Apr 4, 2012

I have a gridview that contains user info and one of the columns is a date when the user was added to the system. Is it possible to use the GridView.onRowCreated method to check if the user was added within a given time frame? If the user was added within that timeframe, then the row is added, if not, then that row is not added.

Note that I can't modify the datasource of the gridview, so I need to do this somehow as the gridview is being created.

View 2 Replies

Rows Of A Gridview With More Than One Page?

Mar 6, 2012

Is it possible to loop through a gridview with more than one page, the gridview I'm looking at has a pageSize of 20, there are say 26 records (over two pages) and I want to be able to loop though all the records.

For Each row As GridViewRow In GridView.Rows The count of the above is only 20 as the pageSize is set to 20, I can see that the pagecount is 2 but how do you loop through the next page in a gridview? Or would I have to just iterate through the orginal datasource?

View 2 Replies

Count The Number Of Affected Rows And Display The Number In A Messagebox?

Jan 8, 2012

how do i count the number of rows that are affected when I updated a table, and display the number of affected rows in a message box ??

here is my code for updating the table ...

For Each row As DataGridViewRow In DataGridView1.Rows
req = row.Cells(Column1.Name).Value
If row.Cells("Column1").Value = True Then

[Code].....

View 1 Replies

Asp.net - Dynamic GridView Has 0 Rows On RowCommand

May 14, 2009

I have a dynamically-created GridView which to which I'm attaching a handler using the AddHandler command. The problem is that when I try to refer to sender.rows within that function, it won't do anything because it says that sender.rows.count = 0. I've done enough dynamic form creation that I'm pretty sure that I'm creating the controls, binding them, and adding the handler at the proper points during the page init/load load_complete. Also, I have nearly the exact same code-behind on another form that is not dynamic, and it is able to access the values in the rows.

Considering that the RowCommand event is firing, it's clear that I'm clicking on a row. For some reason it's just not in scope for the handler event. Background: What I really want to do is access the values that are databound to the row. I'm creating a SQLCommand and binding that to the dynamic grid, and I would prefer to talk to the grid's datasource, but that doesn't seem to be possible. Perhaps I'm missing something, but for now it seems that reading the values from the GridView (which I hate doing) is the only thing that works.

[Code]...

View 2 Replies

Asp.net - One Checkbox To Control Gridview Rows?

May 11, 2012

How can I implement the following:I would like to have a checkbox on the top of my gridview. When checkbox is checked should show all the hidden rows from the gridview but when is unchecked should only show the unhide ones.

I only need 1 checkbox at the top(not in the header of the gridview), I found couple of examples but all of the have checbox as coulumn and then added to the header as well.

View 1 Replies

Can't Get GridView's RowDataBound Update Rows After The First Row?

Oct 14, 2011

I have asked a question similar to this in the past. I was able to resolve it by removing gvRowDataBound completely from the code. This is similar code except I can't remove gvRowDataBound sub.

The issue is that when you click the Edit button of the first row, it allows you to successfully update that row.After the first row, if you click on thr edit button of any other row, enter the value to update, it doesn't update that row.

Instead, the cursor moves down to the next row. I didn't design this and having difficulty figuring out what needs to change.

[Code]...

View 1 Replies

Delete All Rows In SQL Gridview Is Deleting All But 1 Row

Feb 15, 2010

So I've created a gridview with checkboxes so the user can check as many fields as they want and delete them with the click of a button. It works except that it deletes all selected rows except one, the row with the lowest number. I can't firgure out what logic error is causing this.

Here's the code for the delete button procedure:

Protected
Sub btnDelete_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnDelete.Click
Dim count As Integer = 0

[Code]....

View 6 Replies

Filter Gridview Rows With Checkbox?

Mar 6, 2011

I would like to filter Gridview1 with, control checkbox, and code as "If GridView1 rows of column FirstName have value 'John' then show only this rows."I have somehow with network help write this code. But code is not working as it should, and also I do not know how to add controls also for other rows with values such as 'James', 'Paul'...

For Each x As GridViewRow In Me.GridView1.Rows
If Not x.Cells(0).Value = "John" Then
x.Visible = False

[code]....

View 3 Replies

How To Export Selected GridView Rows

Jan 11, 2011

I have a gridview which gets its input from a database with sql. There is a column with checkboxes in the gridview, so you can select which row you want to export. There is also a column that's called "Project Number". When you push the button "Export" the program should figure out which row is selected, get the project number from this row and connect to the database to get the data from the selected projectnumber. I already got the part where it gets the selected checkboxes. But I'm stuck at the part where it gets the projectnumber from the selected row. Must be something with Datakeys I think.

View 2 Replies

Insert Multiple Rows In Gridview?

Aug 13, 2010

I have the following code to add a new row into a datatable and then bind it to a gridview.I need to add a new row anytime i click the Button2.What do i need to change in the code so i can have multiple rows before i submit them to a database?

Private Sub BindGrid()
Dim DT As New DataTable
Dim Row As DataRow

[code]....

View 1 Replies

One Checkbox To Control Gridview Rows?

Apr 25, 2010

How can I implement the following:I would like to have a checkbox on the top of my gridview.When checkbox is checked should show all the hidden rows from the gridview but when is unchecked should only show the unhide ones.

View 6 Replies

Remove Rows From Gridview With Jquery?

Dec 7, 2011

I am new using Jquery. I am using vb.net 2008, and I have built a gridview and populated it with data. I am trying to use jquery to go in and remove rows if one of the attributes of the row does not equal the user that I am currently looking at.

View 1 Replies

VS 2008 (DataGridView) :: Delete Successful Inserts Of Rows And Move Rows Up?

Jul 30, 2010

How would i delete only the successful inserted rows for insert and then move the non successful rows up and allow the user to correct the data and get it ready for an insert. If i dont delete the successful rows then i will have multiple inserts of the same dataRow and we dont want that! AND if i dont move the data up then it will have blank rows uptop and will end the try and not insert the corrected data. You can better see what logic i am trying to perform at the bottom of my code, right after I insert into the database. Here is my code.

Private Sub btnLaserGenerateTicket_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnLaserGenerateTicket.Click
'Function declarations

[code]....

View 1 Replies

VS 2010 : Combine Similar Rows In A Datatable (the Rows Only Differ By One Column)?

May 8, 2012

I have three sub tables that I want to process. For each I want to combine the rows, as they are only different by contents in the second column(I want to do the same to the fourth column, later):

'Sub table 1
xx|C201 |02300877 |Samsung |....
xx|C201 |02300877 |Toshiba |....
xx|C213 |02300877 |Samsung

[code]....

p.s. For the fourth column, Manufacturer information , I want to do the same and I'd probably get something like this for the final table:

xx| C201,C213,C606,C619 |02300877 | Samsung
xx| C201,C213,C606,C619 |02300877 | Toshiba
xx| C303, C305,C712 |02301163
xx| C207, C209, C708 |02301165

View 5 Replies

Asp.net - GridView : 2 Rows Selected And Nonexistent RowState Of 3?

Nov 4, 2010

In RowCreated of the GridView i add following script to select a row:

Select Case e.Row.RowType
Case DataControlRowType.DataRow
e.Row.Attributes("onclick") = Me.Page.ClientScript.GetPostBackClientHyperlink(Me.MainGrid, "Select$" & e.Row.RowIndex)
End Select

This works like a charm(i thought).But when i debug the SelectedIndexChanging and the following SelectedIndexChanged events, i observe that the RowState of the selected Row switches from normal{0}/alternate{1} to 3 instead of selected{2}. This occurs between SelectedIndexChanging and SelectedIndexChanged. Why does this happen? The next time i programmatically set the selectedIndex(f.e. after a new row was created), i have two rows that are selected and no (un-hacky) way to deselect the old in RowDataBound, because of the invalid RowState of 3(should only be 0,1,2,4 or 8).

View 1 Replies

Asp.net - Selecting A Rows In The Standard .net 2.0 GridView Using JavaScript?

Mar 20, 2009

how i can get the grid to select a row by clicking on any cell in the row?

The only way i can do this at the moment is by setting the AutoGenerateSelectButton property to True, but this adds a column to the grid with a crude "select" hyperlink and only selects the row if the word "Select" is cliked on.

View 2 Replies

Creating A Unique URL From Selecting Different Rows In A Gridview?

Sep 30, 2010

Whenever a row is selected in my GridView, I want to take the ID field of my gridview's dataset and form a unique URL with it (use a ?id=1234 parameter). In the Page_Load event I have the following code:

TextBox1.Text = Request.Url.AbsoluteUri.ToString & "?id=" & _
GridView1.SelectedIndex.ToString & Environment.NewLine

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved