Tracking Forums, Newsgroups, Maling Lists
Home Submit Tracker Forums
  Advanced Search


Forms Data Controls :: Indentation In Gridview ?

i have problem in gridview when i want to indent certain items as subcategory below main fetching the data all rite from sql
but when its binding gridview removes all spaces and it display all in same fashion eg.i want it this way


im able to fetch it this way using sql

but while binding it shows


View 1 Replies (Posted: Oct 07, 2009 07:10 AM)

Sponsored Links:

Related Forum Messages For ASP.NET category:
Show The Source Code In Indentation Form - HTML Source Indentation Tools?
In my application, users import their HTML content. I need to show the source code in indentation form. How can I do that ?Even I am looking for 3rd Party tools, but I am not able to find with good indentation capabilities.

Posted: Nov 04, 2008 12:36 PM

View 4 Replies!   View Related
Web Forms :: Treeview Indentation Not Proper For Last Node?
I am working with the treeview control and binding it dynamically using the treeview_TreeNodePopulate method.The code works perfectly fine and treeview behaves as it has to.However, I am facing one annoying issue in the display of the treeview, the last node and its child do not align properly with the top nodes. Check the image below for better understanding,Note: I have blocked the text of options deliberately.So as you can notice that the child nodes of Level 3 are not getting aligned with that of Level 1 and 2.


In the code behind, PopulateNode event fires for every node and I bind the child nodes for that node dependant on the Business logic.

Posted: Dec 28, 2009 08:51 PM

View 3 Replies!   View Related
Visual Studio Forcing Indentation?
I am having a problem editing VB.NET .aspx pages in Visual Studio 2008. If I edit a line that is flush against the left margin, Studio automatically indents it 4 spaces, and there is no way to undo it! I am forced to save the file with that 1 line I edited indented differently than all the other lines!

Edit: How do I turn this off?

Posted: Feb 23 10 at 23:01

View 1 Replies!   View Related
MVC :: XHTML Header Indentation Format Is Not Respected For Some Tags?
When I do 'source view' in my browser I realize that all xhtml that I provide between <head> tag are 'reformatted' by mvc engine, that is, my indentation is lost. The exception seems to be with <script> tag.

Is there any way to force to respect my indentation?

Posted: Oct 16, 2009 07:50 AM

View 4 Replies!   View Related
Automatically Remove Indentation, Unneeded Empty Space From Html (minify)?
I have an application, and when I look at the page's source I see the html is indented, has lots of white space, I think if I will remove all these spaces, my page will become smaller in KBanybody knows how to remove them automatically ?

Posted: Nov 30 10 at 12:14

View 4 Replies!   View Related
Forms Data Controls :: (Grid View Union Gridview) - (Gridview Intersection Gridview) - Avoiding The Duplicates
I have twogridviews, say'A' and 'B'...I want to add all the rows of 'A' to 'B' while avoiding the duplicates....Foreg:

Posted: Jul 19, 2010 01:54 PM

View 10 Replies!   View Related
Forms Data Controls :: Show Child Gridview In Parent Gridview Using Nested Gridview
In nested gridview, i am finding some problem, i want to show child Grid headers in Parent Gridview. Can anyone tell me that how it is possible? Its very urgent. Waiting for quick response.

Posted: Dec 01, 2010 12:38 PM

View 1 Replies!   View Related
Forms Data Controls :: Gridview SelectedIndex / Unable To Access The Data In The Gridview's Selected Row
I am unable to access the data in the gridview's selected row. I have done this lots of times but must be forgetting something.

Here is my gridview:


Posted: Jul 31, 2010 01:54 AM

View 4 Replies!   View Related
Forms Data Controls :: Access Controls Inside Gridview When An Event Outside Gridview Fires?
I have a dropdownlist outside the gridview control. My griview control also have dropdownlist in the first column. I want to populate the dropdownlist inside the gridview control for all rows when the selected item is changed in the outside dropdownlist.

Posted: Jan 10, 2010 09:54 PM

View 2 Replies!   View Related
Forms Data Controls :: How To Show GridView Footer Visible, If No Data In GridView
I have a customized gridvewi.e. grvResult. There is a textbox and aInsertButton in the footer.

If there is a data populated into gridview it is showing GridView footer and inserting data but if there is no data in gridview thenits footer also not visible.

I have tried in two ways tomakefooter visible but it isshowingfollowing error:

