all groups > asp.net datagrid control > november 2003
Filter by week: 1 2 3 4 5
Datagrid with links
Posted by timmso at 11/30/2003 5:32:44 PM
Is it possible to create a datagrid with hyperlinked text instead of just
text? If so, how?
... more >>
nested datagrids
Posted by source at 11/29/2003 7:54:30 PM
I need to implement a grid within a grid. How can I do this.
The reason I need to do this is because I need to show related data within a
grid from two different tables.
source
... more >>
SmartNavigation Datagrid problem in Windows 2003 Server
Posted by Inigo Jimenez at 11/29/2003 12:46:08 AM
I have an ASP .net web application installed in a Windows 2003 server.
This web application has a webform that has a Datagrid.
This Datagrid is filled with the data of a SQL table.
I have a button that inserts a new row in the SQL table and then
refresh the datagrid.
In windows XP cli... more >>
Data grid question
Posted by simon at 11/28/2003 9:57:54 AM
I have for example SQL statement:
SELECT categoryID,categoryName FROM categories
I can get products like this:
Select productId,productName from products where categoryId=@catID
If I bind this to dataGrid I want to have beside the categoryName also links
to products in this category.
... more >>
Paging a datagrid
Posted by Fabiano at 11/27/2003 8:57:23 PM
Please,
i've created a datagrid that allow numbered paging.
But when i click over a page that must be called, i get this error:
System.Web.HttpException: Invalid CurrentPageIndex value. It must be >= 0
and < the PageCount
at my page, on Paging Event i'm using the commands bellow:
priva... more >>
User Server control nested in DataGrid
Posted by met NO[at]SPAM konstrukt.de at 11/27/2003 3:31:51 PM
Hi all,
I am trying to create a web page where im displaying some information
in a datagrid and use a nested custom control in EditItemTemplate. In
Normal Modus it shows my Data as Label. If i go to Edit Modus it shows
me the DropDownList. That works fine and I can see the List.
If I want ... more >>
DataGrid Sorting - bidirectional
Posted by Snig at 11/27/2003 12:05:55 PM
Hi,
I want to sort the DataGrid according to the number of clicks of mouse on
the column-header link.
e.g.
if user clicks on the header once - it will be sorted ASC
if the header is double-clicked - it will be sorted DESC
It is not exactly toggling the sorting-order. I have seen a lot of m... more >>
DropDownList in DataGrid EditItemTemplate Return Error
Posted by rsw8n NO[at]SPAM bellsouth.net at 11/26/2003 11:18:44 AM
I have a dropdown list in the edititem template of a data grid. I
have no problems populating the dropdown box when I click edit.
However, if I edit and select a different item in the dropdown list I
always get the top value in the list returned in my UpdateCommand
event. Below is my code:
... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
Inverting DataGrid columns and rows in excel
Posted by Jack Mullins at 11/26/2003 7:31:15 AM
I am populating a datagrid and allowing it to be exported as an excel spreadsheet but my internal customer needs the columns and rows inverted. Any help will be appreciated. Asp.Net, Office XP, Visual Studio.Net 200
Jac
... more >>
Testing existance of a datagrid control on a webform
Posted by Iain Porter at 11/25/2003 3:43:36 PM
Hi all,
I have a usercontrol (a textbox with dropdown calendar that fills the
textbox with the selected date) that I implement in a datagrid in a webform.
On first loading the page, the datagrid's visibility is set to 'false', and
so the UC depCal is not rendered on the page. Hence the followin... more >>
Find what checkbox is checked in javascript
Posted by dave at 11/24/2003 7:45:46 PM
I have to sets of checkboxes. The second is to delete the row. So when I
click that checkbox I want to add it to an array. I also need to take it out
of that array when if click it again. I need to do this clientside
Dave
... more >>
Datagrid to Excel Question
Posted by Bart Lynn at 11/24/2003 6:37:11 PM
I have it working by the following code:
Response.Clear()
Response.Buffer = True
Response.ContentType = "application/vnd.ms-excel"
Response.Charset = ""
EnableViewState = False
Dim oStringWriter As System.IO.StringWriter
oStringWriter = New System.IO.StringWriter
Dim oHtmlTex... more >>
Passing Values from Header to footer of an DataList
Posted by snellog at 11/24/2003 3:56:16 PM
Hi
I have a TextBox and a Button in Header of a DataList and a Label in the Footer of a DataList. How to pass the value in the TextBox to Lable on click of the Button in the Header.... more >>
Dynamically Adding Bound Columns Won't Sort
Posted by Mark at 11/24/2003 2:02:47 PM
All-
I'm basically creating a user control which contains a datagrid that will be
used throughout our application by all pages.
My user control contains a datagrid control and I expose methods to add a
bound column to the grid.
So when they call this function and pass in the field name and ti... more >>
Hyperlink
Posted by Karl-Heinz at 11/24/2003 10:04:37 AM
Hello,
I'm using a link in a datagrid by the operand
"DataNavigateUrlFormatString=". I assume that the link only can activate a
new aspx-page. But the code and the datagrid definitions exist already in
the calling (the 1st) page.
My second datagrid, which already exists, should be activated... more >>
ASP.NET DataGrid and Excel
Posted by Milan Todorovic at 11/24/2003 9:31:18 AM
I desperately need help.
I have an ASP.NET (in VB.NET) app that displays the data within the datagrid
object. I need to allow for exporting of that data to the Excel spreadsheet.
I have tried using Excel (referenced) object, but for some reason I can't
get it to work. I get all sorts of COM er... more >>
Formatting decimals with 2 digits - 3.70 vs 3.7000 ???
Posted by bacile99 NO[at]SPAM yahoo.com at 11/24/2003 6:04:23 AM
I am formatting decimals on several columns within my DataGrid. For
the most part it is working correctly. However, 2 of the columns will
not format correctly. For example: the two columns that aren't
formating correctly are displaying 4 decimal places to the right.
Instead of getting: 3.70 ... more >>
How to sort a String column as Numeric?
Posted by bacile99 NO[at]SPAM yahoo.com at 11/24/2003 5:50:35 AM
I have a datagrid (dgResults) that I am populating from a SQL stored
procedure. After I fill my dataset (ds), I cache the dataset this
way: Session("ds") = ds.Tables("Table1").Defaultview. After this I
set the Grid's datasource to the dataset and bind the Grid.
My sort is working fine for al... more >>
Helper function inside template column
Posted by Chris at 11/24/2003 2:32:06 AM
Hi,
I need help with some c# syntax. I'm trying to call a
helper function from within a datagrid template column.
In VB.NET i'd do:
<%# Helper(Container.DataItem("item")) %>
However in c# I'm getting a bunch of syntax errors. Can
someone point in the right direction please?
Chee... more >>
TemplateColumn
Posted by Thomas at 11/23/2003 12:32:47 PM
Using C# code I would like to find out the Controls a
user places in a TemplateColumn. Is there a way to loop
through all the items in a TemplateColumn? Thanks.... more >>
BC30451: Name 'BindDataGrid' is not declared.
Posted by TJS at 11/22/2003 1:26:04 PM
trying to allow sorting in a datagrid
I don't understand error message - can u help ???
sql:
=====
SelectCommand = "SELECT * FROM tblA WHERE id = '" & vid & "'
order by " & strSortField
grid control:
===============
<asp:datagrid id="Grid" style="Z-INDEX: 101" ru... more >>
Problem with datagrid in userControl
Posted by Flare at 11/21/2003 2:44:26 PM
Hi
I have a UserControl wich contains a datagrid .The Usercontrol is add
dynamicly to the page. My problem is that i have to click twice on the
[edit] / [update] buttons. This i quite annoying.
Anyone know why, ? and better yet, how to solve it?
Reagards
Anders
... more >>
Data grid columns still showing up
Posted by Angel Fernendez at 11/20/2003 9:04:10 PM
I am using a run-time connection to populate a datagrid and when I try to
hide my columns it does not work. If I set the column index higher I get an
error.
here is the code
cn.Open();
SqlCommand cmd = new SqlCommand(sSQL,cn);
DataTable dt = new DataTable();
SqlDataAdapter da = new ... more >>
Display simple list
Posted by timmso at 11/20/2003 8:36:30 PM
I am trying to build a simple asp.net project. How do I use a datagrid to
simply display a list of links in a table format? For example, let's say I
have a database table:
tblNames
ID Name
1 Blue
2 Grey
3 Green
And I want to display these in the format of th... more >>
Button in column header
Posted by Mark Schubert at 11/20/2003 3:15:24 PM
I want to put a button in a column header. How do I handle the event when
the button is clicked?
... more >>
How to display result from two different table
Posted by vasu at 11/20/2003 2:52:18 PM
Hi all
Iam in a problem. Anyone plz help me in retreving data into single
datagrid from two different queries.
Thanks in adavance
vasu
... more >>
Disable causesvalidation in DataGrid
Posted by hanoi_honai NO[at]SPAM yahoo.com at 11/20/2003 9:20:49 AM
Using VB.NET: I would like to disable causesvalidation (of a textbox
and a dbcombo) when the user clicks the update button in the grid
control of the editcommandcolumn. Please help.
Thanks in advance,
James P.... more >>
Execute Client Side Script from TextBox in Template column
Posted by David C. Churchill at 11/19/2003 6:03:40 PM
I have a datagrid with 3 template columns, each containing a textbox.
I want to handle one of the textbox's OnTextChanged Event and have some
client side JavaScript execute. The client side code will update one of the
textbox's values by subtracting the values in the other 2.
I'm able to add ... more >>
Problem with Update & Cancel buttons not showing up
Posted by nib at 11/19/2003 3:31:56 PM
I've got a data grid that has a column for the Edit/Update/Cancel
button. The grid loads and all the appropriate data loads as expected.
But, when I click in the edit button, the docs say that an Update and
Cancel button should appear, but they don't. Only the edit button is
there (and the e... more >>
display message box in ASP.NET when delete command is fired
Posted by Next at 11/19/2003 10:13:56 AM
I would like to display a message box that says;
"You are about to delete this record. Is this what you want to do?"
I want to do this when the delete command is fired.
How do I do this?
Any help is greatly appreciated!
Aaron
... more >>
DataGrid-DataView-XML-Sorting strings as numeric
Posted by Joe Rattz at 11/19/2003 7:09:07 AM
I am populating a DataGrid with xml. I need to be able to
sort some of the columns. However, the DataView.Sort is
treating my strings (which are numbers in string form) as
strings and not formatting them as numbers. So, I get:
1,11,2,22
instead of:
1,2,11,22
How do I get the Dat... more >>
Update Data in Joined Table Grid
Posted by Michael Murphy at 11/18/2003 5:30:49 PM
Hi,
I have a datagrid that shows data joined from multiple tabes and works just
fine. I load it with a SQLDataReader, and all was great.
Now I need to allow update of the data strickly in one of the joined tables.
Example:
Orders and Order Items are the Join. In the grid would be column heading... more >>
Edit Mode - How do I populate dropdown in edittemplate from dropdown in another column?
Posted by stephencmyers NO[at]SPAM hotmail.com at 11/18/2003 3:02:50 PM
I have a datagrid with 2 columns that I want to interact when I'm in
Edit Mode. I've reproduced just the columns I want to interact below.
I can get into Edit mode for the selected row just Fine. What I want
to do is to have the user select an entry in the editschSchedulePeriod
template (optio... more >>
Attributes.Add() for DataList
Posted by Steve Klett at 11/18/2003 8:13:25 AM
I know this is the DataGrid forum, but there is no DataList and this is the
closest thing. Hope that's cool.
Basically... it appears to be impossible to add additional attributes to a
DataList (IE: onMouseOver)
The DataListItem.Attributes.Add() method doesn't complain, it adds the
strings to... more >>
strange Invalid CurrentPageIndex value
Posted by Daniel Bauke at 11/17/2003 10:20:00 PM
i cannot find the rule why from time to time i'm receiving "Invalid
CurrentPageIndex value. It must be >= 0 and < the PageCount."
at the beginning it looked like it was something with weird browsers, but
looks like it's not a rule.
i suppose it started failing when i added:
protected void... more >>
Using class collections in the asp:grid control
Posted by Torp at 11/17/2003 2:24:09 PM
I believe I understand the concepts of OOP as far as how to set up the
classes and how they use inheritance and other related topics, but I have to
say I don't see how this works for us in our DB apps. All the examples I am
going through on asp.net and msdn.microsoft.com don't use collection
cl... more >>
<selectedItemTemplate>
Posted by Steve Klett at 11/17/2003 1:20:59 PM
I can't find how to implement a selectedItemTemplate using a datagrid.
I'm using Columns->asp:templateColumn->ItemTemplate
There is not SelectedItemTemplate. How do you format the data for the
selected row of a datagrid?
Thanks,
Steve
... more >>
Grid Disappears (WebForm)
Posted by Steve at 11/17/2003 8:36:49 AM
Hi
I have a db with 2 tables that I want to bind to a grid depending on a
selection in a Dropdownlist
Also I want to be able to select a row from the gris to fill some
textboxes.
The databases are static in that they will not be updated they are just
for viewing
I have everything working ... more >>
how to bind data to checkbox in datagrid
Posted by LiFo at 11/17/2003 2:28:59 AM
hi
i have a datagrid and one colume is a bool
if i use a normal asp:BoundColumn is shows as true or false
and i want it to show as a checkbox
but if i use a asp:TemplateColumn as this
<asp:TemplateColumn>
<HeaderTemplate>
<b>Aktiv</b>
</HeaderTemplate>
<ItemTemplat... more >>
Re: Column Width
Posted by Justin at 11/16/2003 6:30:03 PM
How to set the column width for Auto Generated Columns?
Thx
... more >>
Datagrid Update - Rows Lost
Posted by Demetri at 11/15/2003 3:56:05 PM
I have a datagrid on an aspx page with one column added via property builder - the edit/update/cancel. In addition there is a dropdownlist which has a list of table names.
Upon selecting one of the table names a post back is fired. During the post back the datagrid has columns added to it dynamica... more >>
Edit
Posted by Demetri at 11/14/2003 6:26:10 PM
I have a datagrid and is endowed with the edit/update/cancel buttons. I have a routine that handles the editcommand event for the datagrid, which sets the EditItemIndex to the e.Item.ItemIndex value - I then rebind the data.
The buttons change from edit to update and cancel but the cells remain t... more >>
Datagrid header size
Posted by Mark Lyday at 11/14/2003 3:38:58 PM
I have datagrids on two different pages. In the IDE they both look the same,
and as far as I can tell all the properties are set the same. When I run
them the one has a header that is about 1cm tall, and the other is about 1
inch tall. It appears the one is streching to fill the space it has,
... more >>
Paging in a dg - current row?
Posted by Marc Miller at 11/14/2003 3:26:10 PM
Hello,
I have a datagrid in which I change the color of the row, based on a value
in a particular column.
My problem is that I need to know the current row number in the data set
after I page from the
first page.
I see the error in my ways here, since I am constantly referring to rows 0
t... more >>
Imagebutton as commandbutton
Posted by RH at 11/14/2003 12:09:19 PM
Hi,
I want to use an imagebutton as commandbutton in a datagrid. When I
add a column, say "delete", convert it to a template column and
replace the linkbutton with an imagebutton, the button will not work.
What am I doing wrong?
TIA
Remco... more >>
Displaying XML data as is with tags on the datagrid
Posted by Nedu N at 11/14/2003 11:10:03 AM
Hi,
I want to display the XML tags (for the the XML tags is the data that is
stored in a table) on the datagrid using the datasets. But since the data
itself is the XML tag it doesn't appera on the datagrid since it tries to
parse the data before it displays.
Using Server.HtmlEncode, i was ... more >>
DatGrid TemplateColumn TextBox JavaScript ClientSide Validation?
Posted by arulrajalivi NO[at]SPAM hotmail.com at 11/14/2003 8:27:53 AM
Hi,
I am using 2 TemplateColumn TextBoxs in my Grid. On the Submit button
click event I want to do the validation on the client side. In the
Javascript I couldn't use the ID of the Textbox, because in the HTML
it has a different ID.
I am trying to avoid the round trip in this scenario. Whi... more >>
update sql unique key with dataadapter
Posted by lastman NO[at]SPAM freemail.it at 11/14/2003 6:15:54 AM
I got a typed dataset of data from a Sql server and i binded them on a
grid, then if the user edit the grid all changes will be sent back
throw dataadapter.update.
The problem is that there is a unique key with three records and if
the user edit manually it switching values in the following way ... more >>
DataGrid - DataBinder.Eval
Posted by ganesh_mahadevan NO[at]SPAM syntelinc.com at 11/12/2003 11:00:00 PM
I am using a Datagrid and am populating the column header
which is being picked up from a database.
My problem is that if the column name conatins a "."
within the name then it throws an error as follows
DataBinder.Eval: 'System.Data.DataRowView' does not
contain a property with the name T... more >>
Access the FooterTemplates TextBox control on the Button Click Event
Posted by arulrajalivi NO[at]SPAM hotmail.com at 11/12/2003 1:20:14 PM
Hello,
I have the following code in the .aspx file
<asp:TemplateColumn HeaderText=" FG Name">
<HeaderStyle ForeColor="White"></HeaderStyle>
<ItemStyle HorizontalAlign="Center" Width="200px"></ItemStyle>
<ItemTemplate>
<asp:TextBox id=txt_fg Width="200px" Runat="server" Text='<%#
Data... more >>
|