gridview

How I can use the value of a textbox which is in a gridView in the code behind without using the FindControl() method

How can do I that? Does anyone have a solution. It is also looking tricky but I don't have an answer. ...

Problem changing Formview mode on GridView_SelectedIndexChanged

I want my Formview to start in Insert mode and then change to Edit mode when a user selects a row from the Gridview in the same page. The Formview has the inline attribute: DefaultMode="Insert" How can this be done and why isn't this working? protected void GridView1_SelectedIndexChanged(object sender, System.EventArgs e) { ...

sorting a gridview bound to a linq SP

hi there I have a grid bound to a linqed SP thus: Session["results"] = db.spGetCaseByNumberOrSurname(txtCaseNum.Text.Trim(), null).ToList(); gvResults.DataSource = Session["results"]; on the sorting of it, i would like to be able to do this.. protected void gvResults_Sorting(object sender, GridViewSortEventArgs e) { ...

Asp.Net Gridview

I have a gridview with an enormous viewstate that I am attempting to shrink. I have turned the viewstate off in the control(which the gridview is in) but this seems to have done next to nothing in terms of the page size. Now the gridview has buttons and dropdowns in it, which I know add to the size. But cannot be helped. Now short or r...

Why is Asp.Net WebForms GridView performing an unasked DataBind() in OnPreRender()?

I'm working with a GridView in an UpdatePanel and perform databinding to an ObjectDataSource using the DataSourceID property. Everything works just fine except for when I perform data validation in the object source and return false from the Update. I use this to set the content and visibility of another control in the GridView. However,...

Changing Gridview row background color when editing ?

Hi all, I'm having some trouble with editing a gridview row's background color when Editing it. The thing is, I am using the RowDataBound event method to change e.Row.BackColor based on a criteria when displaying the report( 3 different colors depending on result ). For the rows that don't fall under that criteria, a GridView's property...

ComponentArt grid column right click filter

I am using ComponentArt grid in my project and my requirement is whenever we right click on each column in gridview show filter menu. How we can do this using AJAXToolKit? Below is the code for grid ...

ASP.NET 3.5 GridView Row Selection

I have a GridView. I have to collect the GridViewRow where checkbox is selected. How can I achieve it without any client side script? Please help me to get this done. ...

how to add the checkbox field in gridview programatically, what wrong with my code?

try { string Data_source=@"Data Source=A-63A9D4D7E7834\SECOND;"; string Initial_Catalog=@"Initial Catalog=replicate;"; string User=@"User ID=sa;"; string Password=@"Password=two"; string full_con=Data_source+Initial_Catalog+User+Password; SqlConnection connection = new SqlCon...

GridView with paging enabled is not filtering based on input from other Controls (DropDownList, TextBox)

Hi guys, Can someone please assist me. I have dynamically created controls onto my page which consists of a GridView, DropDownList, TextBox and Button. I have successfully retrieved data onto the GridView control which then has a paging attribute enabled. Now I am trying to filter data according to the input set by the user through th...

Error with pageDataSource and Dataview "Index 40 is either negative or above rows count."

I am working with Gridview and implementing custom paging with PagedDataSource. there is also some search criteria in this page with which I reset the Grid with the New data according to search criteria. Problem is that sometime when I try to Bind the Grid with PagedDataSource it gives the error "Index 40 is either negative or above ro...

Gridview column that changes when required (ASP.NET)

Hi all, I need to have a GridView listing all invoices of an account. Each account can have a PDF generated for that account, which isn't done instantly - so I need a gridview column to update the user of the progress of this conversion - i.e. 'In Progress'. Then, when the conversion is done the cell's text should change to a hyperlink...

Style for nested gridview asp.net

Hi I have am using nested GridView to show Customers in the mainGrid View and CustomerDetails in the Inner GridView. for the outer GridView there is a CellPadding set of 4px. Now when i use nested gridview, I do not want the Pading to be apllied for the cell containing the InnerGridView. Please help me with this. I am stuck on this issue...

Third Party Tree-Grid WinForms Control

I am looking for people's experience with any of these third party controls 1) Xceed Grid for .NET 2) DevExpress XtraTreeList 3) Infragistics WinGrid 4) Infralution VirtualTree 5) 9Rays.Net Flygrid I need a very simple Hierarchical representation of my data with the grid format to display additional information about each node. Perfor...

_Setting_ textbox's text using FindControl

Hi all, I need to be able to set a textbox's (which is inside a gridview row) text to a certain string in runtime. I have used FindControl before, but can't figure out the syntax for actually setting the value of the textbox rather than just getting. Here's what I have, which doesn't compile: ((TextBox)e.Row.FindControl("txtPath")).Text...

Paging attribute in GridView filtered data is not working.

Hello, How can I enable the paging feature of a gridview that has been filtered using a dataview source. The paging on the default view is working fine. However, when the user inputs a value to be used in filtering the data, the paging reverts back to the original datasource even after the databind has been called. The following code ac...

How to programmatically iterate through pages of a GridView

Hi all. I've created a wallboard application to display outstanding support calls for my ICT department. I've bound a number of gridviews to sqldatasources which execute a stored procedure. This is automated via asp.net ajax controls and partially refreshes the page/data every 30 seconds. At the moment, when the number of records in t...

Visible Checkbox only on Gridview's last row?

Is it possible to have a Checkbox that only shows up when Editing the last row of a GridView? I have tried something like this in the EditItemTemplate: <asp:CheckBox ID="chkNextDay" runat="server" ToolTip="Is it a next-day departure?" Enabled="true" Checked='<%# DateTime.Parse(Eval("OutHour",...

The riddle of the working broken query.

I was going through some old code that was written in years past by another developer at my organization. Whilst trying to improve this code, I discovered that the query it uses had a very bad problem. OdbcDataAdapter financialAidDocsQuery = new OdbcDataAdapter( @"SELECT a.RRRAREQ_TREQ_CODE, ...

Gridview FooterRow textbox text is null when accessing from code behind

I have a GridView with the following columns <asp:TemplateField HeaderText="Name"> <FooterTemplate> <asp:TextBox ID="txt_Name" runat="server"></asp:TextBox> </FooterTemplate> <ItemTemplate> <asp:Label ID="lbl_name" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "t_Name"...