Object reference not set to an instance of an object.

Tried ways:



Posted: Jan 17, 2010 08:14 AM

View 2 Replies!   View Related
Forms Data Controls :: Gridview To Excel (adding Data Outside Of The Gridview)
I was wondering if it is possible to add additional data to Excel document created from gridview. What I want to do is to manually add data to certain rows and columns (date, couple of titles, etc), but I'm not sure how to do it.

Currently I'm using the following code:


Posted: Jan 28, 2011 07:59 PM

View 5 Replies!   View Related
Forms Data Controls :: GridView Pass And Update Data To Another GridView?
I filtering Data toGridView 1 using LingDataSource1 Tables Main - NameAfter click select I whoud like to pass and update data to GridView 2LingDataSource 2 Tables Users - UName
I thoughtget Data from GridView1

Dim raw As GridViewRow=GridView1.SelectedRo

Posted: Nov 19, 2009 04:51 AM

View 2 Replies!   View Related
Forms Data Controls :: Transfering Data From One Gridview To Another Page Gridview?
iam using with c#, my grid contains 1st column is check box ,and paging is true ,iam displaying data from view that does not contain primary key, so based on this when user selects the no of checkboxes in 1st page andin another page some records then i want to transfer to another page gridview but it is not displaying. can you correct my code where iam going wrong

string constr = "Data Source=MAINSERVER;Initial Catalog=Inventory;User ID=sa;Password=nsg";
protected void Page_Load(object sender, EventArgs e)


Posted: Apr 14, 2010 10:16 AM

View 3 Replies!   View Related
Forms Data Controls :: To Add Insert Button To A GridView And A Scroll Bar To A Given Gridview Column?
how to implement Insert feature to a grid view?I need to use fields with scroll bar inside of a grid view. Is that possible through the template field?

Posted: Jul 09, 2010 06:35 PM

View 23 Replies!   View Related
Forms Data Controls :: Populate Dropdownlist In A Gridview By Selecting Another Dropdown In Same Gridview
How to populate dropdownlist in a gridview by selecting another dropdown in same gridview

i tried the code in driiopdownlist selectedchanged

dropdownlist d=(dropdownlist)gridview.findcontrol("dropdownlist1")but it gives null

Posted: Oct 09, 2010 07:39 AM

View 4 Replies!   View Related
Forms Data Controls :: Decrement Gridview RowCount When Deleting Record From Inner GridView?
Using 2005.I have an inner gridview.The outer gridview is "Authors" and in the inner gridview (GridView1 below) I have to set it up so that the user cannot delete the last book from the inner grid, if they try to delete the last book from that inner grid then I want to show the exception message below.

So I am checking the GridViewRows1.Rows.Count which works great when I have one record (one book) to start with. The problem is when I have 2 books (for example). I am writing out the test statement below and the RowCount is always 2 each time, never decremented, even after I rebind.Editing this now: i realize that my initial logic is faulty because when I rebind my inner gridview I am not specifying which inner gridview so the result is that only the last inner gridview is being re-bound, so I think that I need to get the selected inner gridview and then refresh that...


Posted: Apr 22, 2010 02:03 PM

View 1 Replies!   View Related
Forms Data Controls :: Google Maps And GridView With Href (embedded In GridView)?
I had a problem with my site in the past couple days and have almost recovered, but now I'm stuck on some code that has an Auto-Complete feature, which allows a user to type a name of a pub into a TetxBox, and based on the returned names, the user can click one and see that name in the GridView (just below the TextBox). The GridView was set up so that there was an href that the user could click on and that would open a window and the user would see the pub in Google Maps. The code below works just fine for the Auto-Complete and the GridView.


Here is the end of the working code. Somehow I need to use the code below to make
the GridView have a href to allow a user to click and see the pub in Google


The code above worked fine before, but I'm not sure how it was incorporated into the GridView, and since I had a problem with my site a few days ago, I haven't been able to figure out this part.I'd sincerely appreciate any help in getting this up and running again.

Posted: Mar 09, 2010 07:56 PM

View 4 Replies!   View Related
Forms Data Controls :: Gridview Selections To Populate Another Gridview Or Control With Selection From First
I currently have a gridview that has 1 column with radiobuttons. I then have a update button to update all the selected records. But what i want to do is add a step before the update. I want to add a multi-line textbox for each radiobutton selected to allow them to add notes/comments for each record before the update occurs.

