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
May 2008
June 2008
all groups > asp.net datagrid control > april 2005

Filter by week: 1 2 3 4 5

Newbie: Datagrid Comes Up Blank?!?
Posted by Altemir at 4/30/2005 12:27:20 PM
Just trying to connect an ASP.NET page to an SQL database. When I run the page, I get no errors but no recordset results are returned via the datagrid control -- it is completely blank. The only thing displayed is the "Job Dispatch List" page title which executed as plain HTML. Code is as ...more >>


trying to display header only
Posted by David Cho at 4/29/2005 4:53:10 PM
I have a form with a datagrid control. And I have a button that will retrieve data and upon postback, the datagrid gets populated. What I would like to have is, upon the loading of the form (before postback), have the datagrid display the header with all the column headings. Right now, n...more >>

binding ArrayLists to DataGrids-- how to name the columns?
Posted by Jim Bancroft at 4/29/2005 4:35:42 PM
Hi everyone, I'm binding an ArrayList to a DataGrid for the first time (I'm used to binding DataSets and DataTables) and I was wondering if I could somehow "name" the ArrayList, so that I can refer to it as a DataField in an asp:BoundColumn? In essence, I'm doing this: ArrayList Arr1 ...more >>

Wrong window gets the content
Posted by Geoff at 4/29/2005 4:07:52 PM
I have a datagrid with a button column. When the user clicks a button in the datagrid, a PDF should open in a child window. To make this happen, I use the grid's ItemDataBound event to add client side code to call a JavaScript function to open the PDF window. Most of the time it works corre...more >>

ItemStyle question
Posted by leodippolito NO[at]SPAM gmail.com at 4/28/2005 1:01:06 PM
Hello sirs, In my aspx file I have a datagrid with some BoundColumn's. When a format has been defined for a column (for colors, horizontal alignment, etc), it adds an ItemStyle element inside the bound column element, as in this example: <asp:BoundColumn DataField="DEEMAIL" SortExpression="...more >>

I've lost my drop down list box!
Posted by postings NO[at]SPAM alexshirley.com at 4/26/2005 10:28:51 AM
Hi I've got a nasty problem with my datagrid. Sorry for the long post, but I am trying to be clear and compact here. FYI - About my datagrid: ------------------------------------------------------------------- I have in the datagrid and an EditCommandButton like so: <asp:EditCommandCol...more >>

Columns are displayed twice
Posted by Phani at 4/26/2005 12:00:00 AM
I have two datagrids .... after handling the click event in one datagrid ..... using its data i query the database and get the data for the second datagrid in both the grids i am generating the columns dynamically the problem is in the second datagrid the columns are appearing twice i d...more >>

DataKey Field problem
Posted by Phani at 4/26/2005 12:00:00 AM
Hi everyone !!! I have a problem here with the DataKey when i try to retrive the data from the DataKeys[e.Item.ItemIndex] i get nothing out of it ... can anyone tell me the reason for this ....plz do help me The main thing i want to do is display a datagrid first and then depending on t...more >>



Datagrid Moving up and down
Posted by John Smith at 4/25/2005 2:59:26 PM
Hi, How we could do moving up and down the datas in a datagrid. Is there any way could do this without hitting the server . thanks in adavance John S ...more >>

Show Date only from DateTime in DataGrid
Posted by bernardpace NO[at]SPAM yahoo.com at 4/25/2005 8:14:38 AM
Hi, I am using the following code to display a datagrid on my page. Now one of the columns is of type DateTime(DataField="myDate"). Now when the datagrid is being shown, the date is given in the following format: 4/30/2005 12:00:00AM Now I require to show only the date, ie time is not requi...more >>

Export to excel problem
Posted by kelvinweb NO[at]SPAM gmail.com at 4/25/2005 1:23:22 AM
Hi All, I don't know why my program exports to excel which can't convert cell format ? for example, I am using the following code: Response.ContentType = "application/vnd.ms-excel"; Response.AddHeader("Content-Disposition", "attachment; filename=OutstandingOrderDetailReport.xls"); "OrderN...more >>

DataRowView - deleting rows: A little quiz -or- Why doesn't this work...
Posted by Chris Mayers at 4/25/2005 12:00:00 AM
Can anyone please tell me what is wrong with the following code: I have a datagrid showing data from in a DataView. The following code snippet is supposed to delete any rows where the 'LineType' column contains WD. The strange thing is it works sometimes (10%?) but usually I get an error: ...more >>

