Archived Months
June 2003
July 2003
August 2003
September 2003
October 2003
November 2003
December 2003
January 2004
February 2004
March 2004
April 2004
May 2004
June 2004
July 2004
August 2004
September 2004
October 2004
November 2004
December 2004
January 2005
February 2005
March 2005
April 2005
May 2005
June 2005
July 2005
August 2005
September 2005
October 2005
November 2005
December 2005
January 2006
February 2006
March 2006
April 2006
May 2006
June 2006
July 2006
August 2006
September 2006
October 2006
November 2006
December 2006
January 2007
February 2007
March 2007
April 2007
May 2007
June 2007
July 2007
August 2007
September 2007
October 2007
November 2007
December 2007
January 2008
February 2008
March 2008
April 2008
all groups > asp.net datagrid control > august 2005

Filter by week: 1 2 3 4 5

Adding a select column...
Posted by Paul Mason at 8/31/2005 12:00:00 AM
Hi folks, I am aiming to create a "select" column that is unbound on datagrid whose other columns are all data bound. The idea is to let the user select items to be printed etc. The problem I have arises when I want to find out which rows are selected. The following code is a tester t...more >>


Detailsview empty dataset insert
Posted by Eric Zhao at 8/30/2005 12:00:00 AM
My details view is in insert mode and my dataset is empty but the details view doesnt show. who can help me, how to do? Also I tried to set the defaultmode to insert mode, but i found i can't cancel the inserting. thanks in advance. ...more >>