Because the textbox will be large to allow them to enter the comments, i wanted to list them out seperately per record selected. Maybe a gridview is not what i need for the 2nd part, but thats the scenario and looking for suggestions on what / how to do it.



ID column1 column2 column3 radiocolumn
1 1111 2222 3333Yes / No (selected Yes)
2 2222 3333 4444 Yes / No


ID NotesColumn
1 Texbox displays here

Posted: Feb 19, 2010 02:24 PM

View 20 Replies!   View Related
Forms Data Controls :: Display A One Row Gridview When Gridview Is Bound To Empty Dataset
If the gridview binds to empty dataset, I need to stillshow a gridview so that users can ADDmoreusing thetextfields in the bottom of thefooter template. Since the gridview is emptyit won't bind notallowing rendering of the <footer template> I guess Ishould create a empty dataset if the gridview is empty. How do I check for this and can this be done in GridviewRowEventArgs

Posted: Jan 13, 2010 11:09 PM

View 5 Replies!   View Related
Forms Data Controls :: Gridview Header And Footer Should Not Move While Scrolling Gridview
i am using Grid view. when ever bulk data is there in Gridview, Header and footer must not be move..

how can i do that.

Posted: Sep 13, 2010 05:09 AM

View 3 Replies!   View Related
Forms Data Controls :: How To Update Parent Gridview After Updating Child Gridview
I have aparent gridview which has a child gridviewin the itemsTemplate. Bothare binded to different SqlDataSources. I can successfully update and delete rows in the child gridview. After updating in the child gridview, some related data in the parent gridview are not updated automatically. So i have placed ParentGridview.Databind() in the rowupdated event of child gridview. But it doesnt look working.

How can i accomplish this?

Posted: Dec 14, 2010 03:03 PM

View 4 Replies!   View Related
Forms Data Controls :: Gridview FindControl / Access Textbox In Second Gridview Footertemplate
I have nested 2gridview. I want to access textbox in second gridview footertemplate. How can I do this.My code is


Code Behind


Iwrite this code but I get

Object reference not set to an instance of an object.

Posted: Mar 17, 2011 09:34 AM

View 11 Replies!   View Related
Forms Data Controls :: Gridview Check Missing 1st One With Gridview Helper Classes
im reading checkbox value which is checked on my gridview but as per my code is missing the 1st one which on top but i select from the middle then it is working fine here is link for gridviewhelper classes [URL] and im calling this code from gridviewhelper classes on page load event

Dim helper As New GridViewHelper(Me.GridView2)
helper.RegisterGroup("heading", True, True)
AddHandler helper.GroupHeader, AddressOf helper_GroupHeader

and here is my code

Dim sc As New StringCollection()
Dim id As String = String.Empty
For i As Integer = 0 To GridView2.Rows.Count - 1
'loop the GridView Rows
Dim cb As CheckBox = DirectCast(GridView2.Rows(i).Cells(2).FindControl("CheckBox2"), CheckBox)
'find the CheckBox
If cb IsNot Nothing Then
If cb.Checked Then
id = GridView2.Rows(i).Cells(1).Text
End If
End If

Posted: Feb 23, 2010 08:58 AM

View 1 Replies!   View Related
Forms Data Controls :: Gridview Sorting Failed If Multiple Gridview Are Created
I got a web page, it has a tabcontainer, within each tab, there will be a gridview, all the tabs and gridview are created at run-time, i have only one code, that I will loop through to create all those tabs and gridview. When I apply the sorting, and I click on the column nameon any grid, it returned an error saying index was out of bound. BUT, when there is only ONE grid view created, it is working fine, I suspect it mixed up all the grid view's id and so on. But I have assigned different ID to gridview

Posted: Mar 10, 2011 04:04 AM

View 8 Replies!   View Related
Forms Data Controls :: Showing A Gridview Column Value In A Label Outsite The Gridview?
Ihave a gridview whereI need to show the value of the 7th column(from the 1st of gridview row) in a label on the page outside the gridview.

Posted: Dec 28, 2009 02:40 AM

View 8 Replies!   View Related
Forms Data Controls :: Selected Checkbox In Gridview Should Be Added From One To Other Gridview Using Objectdatasource
table a
a1 a
1 qw
2 asa

i have two grid views

