gridview

How to use Threading in Change some Cell in Gridview?

How to use Threading in Change some Cell in Gridview? I have some query from database and use many time for query its. to Its very slow , then i would to used Threading for load data faster than and when thrad finish job can change data in Grid view? ...

asp.net 2.0: best data structure to bind to gridview

For the most part, the application I'm working on deals with object, and I can bind a list of objects to a gridview without any problems. However, in a couple of cases, I want to display the results of a multi-table join in a gridview. The current code uses a dataset, which is pretty easy, but I'm wondering if there's a better/more eff...

Conditionally hide CommandField or ButtonField in Gridview.

I have a GridView displaying person records. I want to conditionally show a CommandField or ButtonField based on some property of the underlying record. The idea is to only allow a command to be performed on specific people. What is the best way to do this? (I'd prefer a declarative solution to a procedural one.) ...

disable delete button if value in database table's--> column is true or checked

Ok... I have a database table called employees.. This has columns called ID, Name, datejoined and Cannotbedeleted (check boxes)... Now i want to add a delete column which deletes the rows when clicked. But there are some entries which cannot be deleted if the Cannotbedeleted field is true (checked)... so the delete button should be in...

Gridview_rowediting not working

Hi, I have an asp.net c# web app with a gridview inside it. I wanted to handle gridview_rowediting, so this is what I have so far: protected void grid_RowEditing(object sender, GridViewEditEventArgs e) { grid.EditIndex = e.NewEditIndex; grid.DataBind(); } The grid displays search results from a database on...

gridview_paging messing up

Hi, I have an asp.net C# web app. In it I have a gridview. The gridview gets search results from a database. Sometimes there are a lot of results, and so I wanted to use paging. Here's what I tried: protected void grdResults_PageIndexChanging(object sender, GridViewPageEventArgs e) { grdResults.PageIndex = e.NewPageInd...

Multiple Dynamic GridViews with AJAX Controls

Hi All, I have a customer requirement where I need to populate multiple grid views dynamically. Say, There are 10 students in a class room - each student record will have details about them. So, when a user selects a class room, I have to populate 10 grid views with relevant data. The user might add/update/delete details(rows) in each...

Removing rules attribute from asp.net gridview

i have a gridview i wish to style without borders but whenever i use the control asp.net adds in the attribute rules="all" i've tried overriding in on the control like so: <asp:GridView ID="GridView1" runat="server" rules="none"> but this doesn't work either ...

Override automatic sorting for one column in GridView?

I have a GridView that is using a LinqDataSource which is tied to a table in my database. This table of mine has a int foreign key. In my presentation layer, using TemplateField in Gridview, i hide the foreign key value and make another call to the database to show the name of it's associated name so it's more readable for the user. Ho...

Autofill in the Gridview --> Itemtemplate --> Text Box or Dropdown

Hi, I have a following requirement. ASP.net GridView control has following fields. HeaderTemplate ID ------ Name---------- Model dropdown[ ALL-Yes ] --------Description. Item template label------ label ----------Dropdown ------------------------- Text box ID and Name field bound to datasource and populated from databas...

Showing Images in gridview as block items

I want to show items in my gridview as a 5 across and a 5 down display - i already have the query pulling only 25 records per a page but cant seem to make the gridview do what i want - any suggestions? example------------------------------ record 1 : record 2 : record 3 : record 4 : record 5 record 6 : rec...

Gridview and List<>

Hi all, i am using gridview control to display records. i am using System.Collections.Generic List<> as datasource. I want to perform sort operation in gridview. Please help me ...

LINQ Outer Joins Dynamic OrderBy

In a Linq Statement like the following (narrowed down to relevant parts for the question): var sites = from s in DataContext.Sites join add in DataContext.Address on s.PrimaryAddress equals add into sa from a in sa.DefaultIfEmpty() select new { s.Id, ...

ASP.NET gridview postback not working for anonymous users

Hi all, When using a gridview and not logged into a asp.net website, the java scrpit does not appear to work. If I am logged in as a user, any pages with gridviews work fine. The only error I'm getting when checking the javascript with Firebug is 'ReferenceError: DES_ValOnSubmit is not defined.' This is a reference to a Peter Blum java...

How to I call a javascript function on onrowcommand?

Using asp.net, c# 3.5, vs 2008. I have an aspx gridview called gv1 with a working c# codebehind onrowcommand method which is called when a button on the row is clicked. The button on the gridview is being dynamically generated. I am trying to replace that codebehind call with a javascript function to avoid a roundtrip to the server....

.net 2005 gridview

Hi, I'm trying to add a lookup type column to a gridview. The column will be used as a picklist of values for the user to, well, pick a value from. Sounds fairly straight forward but the problem is I want the picklist column to be a distinct list from a table that is not in the datasource of the gridview. If I join the picklist table int...

WPF: How to combine Rows within a column (alternative to rowspan)?

Hi there, Is there a way to combine rows within a specific column? Hence to get something like this (I am currently using rowspan on a control i.e. Image but is there a better way?) -------------------- | |--------| | |--------| | |--------| | |--------| | |--------| -...

DataGridView selecting "Complete Row"

Hi /all In Windows .NET gridview - if a grid is readonly; when I click, a cell is selected; I want complete row to be highlighted instead of just cell. any idea? ...

How do I add a column with buttons in to a gridview in asp.net?

As my gridview is populating I want to add an extra column with some buttons in but I can't seem to figure out how, or what might be the best way. Can anyone get me started? ...

Can't seem to capture a button click in a gridview in asp.net

I put some Image Buttons into my gridview, but I cannot capture the click event. Neither creating a click event, nor creating an OnRowCommand handler in the gridview works. Clicking the buttons simply postbacks to the current page. I add my buttons like this: protected void gridview1_RowDataBound(object sender, GridViewRowEventArgs e)...