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 2006

Filter by week: 1 2 3 4 5

tool tip for dropdown box, placed in data grid control
Posted by Vijay at 8/31/2006 12:43:01 AM
First I placed the Dropdown box in the template column of the datagrid. Then I papulate the datagrid. For each time the itemDatabound of dataGrid event triggers, I get the instance of the dropdown box, and binds it with datasouce, finally calls the databind of dropdown box. All thing is wor...more >>


Changing databound gridview field to hyperlink- need 2 more params
Posted by RJ at 8/29/2006 2:07:02 PM
Please help... I am trying to make a databound field in a datagrid link to another page that expects 3 parameters. 2 parameters are in the URL (constant from datagrid to new page), and the other is in the datasource and should pass the ID of the record they click. My research so far says to...more >>

Updating a BindingSource that uses a Join!
Posted by Rob Dob at 8/29/2006 1:36:18 PM
Hi, I have both a Customer and a Orders Table, the key field is CustomerID. I also have a DataGrid that uses a BindingSource which uses a dataset which uses a join between the Customers table and the Orders table. Everything displays correctly and when I double click on a row within the ...more >>

Quotes in Command Argument binding expression
Posted by Harlan Messinger at 8/29/2006 8:39:03 AM
In VS2003, inside of a template column, I put a LinkButton with the following attribute: CommandArgument="<%# DataBinder.Eval(Container.DataItem, "OrderID") %>" ASP.NET produced the following error message in the browser: Parser Error Message: The server tag is not well formed. If I p...more >>

Setting color for a single cell in a datagrid.
Posted by UJ at 8/28/2006 1:42:10 PM
How can I set the background color for a single cell dynamically in a datagrid control? I know how to do the entire row but not the cell. TIA - Jeff. ...more >>

Render to Excel - line break problem.
Posted by Q. John Chen at 8/27/2006 9:03:12 PM
All, I posted this in asp.net group some time ago but didn't see any respone. Just noticed this group. I used DataGrid RenderControl to Excel. It works great except one thing: I have a cell that contain new lines - <BR> it rendered to the Excel as multiple-rows. I replaced the <BR> wi...more >>

