Ask a Question related to ASP.NET Data Grid Control, Design and Development.
-
Jeff Thur #1
Need to Format a zipcode into xxxxx-xxxx.
I guess that you can't do this with the property window
of datagrid control. Probably need an itemdatabound event.
How can I program an itemdatabound control to get a column
(Zipcode) to look as such xxxxx-xxxx. It currently is in
this format, xxxxxxxxx.
Thanks for any help.
..
Jeff Thur Guest
-
Web.config: <allow users="xxxx" /> Where does xxxx come from?
I'm using Forms Authentication. When I authenticate a user from a database, I use the following line:... -
looking for online zipcode program and database
I am looking for an online zip code program / database, that will aloo me at a minimum to be able to type in a zip code, a distance (5mile, 10miles,... -
Canada ZipCode Finder
Hi Everyone, I am writing an asp application using US Zipcodes.....I was wondering...apart from the zipcode format being different between Canada... -
City/State auto fill-in with entry of ZipCode
On Mon, 7 Jul 2003 15:18:21 -0700, "Krisse Arthur" <karthur@ci.bellevue.wa.us> wrote: You can use a combo box based on tblZip, with all three... -
Problems with SCSI aic79xx driver in 2.4.21 kernel...., 'attempting to abort cmd xxxxx'
problem occurs....Note I am trying to install on a SuperMicro system server, model 6013P8.. I basically compiled a version of the 2.4.21 kernel and... -
RJ #2
Re: Need to Format a zipcode into xxxxx-xxxx.
Jeff,
It happens that the string formatting is the only part that does work for
me. My problem is changing the cell background color, as in my previous
post. This FormatCells method works for me if it is called by the
DataGrid1_ItemDataBound event handler. The format specifier may be a little
off, but the code certainly executes before the grid displays.
' The ItemDataBound event is handled for each row in datasource......
Private Sub DataGrid1_ItemDataBound(ByVal sender As Object, ByVal e As
System.Web.UI.WebControls.DataGridItemEventArgs) Handles
DataGrid1.ItemDataBound
' FormatCells does get called for each row.....
FormatCells(sender, e)
End Sub
Protected Sub FormatCells(ByVal sender As System.Object, ByVal e As
System.Web.UI.WebControls.DataGridItemEventArgs)
If e.Item.ItemType = ListItemType.Item Or e.Item.ItemType =
ListItemType.AlternatingItem Then
e.Item.Cells(5).Text = String.Format("ddddd-dddd", zip)
"Jeff Thur" <jeff@emscirc.com> wrote in message
news:021701c51553$6b75d380$a501280a@phx.gbl...> I guess that you can't do this with the property window
> of datagrid control. Probably need an itemdatabound event.
>
> How can I program an itemdatabound control to get a column
> (Zipcode) to look as such xxxxx-xxxx. It currently is in
> this format, xxxxxxxxx.
> Thanks for any help.
> .
>
>
RJ Guest



Reply With Quote