Need to create Hieararical DataGrid using ASP.Net Datagrid !!!
Posted by Phani at 4/25/2005 12:00:00 AM
I have two tables one company table and the other products table ... the main datagrid should show the details of the companies and it should contain a button which on clicked will display another datagrid embedded in the first datagrid which spans all the columns of the first datagrid .... ...more >>

MXDatagrid paging problem
Posted by saravanakumar velusamy via DotNetMonster.com at 4/25/2005 12:00:00 AM
I am using MXDatagrid with paging. I set allowpaging=True in property. But paging is working for only 10 pages. if i clik 12 or 13th pages it return back to 2 or 3 page recpectively. Pls help to me. Very Urgent!!! sample: My paging will be: 1 2 3 4 5 6 7 8 9 10 ... if i click "..." the 11th...more >>

TextBox Value
Posted by Simon Abolnar at 4/24/2005 12:00:00 AM
I have TextBox column in datagrid. I would like to update database with values when user click on button (outside datagrid). Dim cell As TableCell=datagrid.Items(row).Cells(col) textbox=CType(cell.FindControl("TextBox1"), TextBox) If user change text of TextBox in one column, command: tex...more >>

datagrid raw
Posted by Simon Abolnar at 4/23/2005 6:02:08 PM
I would like to read data from datagrid. How can I read one cell from datagrid (raw, column). How can I find out total numbers of raws. Thanks for help, Simon ...more >>

ItemCreated question
Posted by BobU at 4/23/2005 3:26:11 PM
I've got a data grid that uses viewstate to maintain its state between posts. I also have a button outside of the data grid which, when clicked, in its server-side click event handler, sets a mode value (in viewstate) that I want the data grid's ItemCreated handler to act on. However, the Item...more >>

Printing Datagrid
Posted by Nigel Stratton at 4/22/2005 2:07:44 PM
How can one control the pagination of a grid. When I print the last row on a page gets cut in half. I have seen discussions on style sheets but can they control the pagination as well? Also my grid prints ok for the first page but subsequent pages have no internal dividing lines only the bo...more >>

button column
Posted by Chris at 4/22/2005 12:58:48 PM
I need to add a button column to my datagrid. I need to be able to do this at runtime. I can not have the tag <columns></columns> in my aspx page. This is where I am at Private Function CreateProjectDataSource(ByVal projectds As DataSet, ByVal dg As DataGrid) As ICollection Try Dim btn A...more >>

Datagrid column formatting
Posted by Kelly at 4/22/2005 11:30:56 AM
Is it possible to set the column widths of a datagrid? This is driving me crazy, and I haven't found a solution yet. I'm pretty new to ASP.NET so there may be an easy way I'm just not aware of, however, I've Googled this until my eyes hurt and still haven't found a solution. Also, how would ...more >>

SQL DTS and Asp.net
Posted by anonymous at 4/22/2005 8:54:46 AM
Does some one know how to execute a DTS from asp.net?...more >>

Change/read value from control in EditItemTemplate
Posted by postings NO[at]SPAM alexshirley.com at 4/22/2005 7:30:02 AM
Hi In my datagrid I have a textbox in an EditItemTemplate like so -------------------- <asp:TextBox id=txtPrice ontextchanged="txtPrice_TextChanged" runat="server" AutoPostBack="True"> -------------------- I also have back end code like this: -------------------- Sub txtPrice_TextC...more >>

Paging with Datagrid Control
Posted by Joey Liang via DotNetMonster.com at 4/22/2005 12:00:00 AM
Hi all, I have met some problems in implementing paging with datagrid control. From what i know to do paging we must use sqlDataAdapter and dataset but I am using microsoft access database instead of SQL server as a result i cant use SqlDataAdapter and dataset to retrieve data from micr...more >>

how can I get the DataKeyField
Posted by Kylin at 4/22/2005 12:00:00 AM
All that I want to get the DataKeyFielD this is the under code Response.Write(DataGrid1.DataKeyField[i].ToString()); but the result is no I want .. <!-- html.. --> <%@ Page language="c#" Codebehind="DG_DataKeyFied.aspx.cs" AutoEventWireup="false" Inherits="ForTest.DG_DataKeyFied" %> ...more >>

CheckBox in DataGrid .
Posted by Kylin at 4/22/2005 12:00:00 AM
How can I judge which checkbox is checked ? for(int i=0;i<dgOrderList.Items.Count;i++) { CheckBox ordercheck=(CheckBox)dgOrderList.Items[i].FindControl("OrderCheck"); if (ordercheck.Checked==true) { Response.Write(i.ToString()); } } and no results that ...more >>