gridview1 has check box[a1] and one value[a](in total two columns) with objectdatasource1 for datareferencing from database

another gridview2 has to select only the selected/checked value of gridview1 of checkbox1

Posted: Aug 02, 2010 09:03 AM

View 3 Replies!   View Related
Forms Data Controls :: Edit Child Gridview Inside Master Gridview?
I know there are many posts about master/child gridview. But I have not be able to find a solution to my seemingly basic problem...

I have a child gridview (user control ucChild) nested in each row of a master gridview. When I load the master gridview page, after I bind the data of the master, I go row by row & pass the key to ucChild to bind the details (child gridview).

The child gridview has a edit link - nothing fancy. After user clicks it, the master gridview page and ucChild do their routine including page load and bind data. Then it comes to ucChild's RowEditing method. I do the following:

- set the edit index of the sender (the specific child gridview)

- set sender's datasource, and bind data

But now this child gridview becomes blank...

Posted: Sep 21, 2009 11:15 PM

View 3 Replies!   View Related
Forms Data Controls :: Click On The Child Gridview And Get The Values Of The Parent Gridview?
I'm lost. I have a sub gridview in a gridview. In subGridbiview I have a button. How do Ican clicking the button and get values outside the gridview? The subgridview not present the events ...

------------------------Gridview 1------------------------------------------

| cell(0) | cell(1) | Cell(2)| Cell(3 - ITEM TEMPLATE) | -
| | | | # # # SubGridview1 ######### -
! x1 | Y1 | Z1 | # Cell(0) ! Button #-
! | | | ######################-
| | | | # # # SubGridview1 ######### -
! x2 | Y2 | Z2 | # Cell(0) ! Button #-
! | | | ######################-

how do I click on the child gridview and get the values of the parent gridview? no events in the child gridview no number indexrow on the parent gridview I'm lost.

Posted: Oct 25, 2010 12:21 PM

View 6 Replies!   View Related
Forms Data Controls :: Decrypt One Gridview Column Values Before Displaying It In The Gridview?
I have one filed that is encrypted using Rajindal algorithm and stored in MSSQL db.When I retrieve that column in gridview it's displayed in encrypted. I have the code that decrypts it but the problem is:How can I all loop throw this column values in the gridview and decrypt them all and display it in the gridview decrypted.See my code below:


Posted: Mar 08, 2011 06:13 PM

View 9 Replies!   View Related
Forms Data Controls :: Gridview Recalculate, Then Repopulate Gridview Without Going Back To Database?
I want to make sure I go about this in an efficient manner. I havea gridview. On the gridview, I havesome columns thatare read only values . These values go through calculations based on values in a database. The stored procedure takes information in the database, does some simply calculations (thisvalue * thatvalue / another value type of stuff) then returns a recordset as a datasource for the grid.

Other columnson the gridview havevalues the users can enter data. I want to be able to provide a recalculate button that will run calculations based on the entered values which will change the readonly valuesand then repopulate the gridview's read only values without going back to the database. This recalculate button is not the save to the database button. The save to the database button will take the values in the user entered columns and save them to the database. Then, the next time the grid is called, the page calls to the database and loads the grid.

So, what I'm looking to do is allows for recalculations on a gridview, a gridviewwith about 24 columns and about 1000 rows. My first thought is to create a class that reads the gridview and then applies the business rules, then updates the gridview some how. Or, maybe have a dataset table thats i read the value from the user inputs, then apply business rules and then bind the gridview to the dataset table. Do any of you have thoughts here, maybe have done something like this?

Posted: Mar 26, 2010 08:19 PM

View 9 Replies!   View Related
Forms Data Controls :: GridView And ObjectDataSource - Column Is Not Shown In The GridView's List ?
I'm facing a wierd problem with GridView and ObjectDataSource. I bind GridView to my business objects via ObjectDataSource. Everything was working fine until I decided to add a new field in my buisness object and wanted to add a column to GridView to show it. Somehow that column is NOT shown in the GridView's list of available columns. I have tried refreshing schema, rebinding, etc. I'm using GridView inside a user control which is used as a web part. Does that make a difference ?

Posted: Feb 09, 2011 05:38 PM

View 3 Replies!   View Related
Forms Data Controls :: Child Gridview Within A Master Gridview - Not Showing Info?
I have a master gridview with a child gridview within a template.

