gridview

asp:gridview sorting problem

I have an <asp:gridview> that is being populated with a data table. There are currently two columns one is title. This column sorts correctly until when I am building a link to go to the title of the article the grid starts sorting by the URL. So if the title is Zebra and the articleid is 5 then I have a title named Antelope with an a...

how to hide the particular row in the Gridview?

How can I hide a particular row in a GridView? For Example If I click 2/4/1/7 it will hide 3/5/2/8 correspodingly how to do this ...

How to display real tabular data with WPF?

Hi, i've got following problem: i have to display tabular data in some kind of grid. Say class A is a data item, with properties Foo and Bar, and i have a list of items List or sth like this. i want to display these items in a grid, where items with same Foo are in one column, and items with same Bar in one row. basic. simple. i thoug...

Complex Gridview Edit

I have a gridview that displays data in a crosstab format. The hours for each day are displayed. Each day is actually a separate row in the underlying table, so a row in the grid represents seven underlying tables. WeekEnding(sat) Project Category Sun Mon Tues Wed Thur Fri Sat 8/14/2010 Proj1 testing 1 ...

How to sort a Gridview bound to a datatable and with a buttonfield column

I have a gridview that is bound to a datatable. I have also written some c# code to sort and page that gridview. However, the buttonfield column is not being sorted with the rest of the table. How would I accomplish this? Current Sorting Code: protected void gridView_SortingUser(object sender, GridViewSortEventArgs e) { ...

Asp.Net GridView : Good or Bad / What datatypes to use for binding?

So, this question may be a little vague, but I have constant discussions about it: When designing an Asp.Net page, a lot of times you might just want to throw a quick and dirty GridView on the page. When you are going that route you have the various datasource options (I typically use ObjectDataSource tied to a business object) and you...

Get old Gridview Row values in the RowUpdating event

How do I get the old values in a gridview row in the row_updating event? I'm using a sqldatasource control to populate the grid and want to write the update code in the RowUpdating event. There are 10 fields displayed in the grid. I can get the value of the first field using string old_Category = e.OldValues[0].ToString();. But i...

Sorting within gridview without any data binding control - how to do it?

Hi, I have a GridView control on my page. GV doesn't use any .net control as a data source to bind to data. I'm doing this in code behind where I'm creating my own DataTable and DataSet. Then I'm binding this DataSet to GV. Next i would like to enable of sorting colums. The issue is that this doesn't work as it should when you don't use...

Why is My GridView FooterRow Referencing the Wrong Row?

Hi All, I have a GridView and, using a fairly common method, I'm using a FooterRow and TemplateFields to provide the missing insert ability. So far so good. The footer contains a TemplateField with a LinkButton to provide the postback that does the insertion. In the handler for the LinkButton's click, the Insert() method is called on...

ASP.net GridView - Use If-Statement in HeaderText property of BoundField

Can I do something like this: <asp:BoundField DataField="Field1" HeaderText='<% IF(Eval("Field2").ToString().SubString(3,4).Equals("Text3"),"Text1","Text2") %>' SortExpression="Field1" /> With the goal of having the header of Field1 be Text1 when the 4th-7th characters of Field2 = Text3 and Text2 otherwise? I tried it and it jus...

Critique this strategy

I want to populate a gridview by using jQuery and AJAX. From my calling page jQuery will call a handler (.ashx) that will deliver XML data or HTML markup for the gridview. As I see it I have two choices: 1) deliver XML which is then bound to the design-time gridview on the calling page, or 2) deliver HTML for the gridview. My first que...

ASP.NET GridView Paging using Linq query as datasource

I am looking for a way to do paging with a GridView when i set the datasource at run time using a linq query. here is my code: ETDataContext etdc = new ETDataContext(); var accts = from a in etdc.ACCOUNTs orderby a.account_id select new { Account = a.account_id, aType...

ASPxGridView single selection

Hi, Im trying to figure out how can I make singelSelection on ASPxGridView. The onClick event handled like that: function GvUsersSelectionChanged(selectedRow) { //Clear the text selection if (GvUserClient.IsRowSelectedOnPage(selectedRow.visibleIndex)) { GvUserClient.SelectRow(selectedRow.visibleIndex, false)...

Use UpdatePanel with GridView

Hi I have a masterpage with a sidebar that conatians an accordion control for site navigation. On one of my child forms I have added a GridView inside an UpdatePanel. This user starts a job via a button click. This job writes to a database table and I'll like to see this updates presented via the Grid view. I've added a timer control wi...

good/simple example asp:gridview describing all its functionalities?

I have a temporary datatable, private DataTable getmyDatatable() { DataTable dt = new DataTable(); DataColumn dc; dc = new DataColumn("Name"); dt.Columns.Add(dc); dc = new DataColumn("Age"); dt.Columns.Add(dc); dc = new DataColumn("Address"); dt.Columns.Add(dc); ...

find if any checkbox is checked in a specific column of the GridView using jQuery

Hi, Please let me know how to check if any checkbox is checked in a specific column (for example first column) of the GridView control using jQuery? there are checkboxes in other columns too, but I need to check if any checkbox is checked in a specific column. thanks in advance. ...

Set textbox visibility based on dropdownlist value in gridview

I have a gridview that i would like to show or hide a text box based on the selected value of a dropdownlist on the same row. My gridview: <asp:GridView ID="GridViewUsers" runat="server" AutoGenerateColumns="False" CssClass="TableFramed"> <Columns> <asp:TemplateField HeaderText="Type"...

How to change gridview font?

How change gridview font?in windows form ...

grid view validation problem

in a grid view how can i apply a validator to check if any of grid view rows with check box are checked or not. i did it using the custom validator like this but giving the error "Control 'GridView1' referenced by the ControlToValidate property of 'gridCheck' cannot be validated. " following is my code what should i do please suggest me...

asp.net gridview paging

I have a grid view which has 10 rows. I have set paging = true and pageSize = 2 Now when I try to navigate through the page by the below mentioned link like 1, 2, 3 , I then receive error something like need event pageIndexChanged. I added this event but do not understand what code should I add to this event to navigate to next page b...