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 > october 2004

Filter by week: 1 2 3 4 5

Aligning DataGrid Columns!!
Posted by Anthony Judd at 10/31/2004 9:49:20 PM
Can anyone tell me, how do right align datagrid columns? Help is appreciated!! <Columns> <asp:BoundColumn DataField="page_template_filename" ReadOnly="True" HeaderText="Template:"></asp:BoundColumn> <asp:BoundColumn DataField="navigation_item_name" ReadOnly="True" HeaderText="Name:...more >>


e.Item.ItemIndex and e.Item.DataSetIndex
Posted by Scott M. at 10/31/2004 9:35:31 PM
When writing the update event handler for a web forms DataGrid, I am running into a situation that is giving me quite the headache! If a user has sorted the items in a DataGrid and then chooses to edit one of the items, I have found that e.Item.ItemIndex and e.Item.DataSetIndex will both ret...more >>

aspnet_wp.exe (PID: 500) was recycled because memory consumption e
Posted by Raju at 10/31/2004 2:39:01 PM
Hi , We are develoed the .net application(asp.net, vb.net and sql server ). Till yesterday there was no problem with the application. Is was working fine. In our application we have one Lock and Unlock Button. When you click on Lock button, the page will turn into ReadOnly mode. When you cl...more >>

hyperlink text in a datagrid?
Posted by Tina at 10/31/2004 1:35:43 PM
I'm going through a DataGridItem looking to find the text in a hyperlink column. It's not in mydataGridItem.cells(3).text. Where is it? thanks, T ...more >>

Data Grid Disappears after postback
Posted by Hagai Amiel via .NET 247 at 10/31/2004 3:46:55 AM
Hello There I have created a fully programmatically datagrid each time I press any button, the datagrid disappears when it posts back how do I keep the grid on the screen without re-constructing it from scratch each time? I have tryed saving it on session variables without any success Followi...more >>

Show muliple headers in datagrid
Posted by Flare at 10/30/2004 12:10:54 PM
Hi Im trying to make a datagrid wich have a header and a subheader directly under. The top header is the problem sine it should "group" the subheader. I imagine to use columspan on the top header. I just cant see how i should define this topheader. I wanrt something like this: where [] i...more >>

CustomValidator inside Datagrid
Posted by Trauckos at 10/29/2004 12:14:43 PM
How i can validate a CustomValidator inside datagrid Thanks ...more >>

datagrid onitemcommand not firing
Posted by smandelecha NO[at]SPAM gmail.com at 10/29/2004 12:07:12 PM
Here's my problem. I have a Button. On clicking, it binds data to datagrid grid1 grid1 has a Column of LinkButton OnItemCommand of this grid1 binds data to datagrid grid2 It binds data to grid1. But when I click on any of the LinkButtons of grid1 the OnItemCommand doesnt fireup. On debugging...more >>



About of DataGrid, RadiButtonList and DropDownList From Mexico City
Posted by Ricardo Ostos {MX} at 10/29/2004 10:04:09 AM
Hi, friends as are wishing them the best thing to them of this life. I have: VS .NET Pro 2003 Win 2000 Pro with SP4 Sql Server 2000 with SP3 Developer Web, with C# I have a DataGrid where I show all my products I have a column of Templete type, where I show a RadioButtonList, depending ...more >>

DataGrid with validator
Posted by BEN at 10/29/2004 12:21:51 AM
Hi, I want to add a custom validator to a dataGrid's boundcolumn. I use datagrid's "edit, update, cancel" button to do. But I cannot find a method to add the validator to boundcolumn. In other way, I try to use TemplateColumn and EditItemTemplate with custom validator. But I cannot bind the...more >>

How to display shortdate format on a datagrid?
Posted by xie NO[at]SPAM proexam.org at 10/27/2004 1:02:18 PM
Hi, I am displaying a datagrid on my webpage and it is linking to a dataset. There is a datetime value from the dataset showing on the webpage(datagrid) as full date format, like "10/27/2004 12:00:00 AM". How can I convert them to shortdate format '10/27/2004'? Before I was using sth like: <a...more >>

Need help applying a stylesheet to a pushbutton control in a datagrid
Posted by Tim Meagher at 10/26/2004 11:46:16 PM
Can anyone help me figure out how to apply a stylesheet to a pushbutton defined in the asp:BoundColumn or asp:EditCommandColumn elements of a datagrid? ...more >>

DataGridItem.DataItem property?
Posted by Joel Lyons at 10/26/2004 2:09:25 PM
The help pages make it look like the DataGridItem.DataItem property would return a row from the bound table. Like so: //(during setup) myGrid.DataSource = myDataset.MyTable; myGrid.DataBind(); //(in OnSelectedIndexChanged) MyTableRow row = myGrid.SelectedItem.DataItem as MyTableRow; myL...more >>