The master shows user information and the child will display information about this user. The info is stored in two seperate databases and there is no need for editing, etc using these gridviews so it's good that they'll only be read-only.

I'm binding the master gridview to an ObjectDataSource pointing to a DAL to populate the master gridview. The DataKeyName is the Participant ID (PartID). This works fine.

The child gridview is bound to another ObjectDataSource as well but it's being populated with the results of whatever the Participant ID (PartID) is; or that's how it should work. The DAL works fine when I test it and enter a PartID, but nothing is being displayed in the child gridview when viewed in a browser.

I've done some reading and it's suggested that this should be done via theRowDataBound event. How do I accomplish this?

Posted: Oct 15, 2009 08:24 PM

View 12 Replies!   View Related
Forms Data Controls :: GridView Export To Excel Does Not Work When Using The ConfirmButtonExtender In GridView
I am using Ajax ConfirmButtonExtender Control in GridView for Deleting the Record. I am also Exporting the GridData to Excel using Render Method. But when i click on the Export Button, i am getting below error Extender control 'confirmID' is not a registered extender control. Extender controls must be registered using RegisterExtenderControl() before calling RegisterScriptDescriptors(). Parameter name: extenderControl

Posted: Apr 01, 2011 01:19 AM

View 1 Replies!   View Related
Forms Data Controls :: How To Get The Textbox Values To Gridview And Gridview To Database
how to get the values text box values to gridview..

if i enter any text in text box those values should display in gridview.

after entering of 2 or 3 records, i will click on save then all the values of grid should insert in to DAta Base.

i dont want to get the values form Database to Gridview.

how to retrive the values form Database to Gridview.

i just want to display the values which are there in Textbox...

Posted: Jul 19, 2010 08:17 AM

View 3 Replies!   View Related
Forms Data Controls :: Inner Gridview In Nested Gridview Not Firing OnRowCommand
i have the following nested gridview

i could get the inner gridview onRowDataBound working by setting that directly in the gridview

but i cannot get the linkbutton's onrowCommadinside the inner gridview working!!!

it does not fire the event even i have set it directly in the gridview

here is the code in my app_code page


Posted: Oct 12, 2010 09:01 PM

View 12 Replies!   View Related
Forms Data Controls :: How To Access The Properties Of The Inner Gridview Of A Nested Gridview
I have a nested gridview which has been working fine. Now I need to turn the inner gridview off based on some condition: a IF block is added to the existing RowDataBound event of the outer gridview. Now I'm getting "the Object reference not set to an instance of an object" error. What should be the proper way to go about this? The code:


In addition, is there a way to "switch" columns of the inner gridview? For example, column 1 is "City", column 2 is "Price". If user selects to sort by "Price", I woud like column 1 be "Price" and column 2 be "City". Is this has to be done programmatically or if there's other way?

Posted: Oct 28, 2010 12:12 AM

View 3 Replies!   View Related
Forms Data Controls :: How To Change GridView Row Color When A GridView Row Is Selected
When an application user selects a particular row in my GridView, I would like to have the row highlighted in a different color. (By selects I mean the mouse cursor was moved into a cell in a GridView row)

I found this article on the web where something similar is done. Basically the row color changes when the mouse cursor hovers over a GridView row. And again changes when the mouse cursor hovers over a different row.

The difference with my approach is that I only want the color to change when a mouse cursor is placed in a gridview cell in a row. And then it won't change color until the cursor is placed in a different row/cell of the GridView. how I can have the row color change only when the row is selected? I tried using the onclick property but that did not work. (See lines 9 and 15 below) e.Row.Attributes.Add("onclick"

1 protected void Gridview1_RowCreated(object sender, GridViewRowEventArgs e)
2 {
3 // only apply changes if its DataRow [code]...

Posted: Nov 05, 2009 02:00 PM

View 2 Replies!   View Related
Forms Data Controls :: How To Set Selected Value Of Dropdown In Gridview After Gridview Databound
I have a gridview with dropdown boxes. As soon as the complete gridview is databound, I want to loop through ALL the rows and set the values of the dropdown boxe in a row based on the value of another column in the same row. The gridview is databound, all data shows up. The condition "If ddl.Items(j).Value = searchstring Then" evaluates as true, but somehow the selected item in the dropdownbox is NOT changed and remains "<ignore>"


Posted: Nov 30, 2010 01:57 PM

View 5 Replies!   View Related
Copyright 2005-08, All rights reserved