gridview sorting is not working
Posted by Abraham Luna at 8/29/2005 4:20:12 PM
can anyone tell me why this code is not working, i've been following the tutorials but i can't get it to work: <script language="c#" runat="server"> void Page_Load (Object Sender, EventArgs E) { if (!Page.IsPostBack) { BindData(0); } } void btnRefresh_Click(Object Sende...more >>

help with XML in Datagrid
Posted by Frank at 8/29/2005 11:09:00 AM
I have this XML document which I want to list in a datagrid. I know ..NET implicitly infers the data relation but I don't know how to manipulate it. Here is the document: <root> <Folders Language="Polish"> <Master Exists="True"></Master> <Document ...more >>

How to use DataGrid in ASP.NET
Posted by rushikeshkale at 8/29/2005 11:03:22 AM
High guys! I am beginner in ASP.NET, Please give me some sample code ,where u us DATAGRID to access Database . Thanks In Advance -- rushikeshkal ----------------------------------------------------------------------- rushikeshkale's Profile: http://www.highdots.com/forums/m52 View this t...more >>

Sort Datagrid
Posted by malin NO[at]SPAM o2.pl at 8/29/2005 5:27:14 AM
Hi I have one question, can i sort DataGrid with two parameters ? that's mind if i have three columns in dataggrid: First Name, Last Name, Office John, Smith, New York John, Johnson, Oklahoma Jeff, Jhonson, New York Mug, Gates, New York and when i click sort to Office i have sorted d...more >>

Bound datatable + unbound column in datagrid
Posted by Gary Frank at 8/25/2005 9:01:22 AM
Is is possible to create an ASP.NET datagrid that mixes bound data pulled from a database table with an unbound column created by the program? I would like to display several columns from an SQL Server database table (table 1) in an ASP.NET datagrid control. I would also like to display an a...more >>

Datagrid sort
Posted by Arne at 8/25/2005 5:40:21 AM
I have a datagrid that sorts. The sort doesn't seem to execute on my template column. It only works on my bound columns....more >>



Big DataGrid Update Problem-MVP Help Please????
Posted by steroche at 8/25/2005 4:47:06 AM
I would REALLY appreciate help please please please! Im sure it is probably blindingly obvious to most of you but I am totally in the dark here!I am lost - i thought i had finally figured out this dataSet updating lark when i realised that i think i am right back at square 1!!! Here's my scenar...more >>

FindControl Method always returns empty string!!!!!
Posted by steroche at 8/24/2005 5:12:08 PM
Hi guys - Can somebody please help me? I'm a novice at all thisIve run into a serious stumbling block for the last few hours now and its killing me! I have a paged/sorted Datagrid setup and it works fine except for the update method - i just cannot get it to work! Now i keep getting the error :...more >>

Datagrid Cancle/update button calles delete command?
Posted by cjb NO[at]SPAM goldmancg.com at 8/24/2005 7:46:42 AM
Hi, I'm trying to extend the DataGrid class, and I think I am getting my wires crossed. In the constructor I add my colums: Public Sub New() connectionString = "Provider=Microsoft.Jet.OLEDB.4.0; Ole DB Services=-4; Data Source=" + HttpContext.Current.Server.MapPath(".\") + "...more >>

HELP!DataGrid HyperLink Highlighting??
Posted by steroche at 8/24/2005 6:11:19 AM
I have a datagrid that passes values to one page to another - well it actually loads up the same page again with the param passed in so i can poplulate another datagrid from that parameter if you know what i mean. My question is this: How can i make the datagrids' row highlight(like the wa...more >>

DropDownList show the name of columns of dataGrid
Posted by dalbo at 8/24/2005 2:53:06 AM
Hello, I make a dataGrid and i like to show the name of the columns of the dataGrid in a DropDownList. For example, if my dataGrid have three columns called "NAME" "ADDRESS" "CITY" i like show "NAME" "ADDRESS" "CITY" in the DropDownList. Thanks David, and sorry for my poor english....more >>

Databound Update(untyped dataset)
Posted by steroche at 8/23/2005 9:39:12 PM
I am trying to perform an update of a databound datagrid. I just cant figue out how to update the rows and though. Every example i come across either uses that example with the FindbyCategoryID method in a typed dataset or uses a DataView which i dont think i want to do either. How do i get the...more >>

Adding a href link to a column in a data grid
Posted by Vasantha peddireddy at 8/23/2005 10:30:16 AM
Hi, I am trying to figure out how I can add a html link to a value (which is the virtual path of a file) in the data grid column. I have code as below. Please help! <asp:DataGrid id="DataGrid1" BorderColor="black" BorderWidth="1" CellPadding="3" AutoGenerateColumns="false" runat=...more >>

Grids, dropdown, sql queries and extra spaces
Posted by eagle at 8/22/2005 2:26:14 PM
I have a sql query that combines 2 fields to end up as one, and binds to a dropdown list in a grid. I want to add spaces into the qry so the fields look like the are separate. But the drop down list seems to trim any extra spaces, and it displays any html codes I put in there. Does anyone kn...more >>

Paging and sorting
Posted by Arne at 8/22/2005 8:40:23 AM
I have a datagrid that implements sorting. Once a click on a new page number, my sort gets lost. How can I combine sorting and paging?...more >>

Passing grid data from one page to another
Posted by Vasantha peddireddy at 8/22/2005 8:20:02 AM
I am posting a page to another page (form post). The data grid on the second page is being populated with data. Now, on page load of the second page, I would like to send the grid data on this page to the first page and populate the grid on the first page with the same data on second page. Ple...more >>

How to hide border
Posted by Mark Aslan Kuschel at 8/21/2005 12:00:00 AM
Hi NG, I implemented a datagrid on a website with green background. I wanted to hide the datagrids borders, but there is one black border I cannot hide. You can see a screenshot at http://dingsbla.dotnet-infrared.de/images/Datagrid.jpg, when you zoom at the border you see an 1px border. ...more >>

Datagrid doesn't appear
Posted by Dave at 8/20/2005 11:48:16 AM
I'm fairly new to this .NET stuff. I've got two related database tables. The child table is just a set of textual selections for one of the columns in the parent table - in Access it's a drop-down selector list. So, nothing too clever. I've set up the data connection, two data adapters and ...more >>

Checkbox validation in datagrid
Posted by kleykir at 8/18/2005 3:13:43 PM
I have a datagrid that has 3 checkboxes (checkbox1, checkbox2 and checkbox3). Before i update a record to the database i want to run a validation script on The checkboxes. The function should check that Checkbox3 is unchecked if either checkbox1 or checkbox2 is checked and also it should be unc...more >>

Using CType with grid data
Posted by eagle at 8/18/2005 1:25:40 PM
How do I retrieve a value off a grid, then convert it to a decimal, seems like the only thing I can do is convert it to a string?? This is what works if the value is a string: strValue=cType(e.Item.Cells(1).Controls(1), Textbox).text But I get an error when I try the following: System....more >>

DataList doesn't fire events
Posted by Neil Jarman at 8/17/2005 6:41:22 PM
Hi, I'm new to this today, and I've got some test code (see below.) The data loads fine. I can't understand why any of the events fire. Once the page loads, clicking on thew button from the ItemTemplate does not fire the OnItemCommand event. It just fires a page reload - as a postback. I...more >>

How to convert to mixed case from capital
Posted by Yoshitha at 8/17/2005 12:00:00 AM
Hi I have a string like "KRISHNA MURTHY" in the database when i retrieve from database it has to show "krishna Murthy" (the first letters must be capitals) in the field of datagrid of my asp.net application how to do that please help me Regards, krishna ...more >>

Focus
Posted by lgrottland NO[at]SPAM yahoo.com at 8/16/2005 4:46:59 AM
Hello! I have a grid that is derived from a datagrid control, and I was wondering about one thing. And I hope that it's possible. If I have say 200 items in my grid, and edit the 100'Th When I'm finished editing this item, the grid is at top when I go back to the grid. Are there any functio...more >>

How does update work
Posted by PhilM at 8/15/2005 5:48:35 PM
I bind a Datagrid to a recordset obtained from a stored proc in SQL server. DataGrid displays the recordset. User updates some data on the grip, pushes update button. Event code calls Datagrid1.Update ... but what should that do? I suppose it executes the code stored in the Update command of th...more >>

Dynamic DataGrid
Posted by Joe Goeke at 8/15/2005 10:22:31 AM
I am attempting to use a DataGrid to dynamically display data based on what category the user picks. My data is in a SQL Server DB. My current problem is that I can't seem to find the best way to display the data in the DataGrid. For example, when the user picks a category (wing nuts), I ...more >>

Access
Posted by Paul Smith at 8/13/2005 9:13:02 PM
I have established a connection to an Access DB on my hard drive, well at least I think I have because a) the connection tested okay and b) when I double click on a table in the Server Explorer window, the contents of the table appears correctly. However I am having a problem using that conne...more >>

