all groups > asp.net datagrid control > july 2004
Filter by week: 1 2 3 4 5
This should be an easy one for someone ...
Posted by Stefan at 7/31/2004 6:37:09 PM
Hi,
Can someone please tell me what is wrong with the following Kode... I have
tried everything ...
upKey is a variable with a value of 1 (int)... Why in the world does it keep
telling me invalid column...
KODE:
------------
SqlCommand command = new SqlCommand("UPDATE Table SET Co... more >>
Re: Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index
Posted by Stefan at 7/31/2004 1:43:28 AM
Hey folks,
Wow... After only 4 hours... I figured out the Index out of range error
and now have run into the error below ... Any help would be greatly
appreciated ...
Exception Details: System.NullReferenceException: Object reference not set
to an instance of an object.
Line 256: ... more >>
Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index
Posted by Stefan at 7/30/2004 8:58:54 PM
Hey Folks,(New to .NET)
This is driving me NUTZ... If anyone out there can resolve this from me
I would greatly appreciate it...
Line 238:
Line 239: // Gets the value of the key field of the row being updated
Line 240: string key = DataGrid1.DataKeys[e.Item.ItemIndex].ToString();
Li... more >>
Help with Dynamic Columns in Datagrid and Postback
Posted by ck-noreply NO[at]SPAM luenga.com at 7/30/2004 6:19:50 PM
Hi,
I'm having problems retaining my dynamic columns during postbacks.
I've read that if you create dynamic columns at runtime, you have to
add them during the page_init event. I've done that, but I'm not sure
what else I'm supposed to do to make this work properly. Basically,
I've created... more >>
Tough Dynamic DataGrid Problem
Posted by gowens NO[at]SPAM nixonpeabody.com at 7/30/2004 1:55:54 PM
OK, I'm stumped.
I've created a "simple" test web page (w/ code-behind) which does the
following:
Accepts a date criteria from the User (me) and has a asp:Button
"Submit"
On Submit the page creates, and adds, a dynamic DataGrid to the
control collection. The DataGrid has a "click-anywher... more >>
Guru's Challenge: How to place multiple instances of a control in a single page in an abnormal situation
Posted by .Net Newbie at 7/29/2004 11:38:12 AM
I am relatively new to .Net and have been coding an intranet site for my
employer for a couple of months. I am currently stuck coding in a
text-editor called EditPlus without access to the VS.Net IDE, and coding
pages with the script directly in each page (not using the codebehind
method) as mo... more >>
DataGrid HyperLink Column - How can I put multiple fields in the URL field
Posted by Alberto Teixeira at 7/29/2004 10:33:52 AM
Hi everyone,
How can I put multiple fields in the Datagrid Hyperlink Colume - URL FIELD ?
I need to buidl an URL like:
page.aspx?product_id={0}&seeler_id={1}
thanks,
Alberto
... more >>
Binding to bound columns
Posted by Russ at 7/28/2004 1:42:37 PM
I've been trying to figure out how to use the design time column
creation of columns. I turn off AutoGenerateColumns and create the
bound columns in the designer. But how the heck do I get the data
into the grid? All the examples I have seen use a DataTable and add
the columns and rows to it.... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
Presentation of Data in the DataGrid
Posted by meaneyedcat NO[at]SPAM hotmail.com at 7/28/2004 9:58:50 AM
I have what I believe is a basic question about presentation of data
in a DataGrid.
My DataGrid is backed by a DataTable that has a number of key values,
for example, the number 1 in the country column might represent
Australia. However, I want to go against a "look up" table to actually
pres... more >>
DataGrig / DataGrid web
Posted by Yuri Grig at 7/28/2004 3:05:52 AM
Hi....
I have a big problem with my DataGrid .
I have Microsoft Visual Studio .NET but i do not have datagrid and i
need him so if someone has it please send to my mail
grigori@zahav.net.il thanks for all.
waiting.....
*** Sent via Developersdex http://www.developersdex.c... more >>
Databind an embedded control in an embedded datagrid
Posted by Thomas Dodds at 7/26/2004 4:20:58 PM
All,
I have something like the following:
Datagrid1
Col1 - bound column
Col2 - template column
Datagrid1_OnItemDataBound
datagrid2 - create new datagrid
col1 - template column
create new label
.text - need to bind data
.tooltip - need t... more >>
Dynamic Rows and Colors
Posted by Randy Rubin at 7/26/2004 2:41:36 PM
What I am trying to do is Change the color of a row from a value that is in
a Database using the ItemStyle-BackColor Property. The value in the DB is
the color name. I keep getting a number of errors:
BC30676: 'DataBinding' is not an event of
'System.Web.UI.WebControls.BoundColumn'
Or
Li... more >>
How to embed image control in a repeater?
Posted by google NO[at]SPAM matthewlaw.plus.com at 7/23/2004 4:16:35 AM
Hi,
I have a repeater in my vb.net page which needs to render an image
control (it's a mappoint linedrive map image). The repeater itself is
bound to an array of object 'Directions' which contains mostly
strings, but one of the Properties of the Direction Class is an image
of type System.We... more >>
Validation in DataGrids
Posted by Edward Bills at 7/22/2004 8:30:03 AM
Hello,
I have a datagrid with an edit column that performs updates and another
command column that performs deletes. I then added controls to the footer
template and use them to add a new record. The problem I am having is that
when I try to use a validator for the add textbox in the footer ... more >>
Databind, display page 2
Posted by Chip at 7/21/2004 5:14:18 PM
I'd like to control which page of a multi-page datagrid displays when I call
the Databind method.
Something like Grid.DataBind(3).
Can it be done?
Chip
... more >>
First record of datagrid not showing
Posted by Edward Harford at 7/20/2004 6:28:28 PM
First record in grid is not showing having been called from stored proc.
Grid shows rest of records with no problem. (Using DataReader)
Any thoughts? Many thanks
EdwardH
... more >>
Printing a dataGrid
Posted by Louis-Vincent Guay at 7/20/2004 1:42:23 PM
Hi,
I'd like to print a DataGrid, but the problem is that I want the header
to be repeated on each page.
Is it possible to make sure that the header of a datagrid is on every page
of the DataGrid?
How could it be done ?
Thank you
... more >>
Edit Access Database Online
Posted by Miguel Dias Moura at 7/20/2004 7:12:41 AM
Hello,
I have a completely dynamic web site all based in one 10 tables included
in one Access Database.
The web site is all done in ASP.Net / VB.
I am looking for an easy way to create an online page which shows all
records of a certain table and makes it possible to add a new record or
... more >>
Swedish characters not displayed in datagrid
Posted by Wes-Securitas at 7/19/2004 1:58:03 PM
I'm retrieving data from a Sybase database and loading it into a dataset and displaying it in a datagrid. The problem that I'm having is the swedish characters are not displaying properly. I have the requestEncoding and responseEncoding in the webconfig file set to iso-8859-1 which is Western Euro... more >>
ASP.NET Datagrid filling textboxes
Posted by Aaron at 7/19/2004 1:20:41 PM
I am currently filling textboxes with the data from a datagrid with the
following code:
Sub Fillnextrecord(ByVal e As DataGridCommandEventArgs)
Dim Cell1 As String = e.Item.Cells(1).Text.ToString
Dim Cell2 As String = e.Item.Cells(2).Text.ToString
Dim Cell3 As Str... more >>
Datagrid newbie question
Posted by Neo at 7/17/2004 7:35:59 PM
Hey all,
I'm dynamically creating X number of datagrids based on entries in a
database (1 per client type thing... data is from different databases).
The question is...
I've created 6 boundcolumns (dynamically) to hold the data in each datagrid.
Is there a way to set the width (individual... more >>
Dropdown in footer template of datagrid
Posted by Edward Bills at 7/16/2004 2:42:42 PM
I have been able to create and populate dropdowns in both the item template
tag and the edit template tag. When I try to add one to the footer the
function I have inserted into the datasource tag never gets called. What is
the proper way to populate a dropdown in the Footer Template of a DataGr... more >>
Formatting a datagrid in a web form
Posted by Coleen at 7/16/2004 10:34:27 AM
Hi All :-)
I'm trying to format a VB.Net datagrid for a Web form in the code behind.
Do I have to create a custom style like you do for the Windows form? Is
there a link or tutorial that will help me with this?
TIA
Coleen
... more >>
Populating DataSet from two DataTables
Posted by Ron at 7/15/2004 11:18:53 AM
I'm trying to build a heirarchial DataGrid. I've created
the two tables I need through some fun in a code behind
that runs through an Active Directory. I need to get these
two tables into a DataSet. Once they're in the DataSet I
can define the relationships, etc. Is this possible to
fill a... more >>
Multiple search criteria datagrid
Posted by Bigfoot at 7/15/2004 10:34:20 AM
Hi,
I have a webform with a datagrid, 2 textboxes and a button. The datagrid is
filled by a sql database.
What I want is: to search the database based on the values of the 2
textboxes. I think I have to combine the values somehow into 1 sql query,
but I don't know how. The results wil be di... more >>
Dynamically adding checkboxes to a dynamic datagrid
Posted by kw at 7/15/2004 9:44:10 AM
I am stumped. How do you add a checkbox dynamically to a datagrid that is
built dynamically and then added to a panel control? Thanks in advance.
... more >>
popups and accessing grid items (C# Only)
Posted by SBC-San Francisco at 7/14/2004 9:55:13 PM
I have a page that looks like:
-----------------------------------------------------
Check Out Column1 Column2 Column3
[]
-----------------------------------------------------
| SUBMIT |
------------
the 4 columns are in a data grid and the submit button is not. When ... more >>
Multiple Header rows in datagrid
Posted by Alfred Salton at 7/14/2004 9:43:20 PM
I have a need for multiple header rows in a datagrid. One header row
contains the column headings, the next header row contains html input
fields, buttons and other controls and serves as a template for
javascript functions to add and delete rows from the table without a
round trip to the s... more >>
datagrid format question
Posted by ibeetb at 7/14/2004 4:27:55 PM
I have two fields, both are date and time fields that populate two of the
columns in my datagrid. The format from the database is: 7/14/2004 09:14:00
AM for both (the times would be different - one is start time one is stop
time)
I need this to be formatted in a way that I can subtract the tw... more >>
CType(e.Item.Cells(3).Controls(1), textbox) fails when key is set to READONLY
Posted by Keith-Earl at 7/14/2004 9:22:43 AM
The code could not be simpler:
Dim txtProjectID As TextBox = CType(e.Item.Cells(1).Controls(0), TextBox)
Dim dblProjectID As Double = CDbl(txtProjectID.Text)
Run-time exception thrown : System.ArgumentOutOfRangeException - Specified
argument was out of the range of valid values.
Parameter... more >>
adding HTML formatting to a datagrid
Posted by google.50.ben409 NO[at]SPAM spamgourmet.com at 7/14/2004 8:43:55 AM
Hello,
I have a datagrid in an .aspx page that I'd like to add some HTML
formatting to:
<asp:BoundColumn DataField="Pict1" HeaderText="Picture" />
<asp:BoundColumn DataField="PropertySite" HeaderText="Official
Site" />
The value returned from the datafield Pict1 is simply
"/imag... more >>
Clicks and double-clicks
Posted by PontiMax at 7/14/2004 1:25:01 AM
Hi,
is it possible to distinguish between clicks and double-clicks occuring on datagrid rows?
If a single row is clicked it should be selected in order to allow various operations like deleting the row, duplicating it, etc.
If a row is double-clicked another event handler should be called t... more >>
Not show last row in datagrid.
Posted by jtfaulk NO[at]SPAM eudoramail.com at 7/13/2004 2:38:41 PM
How do I not show the last row in a DataGrid (for C#). The last row
which is empty, but allows for the user to enter info, which will then
add a new row. I would like to prevent this... by showing only the
rows which exist.... more >>
Databinding to a collection with a enumeration property
Posted by woo1000 NO[at]SPAM hotmail.com at 7/13/2004 12:27:38 PM
I have a class that has properties; "value","description" and "type".
The first two are string properties, but "type" is a enum type. I
create the instances of my class and put them in an Arraylist, then
bind that to a datagrid. The datagrid displays "value" and
"description", but not "type". I ... more >>
Added TemplateColumn is not showing in DataGrid after PostBack
Posted by missjadeseguin NO[at]SPAM hotmail.com at 7/13/2004 9:20:55 AM
Hello,
Hope somebody can help me with this cause I'm a ASP.NET beginner. I've
created A DataGrid, and I added few BoundedColumns, and in my
Page_Load section I added few TemplateColumns through the
myGrid.Columns.Add(myTemplateColumn). After that I bind the datasource
to the datagrid in the P... more >>
Datagrid in ViewState
Posted by i_g_i_t_u_r NO[at]SPAM email.com at 7/13/2004 1:34:18 AM
Here's a quote out of
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnaspnet/html/asp11222001.asp
"The DataGrid control is a particularly heavy user of ViewState. By
default, all of the data displayed in the grid is also stored in
ViewState, and that's a wonderful thing when... more >>
How to add or modify template columns via-code
Posted by ronniek NO[at]SPAM netvision.net.il at 7/11/2004 4:59:41 AM
Hi,
I know how to add template columns via the designer or the HTML source
Now, I want to add a template column (<ItemTemplate> and
<EditItemTamplate>) via code
Some one can help me with some code sample
Thanks,
Ronnie... more >>
Custom Paging Numbers wrong
Posted by Andrew at 7/9/2004 5:52:51 PM
I'm attempting to use Custom Paging with my Datagrid and I'm running into a problem with the numeric page indicator.
When I load my page I set the VirtualItemCount value to the total number of records e.g. 50 and then go and get 5 records which is my page size.
The problem I'm finding is that ... more >>
Datagrid, SQL Adapter question
Posted by Goober at christianDOTnet at 7/9/2004 3:34:22 PM
A friend of mine is doing some datagrids on a web page, and was using the
SQL data adapter on the design view of the page.
He is sorting the datagrid on each of the columns as a user clicks on the
column header. He showed me how he was creating the page, and we had a
question about the wiza... more >>
Dynamic datagrid - command firing
Posted by Ken McAndrew at 7/9/2004 9:36:44 AM
I'm working off a fully-dynamic datagrid (customer request, hence not using
property builder). I've got the grid coming out fine, and I added a
ButtonColumn to do deletes, and an EditCommandColumn to do
edit/update/cancel requests. When I click Edit, it goes into edit mode fine,
and through debu... more >>
Problem handling DataGrid TemplateColumn Databinding Event
Posted by gowens NO[at]SPAM nixonpeabody.com at 7/9/2004 8:59:14 AM
I have spent several hours trying to research and/or fix the following
problem:
Environment:
VB.Net 2003
Scenario:
I have a dynamically generated DataGrid (all columns are
templatecolumns added at runtime). One of the columns contains a
custom control. In the InstantiateIn method of my
T... more >>
Updating an Access Yes/No field from a datagrid
Posted by Harry Devine at 7/8/2004 1:29:29 PM
I have a DataGrid that is configured to use the Edit/Update/Cancel concept
correctly. My grid shows values from 5 database fields. I only need to
update that last 4 fields. The last field is a Yes/No value in Access.
Using the OleDbCommand, if I do not consider the Yes/No field, the
ExecuteNo... more >>
sorting a datagrid
Posted by Robin at 7/7/2004 6:01:48 PM
In asp.net I have created a datagrid which it data source is determined at
runtime. How can add the auto sort functionality to this datagrid?
In the MSDN article
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbcon/html/vbtskaddingsortingtodatagridwebcontrol.asp
it has some cod... more >>
itemDataBound and Editing the text
Posted by dmalhotr2001 NO[at]SPAM yahoo.com at 7/7/2004 5:53:10 PM
Hi,
I have a question
I have a grid
it is spitting this out
description
-----------
test1
test2
test3
I want to change it so that on ItemDataBound each row/value of
description column runs through a string function I pass it.
How do I do that?
here is my code so far:
Pri... more >>
datagrid manipulation
Posted by dmalhotr2001 NO[at]SPAM yahoo.com at 7/7/2004 5:47:13 PM
Hi,
I have a question about custom datagrids or how i should show my
results
I have a sql statement that reads as follows:
SELECT News_Title, News_Description FROM SiteNews WHERE (News_ID =
& Me.News_State.news_id & ")"
the output I get is
column1 | column2
-----------------... more >>
Mutually Exclusive RadioButton in DataList
Posted by Parker at 7/6/2004 10:21:49 PM
I can add a RadioButton to a DataList and the button behaves in a =
mutually exclusive way, e.g. if row three is checked and then row five =
is checked, row three is then not checked. This works fine for an HTML =
RadioButton but...
When I add runat=3D"server" to the RadioButton control, the ... more >>
Transfer DataGrid across frames
Posted by dot net at 7/6/2004 5:26:32 PM
Hello everyone
Is there a way to click on a button on one frame and have it populate a
datagrid on another frame on the same page?
... more >>
Items.Count wrong on partial page
Posted by Paul at 7/4/2004 9:24:21 PM
Hi, here's an odd one that blows my mind. I have a DataGrid with paging
enabled. I have PageSize=10. I have 25 total items, so that gives me
two pages=10 and the last page=5. Fine. When I access this last page
of 5 items in _ItemCommand(), I need an Item.Count, and I get 5 items.
Very good,... more >>
datagrid control
Posted by z. f. at 7/4/2004 5:11:36 PM
Is the datagrid control sort and paging commands work only when both the
page and grid property EnableViuewState=True ?
when i tryed running the page when either one of them was set to false the
sorting or paging didn't work. i just got an black page and the commands
methods was not called.
... more >>
DataGrid HeaderTemplate Bug?
Posted by Roger Kjærnsrød at 7/4/2004 12:50:42 PM
I use theDataGrid control and specify a HeaderTemplate for the grid.
I the rendered HTML the header row is not rendered as <th> elements.
Is this a bug in the DataGrid control?
-Roger
... more >>
|