how to use hyper columns in datagrid
Posted by man at 4/21/2005 11:36:57 PM
I have set the configuration as the attchment jpg file however,when i click the hyper link , it only show the url as below: http://localhost/content.aspx?key_word= even I have chosen the url field is "word" which is a data column in my datagrid And I want to url output as: http://local...more >>

Sex
Posted by pinkpanther at 4/21/2005 3:36:22 PM
<http://www.insidemacgames.com/> ...more >>

MessageBox not showing before Response.Redirect
Posted by bernardpace NO[at]SPAM yahoo.com at 4/21/2005 2:37:24 AM
Hi, I am showing a messagebox with the following method: public static void ShowMessageBox(HtmlTextWriter htmlTextWriter, string message) { htmlTextWriter.Write("<script language=JavaScript>window.alert('"+message+"');</script>"); htmlTextWriter.Flush(); } // end method showMessageBox...more >>

ItemDataBound
Posted by Simon Abolnar at 4/21/2005 12:00:00 AM
I have datagrid with buttons in one column. In ItemDataBound I can disable cells by: e.Item.Cells.Enabled=False How can I do exact thing by disable only buttons, not entire cells. Thanks for answer, Simon ...more >>

Error Message: FindControl requires that controls have unique IDs.
Posted by SouthSpawn at 4/21/2005 12:00:00 AM
I have a datagrid with a checkbox column, and dropdown list that does a autopostback. Basically, the dropdown list is a filter for the datagrid. Here is my workflow. 1. Load .aspx page. 2. Click on filter to show certain results in datagrid. (This will do a autopostback) 3. Select item from...more >>

Add columns to datagrid on the fly!
Posted by VBTECH at 4/20/2005 9:27:02 PM
I have a datagrid in an ASp.net application. Only one column is created at design time, rest of the columns are created and added to grid on the fly. When I try to update values in datagrid through UpdateCommand event code errors out. e.Item.Cells.Count returns 1 even though I have more colu...more >>

read row values from datagrid and populate in new datagrid values from connected
Posted by antonia gogaki via DotNetMonster.com at 4/20/2005 9:11:42 PM
Hello, i am new in asp.net and i am having a question: I am having a datagrid_1 in which i am showing the context of PatientDetails table. When the user double clicks on a row i want to display on a new datagrid_2 (in the same form) the information which corresponds to that patient, but fro...more >>

Slow datagrid on postback
Posted by OTSolutions NO[at]SPAM shaw.ca at 4/20/2005 5:46:34 PM
Hello there, I have a datagrid that has a select button (so the user can choose a row) and also uses the datagrid sort. If I have a smaller grid (say 150 rows) the response time of the sort or select button (that just opens a popup with some information) is a couple of seconds. If I load...more >>

Accessing data object on delete command.
Posted by amit NO[at]SPAM c4ppy.net at 4/20/2005 8:17:17 AM
Hi guys. I have a datagrind that is bound to a custom collection of a custom object. When a delete button is pressed in the datagrid, I not only want to remove the row from the grid, I want to delete the object from the collection that is bound to the grid. So far I have this. public ...more >>

connection string
Posted by anonymous at 4/20/2005 6:07:02 AM
I have the followng string in my web.config file. <add key="DBConnInfo" value="Data Source=SQL01;Initial Catalog=DatabaseName;Trusted_Connection=No;Persist Security Info=True;User id=sa;password=password;" /> Where I am passing a user id to be connected to a sql db. Instead of passing a use...more >>

Howto insert delete rows into a ASP.net datagrid?
Posted by Jimmy at 4/20/2005 12:00:00 AM
Hi I am a newbie ASP.net programmer and can't find a decent code sample to insert/delete/edit rows in a ASP.net datagrid. Thanks Jim ...more >>

Total of multiple columns in datagrid
Posted by Ian Cook at 4/19/2005 9:03:15 PM
I am using VB 6 and have a bound datagrid pulling data from a Pervasive Database by ODBC connection. Column 3 shows opening balance and columns 4-15 show net movement for each month. I want to have a text box on my form that shows sum of columns 4-15 for active record. How do I do it? my code is sho...more >>

Datagrid paging keeps going back to the first group
Posted by Kalvin at 4/19/2005 12:57:30 PM
Sorry to post this in 2 groups, but I just found this group after posting to the other group. I am using the datagrid. I have allowpaging=3Dtrue. I load the data and there is about 7000 records. At the bottom there is pages 1 through 10 and (...). The first time I click on (...) it tak...more >>

