Groups | Blog | Home


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 > march 2005

Filter by week: 1 2 3 4 5

Problem with Paging and Parameter passing using Hyperlink Column @ DATAGRID
Posted by Vigneshwar Naidu Pilli via DotNetMonster.com at 3/31/2005 8:06:31 AM
Hey, I have a Problem in implementation. I need to desing something like this, its all about reporting applications for bachelor program in computer science for my university. like, i have three columns in the datagrid, SSN, Fname and Lname. SSN is a hyperlink, the Fname , Lname and SSN are ...more >>

newbie to datagrids
Posted by bernardpace NO[at]SPAM yahoo.com at 3/31/2005 12:40:52 AM
Hi, I designed my datagrid as shown in the code below. I also succeded to load the data into it. Now I have added a push button remove, but I don't know how to handle the event. Can someone help me out. Thanks in Advance /******** for datagrid *********/ <asp:DataGrid DataKeyF...more >>

ReCalcuating Total from the Template columns in the datagrid using javascript.
Posted by Zaib at 3/30/2005 11:22:35 AM
Hi, I am using Datagrid and i have 3 template columns in it. i want to calculate sum of first 2 columns in 3 rd columns... first 2 columns values are comming from database.. if user change some values in grid then sum should be recalculated on client side thanks ...more >>

Would like to load a datagrid already in edit mode instead of having the user click the edit button
Posted by Frank Kurka at 3/29/2005 6:31:55 PM
Now my asp.net datagrid shows an edit button and clicking it puts the = datagrid in edit mode. I would like to: 1) possilby load the page already in edit mode (implies some kind of = OnLoad command to the datagrid to put it in edit mode before it is = rendered and sent) and 2) have a ...more >>

Logic
Posted by anonymous at 3/29/2005 12:32:41 PM
I need some help. I have 2 loops. One to find a RadioButtonList in datagrid and second in Session("Answ"). I am trying to assing value from Session("Answ") to RadioButtonList.selectedValue. However the value which is selected is the last value in session. Where did I mixed the logic.Thank...more >>

custom replacement of EditCommandColumn
Posted by news.microsoft.com at 3/29/2005 11:45:10 AM
I want to use the Edit-Update-Cancel workflow functionality built into the DataGrid but instead of using an EditCommandColumn to display a button or link to trigger the EditCommand event firing, I want to trigger that event on a particular selection from a DropDownList within one of the column...more >>

Export to Excel with paging still getting errors
Posted by Travis at 3/29/2005 7:29:24 AM
I have read many articles and I can't seem to figure out what is wrong. I was able to get just the first page only but I need to get all the pages. Any help is appreciated. Here is the error I am getting: Object reference not set to an instance of an object. Description: An unhandled except...more >>