Accessing data grid column
Posted by John at 8/27/2006 5:00:07 PM
Hi I have a hidden (visible=false) column on a gridview bound to a sql server table. I am trying to access the field as; For Each row As GridViewRow In grdEvents.Rows If row.RowType = DataControlRowType.DataRow Then bf = CType(row.Cells(row.Cells.Count - 1).FindControl("event id"), ...more >>

Nested datagrids -- events not handled correctly
Posted by Steve Hershoff at 8/27/2006 3:55:46 PM
Hi everyone, I've got a strange one here. There are two datagrids on my page, one nested within the other. I'll refer to them as the topmost and secondary datagrids. In the topmost datagrid's OnItemDataBound() method we check for the row in which it's appropriate to add the secondary d...more >>



ASPNET won't connect to Northwind
Posted by Harlan Messinger at 8/25/2006 7:24:41 PM
I installed the Northwind database in my SQL Server developer version, added [MyMachine\ASPNET] to the server logins, and in OSQL ran use Northwind GO grant all to [MyMachine\ASPNET] GO These executed without error. But my test page is being denied access. Learning to bind a data...more >>

BoundField.HtmlEncode = false does not work
Posted by Vyacheslav Lanovets at 8/24/2006 12:00:00 AM
I have some HTML-tagged data in the DataSource (which is a DataTable with 1 column). I added 1 BoundField to my GridView and disabled its HTMLEncode at design time. But GridView still does not want to show formatted text. It shows HTML tags instead :( What should I do to use GridView to...more >>

which expert can finally solve this?
Posted by Cas at 8/21/2006 1:50:07 PM
Hi, I tried to solve this for a while, but there is always somewhere a problem. Here my story: The table contains two fields (field1, field2). I use a gridview for editing the table: field1 can be updated manually, but field2 must be updated with the selectedvalue of a dropdownlist. So I c...more >>

Newbie, gridview problem Asp.net 2005
Posted by verci at 8/19/2006 12:44:28 AM
Hi Can anyone help me I'm running Win XP Pro SP2, VS2005 Team, .Net Framework 2.0 and SQL Server2005, I can't delete records using the gridviews deletecommand, the updatecommand works fine, edit and calcel all works fine the problem is the delete part, I get the message: --------------------...more >>

Newbie, gridview problem ASP.net 2005
Posted by verci at 8/19/2006 12:33:56 AM
Hi Can anyone help me I'm running Win XP Pro SP2, VS2005 Team, .Net Framework 2.0 and SQL Server2005, I can't delete records using the gridviews deletecommand, the updatecommand works fine, edit and calcel all works fine the problem is the delete part, I get the message: -----------------...more >>

Programmatically set template column column header value
Posted by jdhavo NO[at]SPAM yahoo.com at 8/18/2006 11:16:34 AM
Has anyone ever set the header value for a template column in a datagrid programmatically? ...more >>

How to become a successful .net professional
Posted by Ravindra at 8/18/2006 10:58:35 AM
Hi .Net Professionals, I am Ravindra, completed my Post Graduation in computer science and on job trials. I think I am good in .net . I want to know, How to Become a successful .net professional ? and what are the additional skills required ...more >>

DataGrid Date Quandry
Posted by stany at 8/17/2006 10:58:33 PM
I needed to get a string formatted in to datetime and do a sort on the field. The problem however is that I need the datetime format to be dd MMM yy and also allow a sort on the column. converting the string to date time will do away the formatting; and am getting a longdate format instead. Sticking...more >>

Bulk Updates to Rows on gridview won't work as specified?
Posted by BenG at 8/17/2006 11:25:47 AM
I'm trying to impelement the code described in the Microsoft walkthrough: Performing Bulk Updates to Rows Bound to a GridView Web Server Control (http://msdn2.microsoft.com/en-us/library/ms404814.aspx) and it doesn't work as described. When I change a column to a templateField and then change ...more >>

Datagrid ClientID Numbering Problem
Posted by Aminoplacid at 8/17/2006 9:57:02 AM
Hi, I had been working on a highly customized .NET 1.1 datagrid for a project with lots of javascript iterating through my datagrid. I had installed .NET 2.0 a while back and no problems. I had installed SQL Server Management Studio: no problems. I had just installed Visual Studio 2005 yesterda...more >>

<asp:CommandField with dynamic SelectText or <asp:Hyperlink with server side call
Posted by MasterNone at 8/15/2006 7:56:14 PM
Can somebody suggest a way for me to bind the SelectText instead of a static text or show any cool methods to make a server side postback to the same page instead of navigate on a Hyperlink. Either of those solutions are acceptable. I am using a GridView control and would like to have one f...more >>

Databinding in tag problem!
Posted by Henk at 8/14/2006 7:44:12 PM
Hello, I have a problem, with a gridview, i won't a javascript function, OpenPopUP(sCMD,bBoolean,iregID) to run when a image is clicked. So i add an onclick event to the img tag like this. (this is in the itemtemplate off the gridview) <img src="img/edit.gif" style="width: 18px; height: 18...more >>

Set maximum Rows to be displayed in a datagrid
Posted by Nicolaj at 8/13/2006 3:14:36 AM
How do I set the maximum number of rows for a datagrid when binding a datareader to it? I am presently using: OracleDataReader dr = getResults( parameters ); //returns a datareader if (dr.HasRows) { dgSomeDatagrid.DataSource = dr; dgSomeDatagrid.DataBind(); } else /// I'v...more >>

width of columns when editing text in the datagrid
Posted by pleaseHelp at 8/12/2006 1:43:41 PM
I have a datagrid that contains multiple text columns which I need to have wrapped because of their size. Below is the code that I have at the moment. When the grid is viewed in either Internet Explorer or Firefox everything looks perfect - good column widths and the text all wraps correctly. ...more >>

2 simple question about gridview
Posted by luigi.corrias NO[at]SPAM gmail.com at 8/11/2006 8:44:31 AM
Hello World! My first question is How i van modify the default text 'edit' 'delete' etc.. from gridview? and How i can add a javascript condirm alert whit delete link inside a gridview? Plase thank L. ...more >>

Datagird column resizing and reordering
Posted by Baski at 8/7/2006 3:02:03 PM
Anybody find a solution to implement column resizing and column reordering for datagrid ? ( custom solution , not looking for third party components)? ...more >>

how to set focus on an edititem in a gridview
Posted by Roberto Kohler at 8/6/2006 2:28:57 PM
I have a gridview with an edititem template that contains a textbox. When I change to edit mode, I would like the focus to be set to the textbox of the row I selected to edit. The problem I have is that even though the page is displayed correctly, I need to scroll down to find the row I se...more >>

Controls In DataGrid?
Posted by Arpan at 8/6/2006 1:46:49 PM
Consider the following code which retrieves data from a SQL Server 2005 DB table & displays it in a DataGrid: <script runat="server"> Sub Page_Load(ByVal obj As Object, ByVal ea As EventArgs) Dim dSet As DataSet Dim sqlConn As SqlConnection Dim sqlDapter As SqlDat...more >>

Displaying Headertext of datagrid in vertical Direction
Posted by sreekantp NO[at]SPAM gmail.com at 8/4/2006 1:42:36 PM
Hello, I have a problem formatting my datagrid which I am using to display around 35 columns in one single aspx page and wanted to know how can I tilt or rotate my headertext of datagrid in veritical direction instead of usually horizontal directions. Is there any other way to squeeze my data...more >>

Display an Access Memo field in a GridView or DetailsView
Posted by Hanno at 8/4/2006 11:07:09 AM
Hi, I am trying to display a memo field in a grid in. I have tried with the GridView and DetailsView, but it's treated as text field. Is it possible to display and edit a memo field in a grid or DetailsView? I am using VS .net 2005. Many thanks Hanno ...more >>

Gridview RenderControl
Posted by Philip at 8/4/2006 8:36:02 AM
I need to capture the HTML output from a Gridview control....so I am executing the following code... StringBuilder sb = new StringBuilder(); StringWriter sw = new StringWriter(sb); HtmlTextWriter htw = new HtmlTextWriter(sw); MyGridview.Render...more >>

Delete Template
Posted by Jeremy Martin at 8/4/2006 12:41:54 AM
Hi, I am using a datagrid to edit the ItemTemplate and EditItemTemplate however I was wondering if there was a DeleteItemTemplate. What I would like to accomplish is when they click the delete button column it would reload the grid and one of the columns would have a chkboxlist containing...more >>

Get value if invisible
Posted by ghostwolf at 8/2/2006 12:00:00 AM
Hi, I'm using the asp:gridview control for displaying the data from SQL Server. Now, I've found that if the column is invisible "<asp:BoundField DataField="some_id" HeaderText="some_id" SortExpression="some_id" Visible="false"/>", I cannot get the value from that column (just get the null ...more >>

SortCommend event is being fired twice
Posted by Anup at 8/1/2006 4:22:58 AM
Hi Group, In my application I am using a datagrid, now I m implementing sorting for that datagrid, I am changing the flag for ascending and descending when SortCommand event of datagrid is fired. Now the problem I am facing is that the Sort Command event is being fired twice even if I clic...more >>

Set column width in the datagrid in the ItemdataBound event
Posted by Naveen at 8/1/2006 12:00:00 AM
Hello , I want to set the column in the datagrid in the ItemDataBound event e.Item.Cells[0].Width = new Unit("100px"); is not working. Please suggest alternate solution ...more >>


DevelopmentNow Blog