473,326 Members | 2,081 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,326 software developers and data experts.

DataGrid drive me mad

In my web application i have a datagrid which fill Cities and have a forign
key to Country table... here is the query:
SELECT A.ID, A.A_NAME, A.E_NAME, B.A_NAME AS COUNTRY, A.PHONE_CODE FROM
hrc_city AS A "+
"INNER JOIN hrc_country AS B ON B.ID=A.COUNTRY".

In edit mode i display country name in a dropdown list using another query
from country table, i have to problems.

1- After i edit any row of the grid except first row.. i found the row i
edit twice, one in the top first row whth the updated data
and another one in the orignal row with the old data!!
2- the updated data display the id of the country instead of the name...

if the grid became in the edit mode again (even if i didn't edit anything)
everything get fixed and displayed correctly the right row with the right
country name!!!!
What's wrong... do i miss something??
Help please
regards
Nov 19 '05 #1
1 1094
Can you show me how you update function looks like?

--
Sonu Kapoor - [MCP]
ASP.NET Moderator
WebSite: http://www.Kapoorsolutions.com
Blog: http://www.Kapoorsolutions.com/blog/
ASP.NET News: http://www.Kapoorsolutions.com/reblogger/
"Islam Elkhayat" wrote:
In my web application i have a datagrid which fill Cities and have a forign
key to Country table... here is the query:
SELECT A.ID, A.A_NAME, A.E_NAME, B.A_NAME AS COUNTRY, A.PHONE_CODE FROM
hrc_city AS A "+
"INNER JOIN hrc_country AS B ON B.ID=A.COUNTRY".

In edit mode i display country name in a dropdown list using another query
from country table, i have to problems.

1- After i edit any row of the grid except first row.. i found the row i
edit twice, one in the top first row whth the updated data
and another one in the orignal row with the old data!!
2- the updated data display the id of the country instead of the name...

if the grid became in the edit mode again (even if i didn't edit anything)
everything get fixed and displayed correctly the right row with the right
country name!!!!
What's wrong... do i miss something??
Help please
regards

Nov 19 '05 #2

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

Similar topics

2
by: andrewcw | last post by:
I am considering using the DataGrid to show my data. I will take the class data and serialize it / xml transform it or simply load it into a new XML document. The new XML document is essentially a...
1
by: dj Bass | last post by:
I've got a situaion where there's one frame with a load of buttons, acting as a small control panel, with a datagrid object existing in another frame. On clicking on one button on the top frame,...
0
by: Paul Perot | last post by:
Hi All: I am populating a Data Table with File/Folder information from my drive... I am then binding this data table to a DataGrid. Due to the size of the DataGrid data, I use the built in...
2
by: JenHu | last post by:
hi, I have a datagrid in my asp.net application, I am using vb.net language. I want to have my last column as a link column, link to text file. The link path is "c:\Temp\" & F_File_Name, which...
21
by: coleenholley | last post by:
I've been trying since last Friday to get an answer on how to get a SPECIFIC row.cell value from a datagrid. I've had plenty of suggestions, but nothing works to get the value from a SPECIFIC Row...
2
by: Dennis | last post by:
I have a class which inherits from DataGrid and it is bound to a a DataTable. I have defined the GridColumnStyles I want to display. Also, I have added an "InsertCol" to my class whidh has the...
2
by: Sue | last post by:
Nested datagrid within outer datagrid. Both datagrids use tables to format data in both the itemtemplate and edittemplate sections. Having problems with the format of once of the tablecells in the...
2
by: Joel | last post by:
I'm trying to format the data from our database query that is being binded to a DataGrid. Basically an easy example to understand the problem is a field in the database uses 1's and 0's to show...
0
by: jaeden99 | last post by:
I have created a datagrid filled with information from the database. When a user clicks on a particular cell (this cell contains drive letter and file name), I would like to be able to open the...
1
by: Jahedx99 | last post by:
Check out the site: www.progtalk.com. They have a great article to expand and collapse rows of a grid. The cool part it, that the expanding and collapsing happens using Javascript. I think the...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
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...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
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: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
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
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.