databinding & classes
Posted by Bart at 10/26/2004 6:23:02 AM
I made an arraylist wich contains a certain amount of objects from the class 'employees'. The class 'employees' contains also an object 'department'. You can see the class diagram (http://users.pandora.be/bart.geurs/class.gif). The next step is to bind that arraylist to a datagrid. It works, ...more >>

bidirectional sort with datagrid
Posted by DC Gringo at 10/25/2004 6:05:11 PM
Can someone show me how to turn this into a bi-directional sort allowing ascending and descending using the default datagrid allowsorting attribute? FYI, Session("source") is an sqldataadapter ------------ Protected Sub SortCommand_OnClick(ByVal source As Object, ByVal e As System.Web.UI....more >>

Add formatted text to JavaScript function call during ItemDataBound of a Repeater Control.
Posted by Bryan at 10/25/2004 5:10:41 PM
Hello, I am taking values from a datatable and formatting them for use in a JavaScript Function Call. The end result is a mouse over tool tip. Here is what I am doing. I have tried to use a property but it uses the last set value of all. Private Sub drTasks_ItemDataBound(ByVal sender ...more >>

Problem with ItemDAtaBound event of datalist
Posted by Bill Yeager at 10/25/2004 10:13:21 AM
I have a datalist that displays the following when a web page is rendered: Community_Property: 2 | Corporation: 5 | Custodian: 10 | Individual: 138 | Joint: 82 | Tenants_By_Entirety: 0 | Tenants_In_Common: 1 | Trust: 82 Each of the text items above is a linkbutton. However, I want to...more >>

CSV file to datagrid, data missing & funny character
Posted by j.jung NO[at]SPAM gmbsupport.com at 10/24/2004 11:57:18 PM
Hi, I'm trying to import data from a CSV file to a dataset, then trying to add this to a datagrid. Problem is the datagrid is only displaying the first element in the CSV file with a funny 'yp' character in the first cell. The header is being created from the schema.ini The totally con...more >>

How to do a multiple select and update in a datagrid
Posted by Wolffang at 10/23/2004 9:21:19 PM
Using Visual studio.net VB I have a datagrid that brings records from a stored procedure. Be selecting multiple datarows using a checkbox. All i want to do is update a field called 'Active' datatype bit from 0 to 1 for all those records that have been selected with the checkbox and mark a...more >>

How to copy n paste .asp files to Solution Explorer and have it show up there?
Posted by Jason Robertson at 10/23/2004 12:06:44 PM
Hi, I have just installed Visual Studio.net 2003 Enterprise Architect. I have been using Visual Interdev so far, and I am used to be able to select from a desktop bunch of .asp files, drag and drop them into a Project Explorer window and have it show there as a tree of files. Is there some se...more >>

Move Datagrid Row Up/Down
Posted by Michael Murphy at 10/22/2004 4:05:33 PM
Hi, Anyone have suggestions for how to select a row in a web datagrid and either drag and drop it somewhere else in the grid or use up/down arrows to move the row to the desired location? Any feedback would be appreciated. Thanks, Michael Murphy mdmurphy@scs-techresources.com 954-452-1047 ...more >>

Hyperlink column in datagrid
Posted by ReidarT at 10/22/2004 10:12:44 AM
I am trying to insert a hyperlink column in a datagrid the field consist of a http://www.something.no/text.asp?id=FieldID where FieldID is the field from the sql-server I normally would have concatenated the text and the field "http:\\www.something.no/text.asp?id=" & FieldID, but I don't know ...more >>

DG Column Width vs Table Column Width
Posted by Carl Howarth at 10/22/2004 9:29:39 AM
Hi, I am wanting to display data in a datagrid with additional header rows above it that categorise some of the main headers of the datagrid. I am therefore creating a table above the datagrid using the same padding/spacing options. The problem I am having is that when I define the width of...more >>

Vertical size of datagrid
Posted by ReidarT at 10/22/2004 8:50:55 AM
I have a datagrid with some comboboxes at the top. I want the height of the datagrid to be fixed and with vertical scrollbar, so I don't loose the comboboxes at the top when the result of the records in the datagrid needs more than one page. I don't want paging, just a vertical scrollbar. rei...more >>

How to convert from BirthDate to Age
Posted by Jesper Pedersen at 10/21/2004 11:04:16 PM
Hi ! please help - I have tabel with a Birthday column in a access database and need to show the age in a datagrid. ------------------------------------------------------------------- found this little code: ------------------------------------------------------------------- <% DateTime birth...more >>

how to delete a row in DataGrid
Posted by Nandini at 10/21/2004 3:34:13 PM
I have to delete a row in Datagrid by selecting the checkbox. And also to select all checkboxes when we select "select" option for checkboxes. I kept this below code........but it's giving error ... <script> function select_deselectAll (chkVal, idVal) { var frm = document.forms[...more >>

How to Export to Excel?
Posted by Luis Esteban Valencia at 10/21/2004 11:53:59 AM
How can I export to a excel a datagrid? -- LUIS ESTEBAN VALENCIA MICROSOFT DCE 2. MIEMBRO ACTIVO DE ALIANZADEV ...more >>

Datagrid lose Items in Postback
Posted by Amir at 10/21/2004 3:55:06 AM
Hi all I have only a Datagrid and a submit button on a form. I use 2 template columns and some bounded columns in my grid too. I just want to process Datagrid's items in a for loop in the event handler of Button click. My loop look like this: for(int i=0;i<dg.Items.Count;i++) { .... } ...more >>

How can I sum Columns on a datagrid?
Posted by Luis Esteban Valencia at 10/20/2004 9:35:30 AM
I placed some labels on the footertemplate of each column that I want to sum. But I dont know hot so sum and show the total in the labels. -- LUIS ESTEBAN VALENCIA MICROSOFT DCE 2. MIEMBRO ACTIVO DE ALIANZADEV ...more >>

Select datagrid rows with key-up and key-down?
Posted by Mervin Williams at 10/19/2004 2:34:40 PM
I have an application that uses a windows forms datagrid. How do I select rows using the up-arrow and down-arrow keys? Mervin Williams ...more >>

Data grid edit mode question
Posted by Brian Watkins at 10/19/2004 10:52:07 AM
Does anyone know how to default the data grid to edit mode for all rows at once? I would like to get rid of the Edit, Update, Cancel column because I find it too cumbersome for the user to enter data. Instead I want to open the grid with all editable rows textboxes showing. The user could ...more >>

Highlight Specific Row in DG?
Posted by James Goodman at 10/18/2004 4:16:59 PM
I have a stored procedure which is the datasource for my grid. This is called daTaskHistory. It contains a UNION select statement, returning current & historical data. A column, [CurrentR] will be 1 for the current record, & 0 for historical records. I want to highlight the current record w...more >>

No data in DataGrid
Posted by register NO[at]SPAM sosgmbh.at at 10/18/2004 7:08:35 AM
I am having trouble getting my data into the datagrid. All I get is the header row. What am I doing wrong? Or is there a problem with the new service packs? Here is my source code: DbConnection db = new DbConnection(conString,DbTypEnum.SQL_Server_Typ); SuperDataAdapter adapLogs = db...more >>

How to increase or decrease the width of the column in datagrid
Posted by Sivaraman.S at 10/18/2004 5:55:04 AM
Hi friends, How to increase or decrease the width of the column in datagrid? regards, Sivaraman.S...more >>

Retreive values from invisible cell
Posted by Patrice COTE via .NET 247 at 10/17/2004 3:03:41 AM
Hi ! I'm trying to update a table with an editable DataGrid (Edit,= Update, Cancel button)=2E In the Update event of the item, I can= retreive every value by using the TableCell object= (DataGridCommandEventArgs=2EItem)=2E The only value I can' retreive= is the one that I stored in an inv...more >>

Data Grid Disappears after postback
Posted by Hagai Amiel via .NET 247 at 10/17/2004 3:02:26 AM
Hello There I have created a fully programmatically datagrid each time I press any button, the datagrid disappears when it posts back how do I keep the grid on the screen without re-constructing it from scratch each time? I have tryed saving it on session variables without any success Followi...more >>

One for the Experts
Posted by onroo NO[at]SPAM earthlink.net at 10/16/2004 4:22:26 PM
Hello all, I have a sticky situation that needs an expert solution. Please help! My ASP.NET page has a datagrid which is bound to a dataset. No surprise there. As the data is bound and rendered, I add a button to the cell in one of the columns at run-time in the ItemDataBoundEvent. The...more >>

Question on Datagrid
Posted by Goober at 10/15/2004 11:48:08 AM
I have a list that's produced in a datagrid on a web page, that is ordered by a 14 character field. The entire grid is displayed, no paging or anything. What I'd like to do with the datagrid is to make a different display between the sections as that order by field changes. For instance: ...more >>

DataGrid Binding Question - Multiple Rows as One.
Posted by mike_olivieri NO[at]SPAM comcast.net at 10/13/2004 12:52:23 PM
Hi! Been stuck on this one for a bit. Would really appreciate any help on this one. In Regards to ASP.NET To start. I have a sql database table with the following data and design (ex) ------------------------------------ provider_id | plan_id | plan cost -------------------------------...more >>

How to do this with datagrid
Posted by Lasse Edsvik at 10/13/2004 10:22:41 AM
Hello I'm trying to build a page in asp.net that lists employees from a db. And I was wondering if you could help me translate this asp to asp.net and with a datagrid. can't figure it out with all if's and so ..... open db and stuff <table> <% while not rs.eof then %> <tr> <% if t...more >>

Binding Data
Posted by David P. Donahue at 10/13/2004 9:10:30 AM
Currently, when I bind data to a DataGrid, I use a function as such: Dim conGrid As SqlClient.SqlConnection Dim daGrid As SqlClient.SqlDataAdapter Dim dsGrid As DataSet Dim stringSQL As String stringSQL = "SELECT * FROM UserProfiles" conGrid = New SqlClient.SqlConnection(Global.strDBConnect)...more >>

Datagrid with SQL sentences in its columns. ONLY FOR EXPERTS.
Posted by Luis Esteban Valencia at 10/12/2004 10:45:39 AM
I have a little application of a Knowledgebase for my company. The systems engineers cam Log in to the application, write some problemas and the solution can be SQL commands. I put ValidateRequest=false for the page to accept those inputs. Anyway in the Page where users can search for soluti...more >>

client side sorting of datagrid items
Posted by Andrea Williams at 10/11/2004 3:11:07 PM
Does anyone know if there's code out there to manage client-side sorting of datagrid items? I'd like to be able to fill a datagrid with records from the database, then allow the user to put the records in their preferred order. So I envision two buttons for each row that are for up and down and...more >>

Column Header with Variable
Posted by Hai at 10/11/2004 2:56:06 PM
Dear gurus, Is it possible to specify the column header with variable? If I want to make headerText as Sales and Credit how do I do so? Thanks in Advance. Hai 'Here the codes Dim s1,s2 as string s1 = "Sales" s2 = "Credit" <asp:DataGrid ID="mygrid1" AutoGenerateCo...more >>

Help needed
Posted by Rajeev at 10/11/2004 2:20:48 PM
Hi All, I am using a datagrid control. first column of the datagrid is having a checkbox (which used to select/deselect all the items in the grid).There is an asp:button in the page. I want to enable/disable this delete button, if the user selects none of the checkboxes then the button shou...more >>

how to set visible table out of dataset?
Posted by GoodMorningSky at 10/11/2004 1:57:44 PM
Hi, all. A Form has a DataGrid bound to a DataSet including two DataTable, A and B. When Form is loaded the two table is populated to DataSet and DataTable A is shown on DataGrid initially. When a Button is clicked the DataTable B will be shown. How can I do this? ...more >>

Datagrid Columns
Posted by J. Shane Kunkle at 10/11/2004 11:59:02 AM
I have a datagrid that contains a bunch of boundcolumns: <asp:datagrid id="DataGrid1" runat="server" autogeneratecolumns="False"> <columns> <asp:boundcolumn datafield="Column1" sortexpression=" Column1" /> <asp:boundcolumn datafield="Column2" sortexpression=" Column2" /> ...more >>

Changing Width of Datagrid (AutoGenerateColumn=true)
Posted by ghosthunter NO[at]SPAM gmx.at at 10/11/2004 4:42:27 AM
Hi, hope some1 can help me trying this about a week. I read the data for my Datagrid into a dataset, convert a little bit and store the finalresult in another ds from an Access-DB and bind the data ds.Tables.Add("Vendor") With ds.Tables("Vendor").Columns ..Add("Verkäufer") ..Add("Name") ...more >>

DataGrid font size???
Posted by BCM at 10/9/2004 12:26:46 PM
I cant' believe I have to ask this, but... How do you adjust the font size in a DataGrid? I know about the FONT property of the DataGrid proper, and the FONT property of the ITEMSTYLE, and I can see how to adjust the size. But nothing has any effect on the display: no matter what I do, I get t...more >>

Programmatically Change Text Property of Label in ItemTemplate in Datagrid
Posted by Craig at 10/8/2004 6:33:38 PM
How do I programmatically change the text property of a label in an ItemTemplate in a datagrid? Specifically the Text property. I want to change the databinding to another column at runtime. <asp:TemplateColumn HeaderText="Rate1"> <ItemTemplate> <asp:Label runat="server" Text='<%# fRate(D...more >>


DevelopmentNow Blog