all groups > asp.net datagrid control > may 2006
Filter by week: 1 2 3 4 5
Rollover a button in a datagrid.
Posted by UJ at 5/31/2006 2:02:18 PM
I have a couple of buttons on my screen that when we roll over them, they
get a slightly different image. How do I do that when I have a button in a
datagrid?
TIA - Jeff.
... more >>
Enabling a control in the Footer Template with a checkbox click
Posted by satemasov NO[at]SPAM gmail.com at 5/31/2006 9:58:13 AM
Hi -
I have two controls in a column of my footer template - a checkbox and
a dropdownlist.
I'd like the dropdownlist to enable/disable depending on the checked
value of the checkbox.
To accomplish this, I've tried a number of options. None of these have
worked for various reasons. Cod... more >>
Update without using Edit and Update button
Posted by Henke at 5/30/2006 10:48:03 PM
I use a GridView on a page to display data that I'd like to update.
Is it possible to update the data in the db without using the Edit and
Update buttons.
I'd like to have one button on the page that I can press when all data is
updated. To be able to change the data in a cell I remove the Lab... more >>
Update Master GridView with updates in Details View
Posted by Jeronimo Bertran at 5/30/2006 11:23:01 AM
Hello,
I have create a master/detail using a GridView and a FormView. My
DataSource for the detailed FormView is linked to the GridView by the
details ObjectDataSource whiche looks like the following:
<asp:ObjectDataSource ID="ObjectDataSourceEventDetails"
runat="server" SelectMethod="S... more >>
Hierargrid child grid indentation
Posted by projectHelps NO[at]SPAM gmail.com at 5/27/2006 5:58:10 PM
I am using version 2.1 with 3 levels of grids. Everything seems to be
working just fine. I am wondering if there is a way to indent the
child grids from the parent grids so that it is easier for user to see
the master-detail relationship. Basically it is to put some space in
front of the chil... more >>
Access TextBox in EditItemTemplate
Posted by Marc Eggenberger at 5/24/2006 1:05:49 PM
Hi all.
I have a DetailView where I have one column as a template column. In the
EditItemTemplate I changed the textbox to a dropdownlist which is
databound. This works fine. I now added a unbound textbox in the
EditItemTemplate and in the ItemUpdating event of the DetailView I want to
access... more >>
Update DetailsView with one template column
Posted by Marc Eggenberger at 5/23/2006 4:52:06 PM
Hi there.
I try to do the following:
I have a SqlDataSource with a Select Command where I have a custom sql
query which selects me data from 4 tables (1 main, the other tree have
Names for IDs which are in the main table).
I display everything in a datagridview and have a Select column wh... more >>
Display Image from sql
Posted by Salam at 5/22/2006 10:55:57 PM
Hi,
I have a DG bound to a table, through a Dataset which has an image field.
JPEG images are stored in it. My question, how can I make the datagrid
dispaly the images in a cell. When binding the column, I get the literal
"Systen.byte" in the cell.
Thanks
... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
Order of events, databinding, and UserControls
Posted by Nathan Sokalski at 5/21/2006 3:34:44 PM
I have a very simple UserControl which contains an Image and a Label, which
I use to display an image with a caption. I am using this control inside a
DataList, setting the two Public variables using attributes in the *.aspx
page. Everything displays great for the initial load, but whenever I ... more >>
Multi row edit and column display with different controls..
Posted by nate amt at 5/21/2006 9:44:06 AM
Hi,
I have a task to display the records from the database table and update
all of them at the same time. I should display the first column in label
and the second column(this is tricky) values should display in textbox
or dropdown list depending on the datatype. For example if the data is a
... more >>
Determining whether the current item is the last one from inside ItemDataBound
Posted by Nathan Sokalski at 5/20/2006 10:17:35 PM
I have a control that I want displayed in all items except the last one. I
figured the best way to do this was to determine whether the current item
was the last from within the ItemDataBound event using code such as the
following:
If e.Item.ItemIndex=(numberofitems-1) Then mycontrol.Enab... more >>
DataList.DeleteCommand event is not getting fired
Posted by Nathan Sokalski at 5/20/2006 9:37:09 PM
I have a DataList that has an Button as one of the controls in it's
ItemTemplate. The Button has a CommandName="delete" attribute, but when I
click it the DeleteCommand event doesn't even get fired. I have checked
everything I could think of, but everything looks correct to me. Here is the
r... more >>
Problem understanding how to make a dynamic GridView execute Update on SqlDataSource
Posted by PeterKellner at 5/20/2006 7:20:58 AM
I've create a very simple example that runs against the northwind
database that does not update the underlying database as I would
expect. I'm thinking there must be something I have to execute in
order to have the sqldatasource's Update actually run. The Updating
event does get called in the ... more >>
Checkbox in the header Column
Posted by rajeshpa at 5/18/2006 11:29:23 PM
Hi,
I have a datagrid with say 10 columns and i need to have checkboxes
only in the header row...ie each column header must have a check box so
that i can select the required columns to be exported to an excel
file...is there a solution for this..?? if at all the checkboxes are
added to the h... more >>
Problem understanding how to create a dynamic GridView in C#
Posted by PeterKellner at 5/18/2006 5:27:20 PM
I'm trying to create a gridview dynamically (in code from an
ObjectDataSource). When I create it in the aspx page and dynamically
add the datasource it works correctly. When I create it 100% in code
(no asp:GridView), the headers is created, the number of rows shown is
correct, but all the row... more >>
text box in FooterTemplate
Posted by Salam at 5/18/2006 12:35:08 PM
Hi,
I have a DG not visible on a web page. Clicking a button will display the DG
which has a TemplateColumn in which there is a FooterTemplate which contains
text box in its footer as follows.
I am trying to set the value of the text box dynamically while the DG being
rendered withouit s... more >>
Short date format in template column?
Posted by clucherini NO[at]SPAM gmail.com at 5/18/2006 9:30:13 AM
I have a template column in an asp.net datagrid that shows dates. In
Access, it's formatted as a date/time column with a short date format.
When it displays in the datagrid, it always has that awful 12:00:00 AM
afterward. Is there any way to get around this and keep it as a
template column?
... more >>
Making Custom border in DataGrid
Posted by augustesen NO[at]SPAM gmail.com at 5/18/2006 12:05:59 AM
Hello
I am using making an ASP.NET website using C# in Visual Studio 2003.
On the website I display a DataGrid which contains
- five columns, one with and item name and four with different prices
for the various items.
- Columnheader with item name and four different buying options
- A n... more >>
FindControl in GridView
Posted by Bruno Alexandre at 5/17/2006 2:44:56 PM
Hi guys,
I have this code:
Dim gv As GridViewRow
Dim str As String = ""
Dim dd As DropDownList
For Each gv In gvItems.Rows
If gv.RowType = DataControlRowType.DataRow Then
str &= gv.RowType.ToString & "<br/>"
dd = CType(gvItems.FindControl("dd1"), DropDownList)
If... more >>
Hyperlink with Javascript
Posted by spp at 5/16/2006 5:21:02 AM
I have a datagrid with a hyperlink column.
The code is :
<asp:HyperLinkField DataNavigateUrlFields="ccod"
DataNavigateUrlFormatString=var
newwin=window.open('serii.aspx?cod={0}',null,'width=692,height=25');"
HeaderText="Serii" Text="Serii">
... more >>
GridView with multiple selects
Posted by Bruno Alexandre at 5/15/2006 3:20:24 PM
Hi guys,
I hope you can pointing me some tutorials or examples to:
in a Gid View I want to have:
first Row: [Serial Number]
next rows |---> 4 columns that I get from a select with the
serial number above
next row: [Serial Number]
next rows |--->... more >>
What is wrong with the data binding?
Posted by Ben L at 5/15/2006 10:51:02 AM
I'm just following along with the video tutorials on the asp.net website. I'm
data binding a to datagrid using the northwind.mdf file. I run a test query
in the query builder and everything is fine, I see the correct results.
Then I 'open in browser' to see the results, and the data grid never... more >>
How to call java script function on datagrid update command event
Posted by Santoshmshinde_it NO[at]SPAM yahoo.com at 5/13/2006 12:13:05 AM
please tell me what is the problem in this code if i am click OK or
Cancel same function get executed.
<script language="javascript">
function ConfirmAddRecords()
{
var agree;
window.confirm("Are U sure to save Records");
if (agree==true)
{
true ;
}
... more >>
how to pass a variable from test.aspx.vb to test.aspx
Posted by Chris at 5/11/2006 8:59:30 PM
Hi,
I use code-behind, but how can i pass a variable from test.aspx.vb to
test.aspx?
Test.aspx.vb contains this:
Partial Class test
Inherits System.Web.UI.Page
Protected Sub Page_Load(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Me.Load
dim lol as string
lol="C... more >>
Populate a drop down list with a blank entry
Posted by KatMagic at 5/11/2006 6:40:46 PM
How can I populate a drop down list with a blank entry so that it is the
first item in the list?
I tried:
ddl.Items.Add(New ListItem(" ", 0))
And then getting a dataset and binding it to the ddl, which of course loses
the blank item. If I run the above after binding the dataset, the blan... more >>
Display alternate text in datagrid
Posted by Jason . at 5/10/2006 7:18:35 PM
I have a datagrid that has a boundcolumn to my database:
<asp:BoundColumn DataField="IndustryPercentile" HeaderText="Industry"
DataFormatString="{0:###}%">
</asp:BoundColumn>
When a IndustryPercentile value is not available, the data returned is
-1. I would like to display "n/a" when the I... more >>
DataGridView Bug
Posted by homawong NO[at]SPAM gmail.com at 5/10/2006 1:28:45 PM
This bug is very obvious but as I search for it on Internet,
suprisingly I only found it is mentioned in one instance and without a
reply about the issue. That original post is more complicated and I'm
able to trim it down to its simplest form.
All you need is a DataSet, Form and DataGridView.... more >>
How to define the parameter in UPDATE statement in DataGrid
Posted by Luke Xu at 5/9/2006 11:54:52 AM
I start learning asp.net 2.0. When I try to use Edit function in DataGrid to
update database (DB2), how can I put parameter there?
For example, there are two columns EMP_ID, EMP_NAME. I want to update
employee name and issue the SQL statement in data source:
UPDATE EMPLOYEE SET EMP_NAME=?? W... more >>
What is the best way to refresh a datagridview control
Posted by Rob Dob at 5/9/2006 10:42:50 AM
Hi,
I have a tabcontrol with several tabs, each tab contains a datagridview
control, and displays data from the same dataset, the only difference being
the "where" clause of the select statement. As the user changes the value
of a particular field the record will move from tab to tab, base... more >>
Keeping Cells from getting Focus?
Posted by Josh Grameson at 5/8/2006 11:46:11 PM
I have a datagridview with some row that I want only to display. Which is
fine cause I make them readonly. But I would like that you can't land in
those cells as well. Is this possible?
... more >>
something like recordcount?
Posted by phil at 5/8/2006 3:49:50 PM
Hi,
Does it exist a function or method like 'recordcount' of the asp 2.0?
Thanks
Phil
... more >>
Datagrid versus Gridview
Posted by Arne Garvander at 5/8/2006 1:00:03 PM
The code below works fine in a DataGrid.
<asp:TemplateColumn HeaderText="Select">
<ItemTemplate>
<%# GetLink(Container.DataItem) %>
</ItemTemplate>
</asp:TemplateColumn>
What is the corresponding syntax for Gridview?
--
Arne Garvander
(I program VB.Net for fun and C# to get paid.)... more >>
use image in hyperlink field of datagrid?
Posted by geek-y-guy at 5/6/2006 1:18:06 PM
I have a datagrid being populated from a datasource. I added a hyperlink
field which points to a page with a detailsview component.
<asp:HyperLinkField
DataNavigateUrlFields="ContactID"
DataNavigateUrlFormatString="contactdetail2.aspx?ContactID={0}"
headerimageURL="~/images... more >>
How Do I Pass Bindingsource to Another Winform.
Posted by Rob Dob at 5/5/2006 4:21:00 PM
Hi,
I have two c# Winforms. the first form has a datagridview who's datasource
is a
bindingsource. when you double click on a datagridview row it then opens my
second form, which has some databound controls, text boxes that are bound to
another bindingsource. Both bindingsources are bound... more >>
How Do I Pass Bindingsource to Another form.
Posted by Rob Dob at 5/5/2006 11:57:58 AM
Hi,
I have two forms. the first form has a datagridview who's datasource is a
bindingsource. when you double click on a datagridview row it then opens my
second form, which has some databound controls, text boxes that are bound to
another bindingsource. Both bindingsources are bound to t... more >>
how to connect to mysql from VWD?
Posted by phil at 5/3/2006 9:20:31 PM
Hi,
I want to connect my application to a Mysql database. I installed the MyODBC
3.51 driver. I use asp.net 2.0 and VWD.
Is it possible to do that (DSN-less) in VWD, because when i choose ODBC in
the drop-down, i don't see Mysql.
If not, can anybody tell me which code (connection string, ge... more >>
Divide number in grid cell
Posted by Jason . at 5/3/2006 8:59:25 PM
I thought this would be fairly easy to do but I can't seem to get it
right. I would like to divide the number displayed in my datagrid cell
by one million. For example, my data looks like this:
34,000,000,000 and I would like to display it like 34,000.
Can I do this from the datagrid?
*... more >>
ASP.NET - gridview control
Posted by Incabyt at 5/3/2006 3:31:01 PM
Hello,
I am trying to but unable to link to a file (located on the same machine and
on the C: drive) from a hyperlink column in a gridview.
I have been using the DataNavigateURLField property (set to a field, Field1,
in my Gridview) and the DataNavigateURLFormatString property (set to
Fi... more >>
Filter Datagrid?
Posted by Jason . at 5/3/2006 2:11:21 PM
I have 3 datagrids on my page that uses data from one stored proc. The
data is sorted by category (3 categories). Can I use the data from
mystored proc to fill the datagrid without having to create three trips
to the server to load the data?
in pseudocode:
If category = 1 then load that d... more >>
Can you hide the contents of a row but leave the row there?
Posted by UJ at 5/2/2006 9:49:55 AM
Is there a way to leave a 'placeholder' for a row but to hide all of the
elements? I could probably go through and hide each element but it seems
like there should be an easier way.
TIA - Jeff.
... more >>
GridView, DropDownList, SQLDataSources.... ugh.
Posted by Ryan Marrs at 5/1/2006 11:38:27 PM
Hey guys, I'm working on CommerceStarterKit, modifying it to fit a friend's
needs. There are two issues I'm running into during this, and I'm about
spent.
Issue #1: Setting the SelectedValue of the DropDownList in the template
column based on the field ParentID bound to the datagrid.
I... more >>
|