473,322 Members | 1,314 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

Datagrid with XML input

Hi
I had a XML data file which bind onto a datagrid.
inside my XML i had a attribute named color and have value "green",
"black"...etc.

are there any way to define row color using this attribute?

Thanks a lot.
Windy
Nov 21 '05 #1
4 995
Windy,

Normally a dataset has no attributes however only elements.

Therefore can you explain a little bit more what the XML file looks like?

Cor
Nov 21 '05 #2
hi Cor,

the xml should have the format similar as the one listed below.
<xml..>
<root>
<row color="green">
<field1>a</field1>
<field2>b</field2>
</row>
<row color="red">
............
</row>
</root>
...i am thinking if this format would be better or not. But my major concern
is to set color per row inside the datagrid.
<row>
<field1>a</field1>
<field2>b</field2>
<color>green</color>
</row>

thx.

"Cor Ligthert [MVP]" <no************@planet.nl> ¼¶¼g©ó¶l¥ó·s»D:u0**************@tk2msftngp13.phx.g bl...
Windy,

Normally a dataset has no attributes however only elements.

Therefore can you explain a little bit more what the XML file looks like?

Cor


Nov 21 '05 #3
Windy,

Sorry I was fixed at that attribute. The second one shows a datagrid.

However what color you want to change in a datagrid, AFAIK you cannot change
a color of a datagridrow.

(assuming that you use a windowsform from a webform I don't know that).

Cor
Nov 21 '05 #4
yup i am using winform.
But i think there should be ways to do that.

"Cor Ligthert [MVP]" <no************@planet.nl> ¼¶¼g©ó¶l¥ó·s»D:%2****************@TK2MSFTNGP10.phx .gbl...
Windy,

Sorry I was fixed at that attribute. The second one shows a datagrid.

However what color you want to change in a datagrid, AFAIK you cannot
change a color of a datagridrow.

(assuming that you use a windowsform from a webform I don't know that).

Cor

Nov 21 '05 #5

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

Similar topics

3
by: Dmitry Akselrod | last post by:
Hi, I am using a standard .NET 1.0 Datagrid. Actually, I am using two, bound to a master-detail relationship. Both DataGrids are bound to a datasource. I have the MSDN version of the...
2
by: Daniel Walzenbach | last post by:
Hi, I created an ASP.NET Datagrid where a single row can be selected by clicking anywhere on the row (according to...
2
by: ddaniel | last post by:
I have read many posts and seen many papers on the different techniques for sort and filtering datagrids. Many do re-queries against the dB ala Fritz Onion. I am trying to leverage the Dataview....
5
by: ManuNeko | last post by:
Can anyone tell me how to work with a datagrid or where I can find a tutorial or an example? I have a datagrid on my form and now if a user adds a row I want to insert that row into the...
0
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...
2
by: Luis Esteban Valencia Muñoz | last post by:
I have a datagrid that displays editable text fields (2 different price fields) and a checkbox in every row. It has a "SaveChanges" button at the bottom, which, when pressed, looks at every...
0
by: John Hopper | last post by:
Can someone please tell me why the datagrid doesn't databind and display rows once the Add button is clicked and the cmdSaveToDataset event fires, to add a row to the dataset? I've copied the code:...
7
by: Jaime Stuardo | last post by:
Hi all.. I have a DataGrid with checkboxes. In the header I have a "check all" checkbox. I'm wondering if there is an easy way to check all checkboxes using that checkbox. I could do it using...
0
by: Wyatt70 | last post by:
I'm attempting to implement a javascript popup calendar in a DataGrid. The calendar will be used to insert a date into a textbox. I keep getting a "System.NullReferenceException: Object reference...
2
by: Mike Baugh | last post by:
I am using visual studio 2005 to develop a form using c# I have 3 datagrids on one form. I can set the row color based on a certain value in a column. However this color applies to all 3...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.