populating a datagrid
Posted by viktor9990 at 3/29/2005 7:21:02 AM
I have a datagrid with 2 item templates inside a hyperlink and a label (which will show the file name and creation date of files which resides on a folder on the server. I'm using a procedure (GetScannedFiles()) to loop and get the required information from the folder but don't know how to sho...more >>



help needed regarding the datagrid and mages
Posted by Sriram Mantha at 3/28/2005 9:22:39 PM
Hi could some one give me some information on how to dispay images in a datagrid control retrieving images stored in a folder. -- Sriram Mantha Graduate Student University of texas at Dallas 2700 waterview parkway ph:972-697-1562 email:mantha_sriram@yahoo.com #5138 Richardson TX ...more >>

Trying to implement master/detail with 2 datagrids
Posted by Buddy Robbins at 3/28/2005 4:26:13 PM
I am trying to implement a master/detail type page in ASP.Net (VB) using 2 datagrids. I would like to make it so when you click on a row in the master, the postback happens, the dataview for the detail is filtered on the master row selected. In the master's ItemDataBound event, I add an on...more >>

can i use dynamic variable inside a dataadapter and bind to datagrid
Posted by jijis at 3/28/2005 4:04:49 PM
Hi I want to use a sql designed in the dataadapter and I want to pass a variable so it can retrieve related data by using "WHERE" clause in the sql statement. ...more >>

Label text from template column is blank in ItemCommand event
Posted by Kim Quigley at 3/28/2005 2:47:08 PM
I have a datagrid with a template column and in that column I have some label controls and an image button. The image button causes the Products_ItemCommand event to fire; however, the value of ItemID is "". Can anyone explain why this is so and how to get around it? Thanks! HTML: <asp:Label ...more >>

assigning itemtemplate, edititemtemplate programmatically
Posted by Steve P at 3/28/2005 1:25:02 PM
This really is a question for Datalist, since that is what I am primarily using; however it should apply to Datagrid as well. I would like to be able to assign the itemtemplate and edititemtemplate programmatically based on how the user would like the data layed out. I have been able to ac...more >>

How to pull the data out from two table and bind to repeater
Posted by chng yeekhoon via DotNetMonster.com at 3/27/2005 2:37:02 PM
HI All, Can somebody help what's wrong with my SQL Query statement when i want to create a join table query. It suppose work perfectly fine, but why it cant work. The error that the ASP.Net throw out is "Object reference not set to an instance of an object. " and "System.NullReferenceException...more >>

Datagrid redirect query
Posted by shadrik at 3/27/2005 9:05:56 AM
Hi peoples, does anyone know how I would go about using a value from a datagrid to redirect someone to another page. this is a description of exactly my problem. I have a sql database table that gets pulled into a datagrid. the table has fields like, threadID, subject, dateStarted etc I...more >>

problem exporting datagrid to excel
Posted by Dave Bailey via DotNetMonster.com at 3/25/2005 6:45:30 PM
I am using the following code to export a datagrid to excel from an asp page: private void exportButton_Click(object sender, System.EventArgs e) { Response.Clear(); Response.Buffer = true; Response.ContentType = "application/vnd.ms-excel"; Response.Charset = ""; this.Enabl...more >>

How can I display hashtable key values in a web page?
Posted by Chuck Insight at 3/25/2005 1:39:17 PM
Here is my first attempt at populating the hashtable. dim t as hashtable = new hashtable() dim k as integer = t.key dim v as integer = t.value v = 0 for k = 1 to 200 on error goto bottom if t.count = 50 then goto exit end if k = int(rnd * 50) +1 v += 1 ...more >>

Move bound column to right of dynamic column in datagrid?
Posted by John E. at 3/24/2005 5:23:49 PM
I have a datatable that I am binding to a C# ASP.NET 1.1 web page. I also want to put an "Edit" column on the datagrid. However, whenever I use the following code, it puts the Edit column on the left. I cannot figure out how to get it to the right, as there is no DataGridTableStyle for ASP as ...more >>

User Control
Posted by anonymous at 3/24/2005 11:45:09 AM
I have a user control on my form. How do I loop thought user control to find out what controls are used and the value of controls? On user control there is some textbox, label etc. depending on a passing value to a user control different controls are displayed. Thanks ...more >>

ASP .Net Message box help Needed Very urgent
Posted by Thankaraj U via DotNetMonster.com at 3/24/2005 7:20:19 AM
Hello Group, This is my code. butPrev.Attributes.Add("OnClick", "return confirm('Do you want to SAVE this item?');") How to capture whether the user is click "OK" or "CANCEL" button. I want the javascript returning value. If the user click "OK" then what is the returning value. If the...more >>

SortCommand and PageIndexChange event not firing
Posted by sa siva via .NET 247 at 3/24/2005 5:55:11 AM
hi, I have a datagrid in which I have enabled sorting and paging=2E= I have specified event handlers for sorting and pageindexchange= events=2E I have disabled the viewstate of the grid=2E Now those 2= events are not getting fired when i try to sort by clicking on= the column header link or ...more >>

To Eliyahu
Posted by jijis at 3/23/2005 7:47:45 PM
"Build item template as a table with as many rows as you wish" Would you mind tell me how to build the item template table? I can only create a "Template Column" in Datagrid Property Builder Or any one can help me please ...more >>

Print WebForm DataGrid
Posted by Dave Bailey via DotNetMonster.com at 3/23/2005 6:25:02 PM
Is it possible to print a webfor datagrid and if so how? Thanks, Dave -- Message posted via http://www.dotnetmonster.com...more >>

Dynamically Add Validation to Datagrid
Posted by dave at 3/23/2005 7:09:01 AM
I have a dgrid with some edit boxes for entry which i need to validate. When i input the validation within the bound columns in the .aspx page it works fine, but if try and add the validation dynamically in the code behind file - i get the error that it cannot find the control to validate. ...more >>

Add text from listbox into datagrid column
Posted by Melson at 3/23/2005 12:00:00 AM
Hi Can anyone help me. I've a datagrid with 3 columns which are employeeID, name and age in form1. I've another form, form2 which list the employeeID in the listbox. I would like the employeeID in the listbox(form2) insert into the employeID in the datagrid when I choose the employeeID from...more >>

Add row to datagrid?
Posted by Luis Esteban Valencia at 3/22/2005 10:24:48 PM
my datagrid and code behind code and help me if possible. I am making asingle sales system and I need to add a new row with a linkbutton that I put on the footer of the datagrid. My datagrid has a product column (dropdownlist), quanitity( the user can enter text here), price (not editable), t...more >>

Help
Posted by jijis at 3/22/2005 7:30:07 PM
Hello I want to know how can I make the datagrid display not only as a rectangular table format. For example, row 1 data in the datagrid i want to display the column of "row 1" in the first row of output, then the column 2 and column 3 of the "row 1" in the next row of the output. thx plea...more >>

Back Button
Posted by anonymous at 3/22/2005 12:24:32 PM
How do I Disable the Back Button on the page? That the user can' go back to the previuos page they can stay only on a current page....more >>

Dataset
Posted by anonymous at 3/22/2005 8:11:20 AM
How do store text from text boxes in dataset?...more >>

Datagrid column width
Posted by David Webb at 3/21/2005 3:49:48 PM
Hi, I am having real trouble changing the width of a column on a datagrid. I have tried changing the size of an existing column and adding a new column with the width predefined but nothing seems to have any effect and its driving me mad. Can somebody please tell me what I am doing wrong. I ha...more >>

Different FontColors depending on Value
Posted by Jörg Reinhardt at 3/21/2005 2:27:21 PM
I want to display the text in a different color if a value in an other column ist False. How can I realice this? Many thanks in advance Joerg Reinhardt ...more >>

EditItemTemplae and Postback
Posted by Scott Friedrich at 3/21/2005 12:01:02 PM
I have a dropdownlist in the EditItemTemplate. I have AutoPostBack set to True. The page does post back on SelectedIndexChanged but I can't seem to add a handler to grab it. Anyone have a sample? Scott...more >>

UserControl inside of datagrid - loses its viewstate when datagrid is re-bound on postback
Posted by DotNetJunky at 3/21/2005 11:26:22 AM
I have a simple usercontrol, a datepicker which contains 3 dropdownlist , it resides inside a datagrid column and i set the selecteddate property of the usercontrol from one of the DataBinder.Eval 's ... everythign works fine. The datepicker also works fine on a regular page, and will normally...more >>

Compact code
Posted by anonymous at 3/21/2005 9:15:05 AM
I have mycontrol as custom control and I need to get some data from a control on a different page. My code is below. It is working perfectly fine, but since I have 10 more label to check is it some how I can make this code is more compact? If CType(myconrtol.FindControl("lblCompany"), ...more >>

DataGrid doesn't do HTML entity encoding.
Posted by Chris Mumford at 3/20/2005 1:39:00 PM
I have a DataGrid bound to a table where one of the strings is "<Unknown>". When this is sent out via the DataGrid control as HTML it is not encoded and therefore it looks like a tag in the HTML stream. What I would expect is "&lt;Unknown&gt;". Does anybody know how to make this happen? ...more >>

Can't get text value of hidden (visible = false) column..
Posted by jef at 3/20/2005 10:32:58 AM
I'm trying to get the value of a cell in my DataGrid_UpdateColumn() event handler. I have a datagrid with 4 columns: 1 - Name, 2 - Description, 3- Button Column (Edit,Update,Cancel), 4- Primary Key Value for row The 4th column is hidden as I need the data for subsequent update to the datab...more >>

Access individual item in a datagrid
Posted by shadrik at 3/19/2005 2:16:20 PM
Hi people. I've been pulling my hair out over this one. :) Ive got a datagrid that contains values pulled from a sql query. its limited to one record because the record is unique in that it contains user login data (username password etc) When the user enters their username and password, t...more >>

Check Parent-child relationship in datagrid
Posted by Grey at 3/18/2005 11:09:05 PM
I have two data tables and forms the parent-child relation between them. However, not all parents have child row, In the datagrid, if the parent row has child records, the first image of will display "plus" picture , otherwise the image will change to "minus" picture to indicate no more dril...more >>

iterate through only one column of a datagrid
Posted by Dave Bailey via DotNetMonster.com at 3/18/2005 5:36:14 PM
I need to access the information in only one column of a datagrid. The column is column[3]. When iterating through the grid I want to find all instances where the entry is "" and change it to read "N". If the entry !+ "" then I want the entry to read "Y". Any ideas on how I can accomplish th...more >>

Container
Posted by Mike Chamberlain at 3/18/2005 4:56:16 PM
Can someone explain what the Container object is, and how it it related to data binding? I can't find any reference for it anywhere. Mike...more >>

Annoyingly simple problem
Posted by Mike Chamberlain at 3/18/2005 4:49:54 PM
Hi. Could someone help me with this simple problem? I'm trying to open a new window from a HyperLink column in my datagrid. The definition of the column is as follows: <asp:HyperLinkColumn Text="..." DataNavigateUrlField="master_id_account" DataNavigateUrlFormatString="javascript...more >>

Datagrid sorting does not work
Posted by Veeves at 3/18/2005 12:04:55 PM
I have added sorting to my datagrid. I added the event handler Private Sub dgrItems_SortCommand(ByVal source As Object, _ ByVal e As System.Web.UI.WebControls.DataGridSortCommandEventArgs) Handles dgrItems.SortCommand processSortIt(e.SortExpression) End Sub I...more >>

Group Headers in Datagrid
Posted by David at 3/17/2005 5:59:59 PM
Does the datagrid control provide a way to display records under group headers? In Microsoft Access, it's easy to create reports with detail records displayed under group headers, which is makes finding info easy for users, especially in somewhat long reports. I'd really love to be able to m...more >>

_EditCommand not firing...
Posted by jef at 3/17/2005 4:34:04 PM
I realize this should be simple... but I'm at my wits end. I'm new to ASP.NET (.NET in general) but have many years experience with VB6. I have a very simple Datagrid with 2 columns bound to a datasource. I have a ButtonColumn in the grid (my grid is called grdShow). My code behind has a grd...more >>

Using an IF statment within an ItemTemplate
Posted by David Lozzi at 3/16/2005 2:42:29 PM
Hello, I have a datagrid listing bill to addresses. One column specifies whether or not the bill to is the primary for the customer. Here's my dilemma: I would like to add the option to set another bill to to primary within the data grid. So something like this <% if container.dataitem("...more >>

Datagrid window.open
Posted by jack-b NO[at]SPAM humlog.com at 3/16/2005 2:39:12 PM
Hi, I am having trouble opening a new browser window without toolbars etc from a bound link in a datagrid. Basically my query string is an ID from the database which is connected to the URL. So far I have something like this: <a runat="server" onClick="window.open('<%# "../main/index.aspx...more >>

Datagrid postback problem?!?
Posted by Bryan Fickle at 3/16/2005 11:34:55 AM
I have a datagrid that works perfectly well. I have default paging = turned on and this is where I have a small problem. My datagrid is created via the On_Click even of my search button. When a = user selects page 2 of the grid, for example, the grid disappears. If = you press the search butto...more >>

DataGrid ItemDataBound
Posted by Ahmed H. Alawady via DotNetMonster.com at 3/16/2005 7:42:16 AM
Dear all, I Use DataGrid in my Project, I want to make every row in DataGrid selectable as make every row as hyperlink we do it on ItemDataBound event. Can any body please help me to know this code in ItemDataBound Thanks -- Message posted via http://www.dotnetmonster.com...more >>

customising PagerStyle
Posted by Joe Abou Jaoude at 3/15/2005 10:56:57 PM
hi, In a datagrid that allows paging i m using PagerStyle-Mode=NextPrev. i want to customize the pager style in order to display two images (or imageButtons)instead of the text "<" and ">" that correspond to the previous and next page. Can this be done ? thx *** Sent via Developer...more >>

dynamically create datagrid and set its datasource in VB.NET
Posted by Donna at 3/15/2005 6:59:54 PM
I try to dynamically add datagrid to my web form in VB.NET. But when I try to setup the datasource, the DATASOURCE is not the property of datagrid. Anybody know the reason? Here is my code: Public Sub CreateGrid() 'declare a new datagrid and set properties Dim DataGrid1 As New DataG...more >>


DevelopmentNow Blog