Radio Control Buttons Inside a Data Repeater.
Posted by SouthSpawn at 8/13/2005 5:36:58 PM
I know this is probably pretty trival. I am trying to put a radio button inside a repeater control. That will allow me to select each row one by one. Then once the user clicks on the submit button. It determines which row has been selected. Can anyone post me a code sample. Thanks, Mark ...more >>

How do I refresh a datagrid client side?
Posted by msnews at 8/10/2005 12:26:04 PM
Hi -- I'm very, very new to ASP.Net, and I've been trying for several days to figure out how to update a datagrid AND refresh it on the client side so that the page doesn't refresh. I've torn my code apart over and over each time I tried what I thought would be the code that would solve my pro...more >>

How to get original image of thumbnail image
Posted by aparna at 8/10/2005 7:05:40 AM
Hi To All i am doing one task, like storing image in database and loding back t Datagrid, in that i am taking thumbnail, It working fine. but what want to do is if i click on thumbnail image in datagrid, that imag full or original image should display in another page, if u have an idea tell...more >>

Data Binding
Posted by vefman NO[at]SPAM yahoo.com at 8/5/2005 9:35:01 AM
I have a question about databinding. Why are people binding datasets? It binds your implementation to your interface. This breaks OOP principles, and it is bad practice. An interface and implementation should be separate from each other, so if you can make changes to them independent of each ...more >>

