473,786 Members | 2,611 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Formatting DataGrid cells and textboxs

Hi,

Is it possible to format a datagrid cell containing string
type data. (For example, i want "2122131199 " value to be
displayed as (212)-213-11-99.
Also text boxs hasn't that kind of property and
maskedEditBox is not suitable for data binding.

Heeeeelp!
Jul 21 '05 #1
1 2313
This link should help. I'm not sure if you are asking how to make
pre-existing data show in that format or if you want the users to just type
away and when they leave the column have it format. Either way, this page
will show you how to do it, but there are multiple ways. When the grid
loads, you can iterate through the columns and change the values, you can
wait until the user clicks in the grid or leaves it. Check out the link, if
you still have problems let me know.

Cheers,

Bill

http://www.syncfusion.com/FAQ/WinFor...c44c.asp#q973q
"Orhan Toker" <or***@taliasof t.com> wrote in message
news:27******** *************** *****@phx.gbl.. .
Hi,

Is it possible to format a datagrid cell containing string
type data. (For example, i want "2122131199 " value to be
displayed as (212)-213-11-99.
Also text boxs hasn't that kind of property and
maskedEditBox is not suitable for data binding.

Heeeeelp!

Jul 21 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
4674
by: Matthew Wieder | last post by:
Hi - I have a datagrid that has a black header and the rows alternate white and gray. The problem is that until items are added to the grid, the grid appears as a large black rectangle, which is quite ugly. The black area is larger then it is once an item is added. How can I solve this problem either by: A) Having only the header black and the rest of the empty block white or gray (preffered solution) B) Having the color gray or white...
1
2097
by: strout | last post by:
I know it's dumb ... sometimes frustrating I want the text and a dropdownlist align with both side of a table cell, i.e. text align left and dropdownlist align right. I cannot add more cells to do format because it's in a Datagrid pager area. The html code generated for pager is one sigle cell with lots of colspan. I tried to add some html elements in between text and dropdownlist, for example table iframe and p but I cannot achieve...
3
1783
by: chuckdfoster | last post by:
I have a hyperlink column in my datagrid. I want my hyperlink to be green or red (depending on in/out status) no matter if the link has been visited or not. How can I accomplish this? I have tried using CSS but that doesn't affect what is going on in my datagrid. This is what I have so far for formatting in my datagrid... Sub ItemBound(ByVal sender As Object, ByVal e as DataGridItemEventArgs) If e.Item.ItemType = ListItemType.Item Or...
0
1315
by: d pak | last post by:
Here is a snippit which replicates my issue. I have a datagrid which contains an input textbox on each row, binded on the serverside. However it seems that when I perform a postback to refresh teh numbers, they are not changing due to the foreach loop I have in this code. When I comment out the foreach loop, the numbers refresh fine (but the text boxs ovbiously no longer get created). I have placed this code in the OnItemDataBind method,...
1
1264
by: Billy | last post by:
I am creating a web application with VB.NET 2003. On one page I have a data grid with all databound columns which displays correctly and the editing feature does bring up the textboxs in the grid when I click. My problem is that for some reason, I cannot declare a textbox. When following microsofts code: Dim upoff As TextBox I get this error:
1
253
by: Orhan Toker | last post by:
Hi, Is it possible to format a datagrid cell containing string type data. (For example, i want "2122131199" value to be displayed as (212)-213-11-99. Also text boxs hasn't that kind of property and maskedEditBox is not suitable for data binding. Heeeeelp!
1
4577
by: euan | last post by:
HI Guys, I have bee using conditional formatting in the datagrid recently and I am moving over to framework 2.0 and noticed the datagrid has been replaced by the gridview. So, I would like to do conditional formatting on the gridview but it doesnt have the same methods. Currently in my datagrid I have this (this is just hacked together randomly but gives you the idea):
2
7344
by: jacqueharper | last post by:
I need to change the formatting of individual cells in a datagrid. I cannot figure out how to address individual cells by their column name. I have a DataTable which contains (for instance) columns called Weight, Length and Diameter. The table is bound to a DataGrid, and I am using the ItemDataBound behavior to execute code that checks values in the table, e.g.: public void OnDataBindValuesCheck (object sender, DataGridItemEventArgs e)
7
16469
by: Ryan | last post by:
I have a DataGridView which displays numeric (Int32) data from an underlying database. I want the numbers to be displayed in numeric format "#,###" (with commas). I want to also limit the user so they can only input numerical values. Is there any way to do this? Currently my formatting works but if the user enters a value manually the formatting is not applied to the new value. Also I haven't found a way to allow only numerical input....
0
9650
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9497
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10164
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10110
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8992
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5398
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5534
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4067
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2894
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.