filtering from multiple dropdownlists
Posted by viktor9990 at 4/19/2005 2:20:02 AM
I have several DropDownList Controls (ddlOrder, ddlContact...) where the user may select multiple values and let the results be displayed in the datagrid. I know how to filter when chosing from any of these dropdownlists. But don't know how to filer if the user wants to filter based on selecti...more >>

I am a beginner.Pls help me
Posted by Meena via DotNetMonster.com at 4/19/2005 12:00:00 AM
I have a datagrid with a hyperlink column. Now i want to program for the click on the hyperlink. where do i put my code?...more >>

Datagrid Paging Stretch Data
Posted by csgraham74 NO[at]SPAM hotmail.com at 4/18/2005 1:06:25 PM
Hi there just another question regarding paging in a datagrid. In my datagrid i have paging setup for 10 records per page this is fine when there are 10 records in the grid. my issue is that if you have 22 records the first two pages of the grid look fine but the third page will have the 2 rec...more >>

custom sorting
Posted by Paul W at 4/18/2005 11:23:49 AM
Hi, I have a datagrid that I build using data returned from a SP. But I populate the datagrid using a dataview. In this dataview, I populate one of the columns with a string that is basically an html link. The display text is always numeric. For instance, the column will display 7, but t...more >>

FYI: For those interested in the next version of ASP.NET...
Posted by Ken Cox [Microsoft MVP] at 4/17/2005 11:24:58 PM
For those interested in the next version of ASP.NET... Start building an ASP.NET 2.0 site today: Download Visual Web Developer 2005 Express Edition http://lab.msdn.microsoft.com/express/vwd/ ...more >>

Designer locking mdb file... (file and dir GRANTS FULL CONTROL FOR "EVERYONE")
Posted by Praveen at 4/15/2005 11:20:43 AM
Here is an easy issue to reproduce: 1) Create a new project. 2) Drop a DataGrid control into the Page. Also drop a OleDbDataAdapter into the page. 3) Select "Configure Data Adapter..." and pick the NWind.mdb (for example). Go ahead and run through the wizard, selecting a table via sql query...more >>

DataGrid.Dispose
Posted by Sam at 4/15/2005 12:00:00 AM
I want to clear datagird data at memory (Client) but unsure how effective the impact? Coding ------- Sub CLEAR(Sender as Object, e As EventArgs) Rpt_GL_BatchNum.Text = Nothing Rpt_GL_BatchType.Text= Nothing Rpt_GL_DocNum.Text = Nothing Rpt_GL_...more >>

Populate label from Datagrid selection
Posted by Euan at 4/15/2005 12:00:00 AM
Hi there, This might be a simple enough question for most of you. But I am pulling my hair out with this. I have a datagrid populated from a database. Its a booking form. You push a button column to select the row. And now I need to give some specific details from that row in to a label. L...more >>

Edit multiple rows of a datagrid (ASP 1.1)
Posted by postings NO[at]SPAM alexshirley.com at 4/14/2005 6:36:36 AM
Hi Silly question here I guess..... I know I can use an EditCommandColumn to edit a particular row in a datagrid: -------------------------------- Private Sub DataGrid_Edit(ByVal source As System.Object,ByVal e As System.Web.UI.WebControls.DataGridCommandEventArgs) Handles DataGrid.Edit...more >>

Problems with paging.
Posted by lgrottland NO[at]SPAM yahoo.com at 4/13/2005 6:08:45 AM
Hello! I have this strange thing happening here. I'm unavailable to use paging in my grid? I set the AllowPaging to True, and I placed a code into the PageIndexChanged. When I set a breakpoint into the PageIndexChanged it doesn't go there at all. Can anyone give me any idea of how to get...more >>

asp.net 2.0 GridView adding data row?
Posted by merrittr NO[at]SPAM gmail.com at 4/12/2005 11:26:01 PM
I have a 2.0 GridView <asp:GridView Runat="server" ID="GridView1" DataSourceID="AccessDataSource3" BackColor="Gainsboro" BorderColor="#336666" BorderWidth="3px" BorderStyle="Double" CellPadding="4" GridLines="Horizontal" AllowSorting="True" AutoGenerateEditButton="true" DataKeyNames="Universi...more >>

Can I change the mousepointer while hovering over datagrid?
Posted by jef at 4/11/2005 7:44:35 PM
When the mousepointer is hovering over the text area of the grid, it switches to the "I-bar"... I would like it to remain the standard pointer... is there a way to do that? ...more >>


DevelopmentNow Blog