Radio Button Group in a Datagrid
Posted by Paul D. Fox at 8/4/2005 11:14:24 AM
I have a Datagrid that has multiple rows with a Radio Group template = item in it. I need to find out if at least one item in the Radio button = group of each row has been selected and if selected, find out which one = was selected and if not, throw a validation message (e.g. "You must = select...more >>

Datagrid columns and ntext (via sql server)
Posted by postings NO[at]SPAM alexshirley.com at 8/4/2005 7:46:39 AM
Hi I've have some text inside a "ntext" data field from SQL server. I am displaying this text as a column in a datagrid using ASP.NET 1.1 and VB.NET. The problem is only the last paragraph of the text appears to be displayed. For instance If the ntext field in the database contains: ...more >>

Unable get Boolean and Numeric values from XLS into Dataset and Datagrid
Posted by vighnesh at 8/4/2005 12:00:00 AM
Hi All I am presently dealing with a project,in which I have to convert an XLS file into XML file. To accomplish this I have used Dataset as intermediatory to store the data from XLS and writting the data to XML file. But unfortunately I am not getting Boolean and Numeric values from th...more >>

Convert units to integers in determining width?
Posted by eagle at 8/3/2005 3:13:30 PM
How can I convert the width of a column to an integer? I want to add the widths of several cells so I can align outside data with it. I tried: Dim i as integer = dg.Columns(1).ItemStyle.Width but of course get an error that the width is in units. Thanks for your help. ...more >>

Update a datagrid on the client
Posted by ZiggY81 via DotNetMonster.com at 8/3/2005 12:00:00 AM
Does anyone know how to update a datagrid using client side code (like Javascript)??? For example, i have two datagrids on my page. The first datagrid lists all the batches i have in my database, while the second datagrid lists the invoices corresponding to each batch. I want the second datagr...more >>

Grids and displays on different monitors
Posted by eagle at 8/2/2005 2:49:13 PM
Does anyone have some ideas of how to make a grid display correctly, and to adjust depending on the size of the monitor/screen? I find if I do not put sizes on the grids or their columns, it will adjust according to the data. In some cases, this is good, but in some, it's not, like with a Com...more >>

Simple_question:__e.Item.Cells(0).Controls=AD(0)
Posted by davidfox789 NO[at]SPAM hotmail.com at 8/2/2005 8:26:19 AM
I am new at this.. probably not proficient enough to even consider myself a Newbie yet. :-) I have a DataGrid with Template columns. After the user edits a field in the DataGrid and presses Update, the UpdateCommand code executes no problem. However... Normally I read the newly edited co...more >>

Datagrid-Column Autowidth
Posted by Jan Waiz at 8/1/2005 7:37:16 PM
Hi All, in my Datagrid the Columns will be shown with the Width that is defined (?) by the Headertext. If the Text of a Row is larger than the Headertext, the Text in the Cell will be wrapped. How can i make the Columns to be "Auto-Width"-Ready? TIA and Regards Jan Waiz ...more >>

Editing only certain items.
Posted by eagle at 8/1/2005 5:17:39 PM
How do I set dynamically which items I want to edit when I go into Edit mode. The code below puts the entire row into Edit mode. The user has 2 buttons, one button uses the code below to edit the entire row, but the other button wants to allow only certain fields to be editable, with the o...more >>

Retrieving Cell Number
Posted by Newbie at 8/1/2005 4:15:06 PM
Hi, Is there a way to retrieve the cell location clicked in a datagrid? For example, if I want to make all of the cells, clickable, to determine which exact cell (not row) was clicked. On click link something like: <a href="www.newpage.com?e.item.cells(?)"> Thanks in Advance ...more >>


DevelopmentNow Blog