473,385 Members | 1,757 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,385 software developers and data experts.

datagrid operation and refresh

i suppose dataset1 is ur SQL dataset which u have
populated some where. U need to refresh this dataset again
after u have deleted the row from the table.
So repopulate the dataset and then bind it to the datagrid

regards,
s.ravi sankar
-----Original Message-----
Hi.

I am deleting a row from my datagrid, but it is not refreshing immediatelyafter the delete.

My delete handler is as below.

What do I need to add to get it to refresh properly?

private void DataGrid1_DeleteCommand(object source,
System.Web.UI.WebControls.DataGridCommandEventArg s e)

{

cmdDeleteUser.Parameters["ID"].Value = DataGrid1.DataKeys [e.Item.ItemIndex];
oleDbConnection1.Open();

cmdDeleteUser.ExecuteNonQuery();

DataGrid1.DataSource = dataSet1;

DataGrid1.DataBind();

oleDbConnection1.Close();

}

Thanks in advance.
.

Nov 17 '05 #1
0 920

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

Similar topics

2
by: HKM | last post by:
Hi All, Is it possible to disable the datagrid refresh while changing the datasource properties, basically im renaming columns in the background and sometime it gets crazy to see datagrid...
0
by: Hollywood | last post by:
I have a DataGrid that is bound to an ArrayList as a SynchArray. The ArrayList is updated by a thread. The thread locks the array list whenever it does an add/remove operation and then tells the...
0
by: AR | last post by:
I have a datagrid containing a single combobox column. It also contains an 'Add New Row' button at the bottom of the datagrid. The datagrid is in a form that contains 'Save' and 'Restore' buttons....
5
by: John Richardson | last post by:
I've been bothered for some time about my DataGrid not populating my rows very quickly. I have about 10K rows loading into the grid. I create a datatable dt with 2 columns, an ID and a display. ...
1
by: Jim Bayers | last post by:
I have a datagrid on a form that's bound to a datareader. When I click on my browser's refresh button, it adds a duplicate record to the bottom of the datagrid. This record appears in the...
7
by: Juan Romero | last post by:
Hey guys, please HELP I am going nuts with the datagrid control. I cannot get the damn control to refresh. I am using soap to get information from a web service. I have an XML writer output...
0
by: CSerpent | last post by:
AFTER A "REFRESH", HOW DO I RETURN THE USER TO THE RECORD HE WAS PREVIOUSLY WORKING WITH? I have a DataTable, and a bound DataGrid. The DataTable contains a column which is Unique, but the...
2
by: Gene Hubert | last post by:
I'm assigning a new datasource (a datatable) to a datagrid that is aready displayed in a form. Then I assign a new value to CurrentRowIndex. The datagrid always scrolls so that the new current...
6
by: =?Utf-8?B?TWFyaw==?= | last post by:
Hi - I'm having trouble refreshing a datagrid control bound to a dataset that was created from the New Data Source wizard. What is the code required to refresh the datagrid with data from the...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
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...

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.