all groups > asp.net datagrid control > december 2004
Filter by week: 1 2 3 4 5
Datagrid columns
Posted by Rock at 12/30/2004 1:51:37 PM
Isn't there a way to refer to a column in a datagrid by the name of the
column, rather than the index? This is a dynamically built datagrid, and
when I refer to dg.Column(0), it works fine, but if I refer to
dg.Column("ID"), I get an error saying the string format is incorrect. But
I don't alw... more >>
Redirect and passing url from within a datagrid
Posted by AKJTR at 12/30/2004 12:49:04 PM
I finnal got everyhting to work using
<asp:HyperLink Runat="server" Text =
'<%#DataBinder.Eval(Container.dataitem,"pdd_book") + " " +
DataBinder.Eval(Container.dataitem,"pdd_page")%>' Target = _blank NavigateUrl
= '<%#
"http://www.dnr.state.ak.us/recorders/cad_search.cfm?District=401&S... more >>
EditItemTemplate FindControls
Posted by JJ at 12/30/2004 8:13:01 AM
Hi,
What I am trying to do is save the values from the ItemTemplate textboxs,
which I already do and when I go into Edit mode insert values into textboxs
in EditItemTemplate. Inserting values into EditItemTemplate is where I get
the "obj ref not set error". It happens because the event I u... more >>
Setting Visible with Databinder.Eval
Posted by Björn Jansson at 12/29/2004 7:50:28 AM
Hi,
I hope this is the right forum for my question.
I have a Repeater control in which I have two panels. Only one panel should
be visible at a time. I want to set which one dynamically, so I tried the
following:
<asp:Panel id="pnlDeliveryInfo" runat="server" Visible='<%#
IsNotNull((obj... more >>
Submitting forms second time just resets page
Posted by Steven_Reid NO[at]SPAM iName.com at 12/28/2004 10:12:14 PM
Hi All,
I am trying to create a little form where I can enter a SQL query and
return the data in a datagrid. A lot of the times the first time I
open the page and enter a query the datagrid returns data and is fine.
But when I try to resubmit the query or enter another query, the form
just ... more >>
DataGrid not binding in correct order from DataTable
Posted by chotch NO[at]SPAM gmail.com at 12/28/2004 12:22:19 PM
Hello,
I am having a spot of trouble with binding a DataTable to a DataGrid.
My problem originates after I have created the DataTable and DataGrid.
I present the grid to the user with the options to move rows up or
down. When a user selects one of these, I get the DataTable from the
session, r... more >>
Add Hyperlink column at runtime
Posted by Scott Friedrich at 12/28/2004 10:19:01 AM
I found this link in a previous thread:
http://datawebcontrols.com/faqs/
Thanks Scott Mitchell!!
That code works fine if I add the ASP code to the HTML page. What I have is
the need to set a column as a hyperlink in code at run time. I have a page
where a user can create ad hoc querie... more >>
Datagrid, SQLReader and Paging? Shouldn't this work?
Posted by Roger at 12/28/2004 8:49:47 AM
I have some code that uses a SQL Stored procedure to return some rows. I
would then like to have these rows show up in a datagrid.
sqlCmd = New SqlClient.SqlCommand("R_GetSiphonDetail", sCon)
sqlCmd.CommandType = CommandType.StoredProcedure
rdr = sqlCmd.ExecuteReader(CommandBehavior.Default)
... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
assign value to a new column
Posted by cnSoftware at 12/27/2004 9:10:31 PM
Hi,
In a datagrid,If I type "2" in "quantity" Column and then "20" in "price"
Column,I hope I can get 40 in "Total" Column,how can I deal with this
problem?
Thank u.
... more >>
table relationships
Posted by et at 12/27/2004 7:50:51 PM
How do I programmtically get the relationships of a table??
I can get the list of columns:
dtFields = conn.GetOleDbSchemaTable(OleDbSchemaGuid., New Object() {Nothing,
Nothing, strTableName, Nothing"})
, but when I change it to Foreign_Keys, no data is returned.
dtFields = conn.GetOleDbS... more >>
Selecting colors in dynamic datagrid
Posted by et at 12/27/2004 6:40:00 PM
Dim dg as datagrid
dg.BackColor = "#346655" does not work, how else can I set the color to the
html code #?
... more >>
Get the datafield of a column in datagrid
Posted by et at 12/27/2004 5:19:20 PM
How can I programmatically retrieve the name of the datafield of a datagrid
column, while in the Datagrid1_UpdateCommand event.
... more >>
How can i have multiple header
Posted by Vishnu via DotNetMonster.com at 12/27/2004 8:26:46 AM
Hi all,
I need a datagrid with fixed number of header columns, say 4. Based on the results returned, i need to append the values in the next row. Something like this:
=========================================
Col 1 | Col 2 | Col 3 | Col 4 | - The datagrid header.
---... more >>
NEW User: How do I display table on DataGrid without clicking on '+'.
Posted by Junaid Hussain at 12/24/2004 6:35:14 PM
Hi,
I have been trying display data from an Access database in my C# form. I
have got to the point where I have stored data from the database into a
dataset and then added this dataset to the datagrid control, however when i
run my program, I have to click on the '+' button before I can displ... more >>
Popup menu in datagrid
Posted by Grey at 12/23/2004 10:40:02 PM
is it possible to have popup menu designed within datagrid??
... more >>
ItemCommand event not firing on ButtonColumn
Posted by Simon Rigby via .NET 247 at 12/22/2004 4:06:27 PM
Hi,
I have a page with a user control on it to allow users to search=
a database=2E When they click the search button, another user=
control appears containing the search results=2E This control=
contains a datagrid with the results in (amongst other things)=2E=
I have added a buttoncolum... more >>
Problem with DataGrid
Posted by Pham Duc Toan via .NET 247 at 12/22/2004 4:04:50 PM
(Type your message here)
I 've got a datagrid, set alternating item style and not set boder style. When I bound data into this, with some cell contain value = " " , its boder become lost and that view is bad. I want all cells have its boder with any conditions od value data.
I 've tried to set... more >>
Retreive values from invisible cell
Posted by Patrice COTE via .NET 247 at 12/22/2004 3:53:03 PM
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 12/22/2004 3:51:46 PM
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 >>
Updating database records in a datagrid
Posted by EmJayEm at 12/22/2004 10:14:26 AM
In a datagrid, I read that you cannot add validation controls to the
textboxes, you want to update, because they are using BoundColumns. I want
to add validation controls to the text boxes. What is the way around this?
Thanks,
EmJ.
... more >>
runtime formating change
Posted by Tina at 12/21/2004 3:44:01 PM
I have a datagrid where I specified {0:###,###,###} at design time. However
sometimes I am putting percentages in the grid instead of money and I want
to change the formating to {##%}. I've looked over the docs on such things
as the dataformatstring porperty of the boundColumn but still can'... more >>
ItemCommand not working for Link Button on dynamically built grid
Posted by RCorona at 12/21/2004 10:27:05 AM
I have a page that has one to many dynamically built datagrids on it. Each
row in each grid has a link button. When you click the button the post back
occurs but not the event handler for the button.
As I build the grid I add the event handler like so:
DataGrid dg = new DataGrid()
dg.Item... more >>
Assign CSS to DataGrid header
Posted by Maziar Aflatoun at 12/20/2004 12:38:03 PM
Hi everyone,
I have a DataGrid with sort functionality enabled so that users can sort
each column by clicking on the column name. Can someone please tell me how
I can add CSS to my headers? no matter what I do I can't get class='' to
appear in my <a ...class=""></a>
Example
I want to... more >>
Batch update
Posted by JP at 12/20/2004 12:37:07 PM
Hi;
What I am trying to do is, display data in 5 columns in a datagrid. Out
of the 5 columns 2 columns are textboxes so that, a user can change values in
multiple rows and then click an "Update" button which will update all the
rows that has been changed.
I am able to display the data ... more >>
Load a multidimensional array into DataGrid?
Posted by David Lozzi at 12/20/2004 12:21:56 PM
Is it possible? The reason I need to this is because I am writing an =
online order form that a user can enter an infinite amount of parts to =
order. The users type in the part number and/or description, qty, etc. =
of the parts they need and I would like it to load all of this into a =
datagri... more >>
Entry using Datagrid
Posted by Melson at 12/17/2004 1:11:39 PM
hi
May I know is it possible to use datagrid to add, edit, and delete a recod
easily just like MS Excel. I try not to use add, edit or delete button. Is
there other alternatives like using repeater or vbscript. Pls help.
regards
Steve
... more >>
Container.DataItem("field") is null?
Posted by David Lozzi at 12/17/2004 12:50:58 PM
I need to check for null values in a datagrid, unless of course there is =
a better way to do it. I got a field called phone, that I breakdown into =
a pretty phone number, see below. However, if this field is Null, it =
throws an error. How do I check for a null? Should I do it in the =
<ItemTe... more >>
Datatable Relations and Datagrid
Posted by ree32 NO[at]SPAM hotmail.com at 12/16/2004 6:46:18 PM
I know you can create two datatables in a dataset and then link them
up using a data relation. But to make use of this I would like to know
do you display the datatables in a datagrid.
I.e. get the related values from both tables to show.... more >>
Datagrid DataKeyField and Webservice Proxy Objects
Posted by Stephen Woolhead at 12/16/2004 6:31:36 PM
Hi all, I have a web service that returns me an array of objects.
When I try to set this array as the datasource for a Datagrid and call
DataBind I get the following error message
DataBinder.Eval: 'MyWebService.SalesQuote' does not contain a property with
the name OurRef.
The code that ... more >>
Selecting related data in multiple DataGrids when clicking a row
Posted by prichards14 at 12/16/2004 5:11:12 PM
I have spent many hours trying to solve what I thought was a trivial
problem concerning selecting data in DataGrid controls. I need to
select or somehow highlight data in several DataGrid controls when a
row is selected in one DataGrid. Here is a brief description of the
problem:
A portion ... more >>
how to get to the underlying data in a datagrid control?
Posted by djc at 12/16/2004 1:54:59 PM
How do I get to the underlying data in a databound datagrid control? I have
tried several different things all with no luck. I know you should be able
to get to the data.... how exactly? The following is the last thing I tried
and I get this error: "Name 'Container' is not declared". Another thin... more >>
Strange prob
Posted by Vishal at 12/16/2004 7:57:18 AM
Hello,
I have a datagrid which I has the ability to update
the records. Above the dg I have a textbox 2 validators
and a submit button. Now the problem is that when I want
to edit a row then the validator comes up with the message
that the field is required... Now I have insterted the... more >>
Multiple Round Trips
Posted by JJ at 12/16/2004 7:45:02 AM
Hi,
In my datagrid I have template columns. In the template Columns I have
dropdown list controls that get populated when I clik on my Edit button. they
work fine its just that I have noticed that it posts back multiple times in
order to get the data. The reason I believe is because I ha... more >>
client side
Posted by pavan reddy via DotNetMonster.com at 12/16/2004 7:14:29 AM
how can i achieve client side sorting of datagrid data
How Can I re-arrage or re-order the columns of grid with Disturb the alignment and clarity
--
Message posted via http://www.dotnetmonster.com... more >>
Total result from datagrid data
Posted by Vishal at 12/15/2004 8:03:04 PM
Hello,
is it somehow possible to calculate the data from the
datagrid and display the result somewhere in the footer?
Thanks... more >>
Getting HTML output generated by Datagrid in ASP.NET
Posted by Ajay Kumar at 12/15/2004 7:14:35 PM
Hi everybody out there
i am developing a control in ASP.NET and would like to know that how to trap
the HTML content spitted by DataGrid Control.
I know that RenderControl traps the html output and browser renders it on
browser....
but i would like to trap that html code at server side in a s... more >>
ItemDataBound Event - How to access the previous record when this event is raised in DataGrid?
Posted by NH at 12/14/2004 3:51:44 PM
ItemDataBound Event - How to access the previous record when this event is
raised in DataGrid?
During "ItemDataBound Event", I would like change the background color of a
column in previous row depending on some condition in the column in current
row.
Thanks in Advance,
NH
... more >>
OnDataItemBound event question
Posted by djc at 12/14/2004 3:06:26 PM
one of the columns in my datagrid shows a date. I want to display dates <
the current date in red text. I believe I should be using the
OnDataItemBound event for this. Here is the problem I am having. When using
e.Item.Cells(4).Text I am getting the actual text displayed in the cell and
not the ... more >>
Hidnig column in grid populated at runtime using DataSet
Posted by Sheikh Nabeel Moeen at 12/14/2004 12:32:45 PM
Hello,
I cant seem to find a property or method to hide the ID colum in a
datagrid column which is populated using a DataSet at runtime (no columns
defined at design time).
Any help/suggestions in this regard will be highly appreciated.
Regards,
Nabeel... more >>
Drop down column in datagrid
Posted by news.microsoft.com at 12/14/2004 10:02:46 AM
How can i add a drop down column in datagrid ? is standard datagrid has this
capability ?
thx,
henyung
... more >>
Viewing A DataSet Created On The Fly!
Posted by Arpan at 12/14/2004 4:23:31 AM
This is a multi-part message in MIME format.
------=_NextPart_000_0014_01C4E194.AB32F770
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
The following code snippet creates a DataSet on the fly which is then =
passed to a DataView so that the Data... more >>
Two column header rows possible?
Posted by Bill Musgrave at 12/13/2004 4:22:06 PM
We are currently creating output displaying 'Total' and 'Avg' information.
Is it possible to add a row above, spanning multiple columns similar to
this?:
| Widgets |
+----------------+
| Total | Avg |
Thanks
Bill
... more >>
Export Datagrid to PDF
Posted by Dave at 12/13/2004 12:11:33 PM
Okay, I have code here to export a datagrid to Excel. Can I modify it to
export it to a PDF? Thanks,
Function ExcelExport(ByVal DatagridID, ByVal ExportFilename)
Response.AddHeader("content-disposition", "attachment; filename=" &
ExportFilename & ".xls")
Response.ContentType =... more >>
How can i trap the SelectedIndexChanged event on a dropdown within a Datagrids EditItemTemplate column
Posted by Dave M at 12/13/2004 11:49:54 AM
I have a datagrid with two edititemtemplate columns that contain
dropdownlists, these are 1)lists manufacturers of cars, 2)lists car
models for a manufacturer.
i need to rebind the second dropdown with only the models for the new
manufacturer that has been selected from the first dropdown, thi... more >>
conditionally display icon in template column?
Posted by djc at 12/13/2004 7:10:20 AM
I'm finishing up my first attempt at an asp.net app. I know this question is
likely documented all over the place but I have a handful of things to
figure out in order to finish this up and now I'm under a time constraint...
so... I'm digging into a couple of things myself and posting a couple of... more >>
Best datagrid
Posted by Patrick imbault at 12/10/2004 9:42:30 AM
Please I'm looking for the best Datagrid for an ASP.NET application in terms
of functionnalities and speed.
Thanks
Patrick Imbault
... more >>
Multiple DataBinds fail to reflect change in DataView Sort
Posted by RRB at 12/9/2004 2:12:24 PM
Hello all,
I have constructed a datatable that is a subset of my dataset. I use a
cached dataview as the datasource for my datagrid.
For performance reasons, I have disabled viewstate on my datagrid and
thus I must perform a databind on postback prior to additional
processing.
Where I've... more >>
Page no in datagrid
Posted by yugant NO[at]SPAM gmail.com at 12/9/2004 1:56:48 AM
hello
I have a datagrid with one coloumns as Hyperlink....
<asp:datagrid Width="100%" id="dgResults" runat="server"
cellpadding="5" onItemCommand="detailsClicked"
OnItemDataBound="checkRated" AutoGenerateColumns="False"
AllowPaging="True" PageSize="25" OnPageIndexChanged="dgResults_Paged">
... more >>
GridView control -- SQL advanced options disabled
Posted by Bruce Chao at 12/8/2004 3:05:34 PM
This is a multi-part message in MIME format.
--------------000609020904090708000408
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
I was working on a GridView Control that uses a data source from a SQL
2000 server. For some reason, in the data sou... more >>
ASPX page closing slowly with large datagrid
Posted by csgraham74 NO[at]SPAM hotmail.com at 12/8/2004 8:10:46 AM
I have an issue with aspx page that displays a large datagrid. When i
click a button and display the grid everyting works fine. when i click
a button on the page which is a response.redirect to another page there
is a very long delay before the button event is fired and the page
redirects.
ca... more >>
|