.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Post New Web Links

Datagridview automatically update in c# by two Forms.

Posted By:      Posted Date: April 10, 2011    Points: 0   Category :Windows Application
 

Hi to every body.

Note: I use Windows Application not Web Application.

 I am programming a database(Library database) program whit C# and SQL Server. I have a Tabel suppose that tblBook that show the information about my library books. I have a MainForm that have a Datagridview that linked to my tblBook and show my Books information that inserted in tblBook. in Main Form I have a Button that open another Form(Name is frmNewBook) for inserting information about a new Book in my tblBook. when I open frmNewBook by that Button and insert a new record at this time I want the Main Form automaticaly Update and the Datagridview show also new record information automaticaly by closing the frmNewBook Form or by Pushing the button(Save New Record.) that's my question.

 thank a lot Saeed.

 

 

More Related Resource Links

Struggling to remove ellipses when columns in a DataGridView are automatically truncated

  
Hi all, I've got approx. 20 columns in a DataGridView so screen real estate is a little limited! All the columns have a fixed width, and in my old DataGrid when the content was too big for cell it would simply disappear off the edge so a cell containing 'flibberty' would be in the table cell |flibber| In contrast, with datagridview this becomes |flibb...| - I'd really really like to get rid of these ellipses and get the old DataGrid behaviour for this case - but it doesn't seem straightforward at all, can anyone help? Thanks, Henri

How to auto set forms width automatically on different versions of windows OS.

  
How to auto set forms width automatically on different versions of windows OS.My application running on Windows Server 2000 Pops a new windows forms side by side the MDI and fits without overlapping.  When the same application is hosted on Windows Server 2008 and the new window pops up, it is overlapping on the existing MDI.

How automatically update a calculated property in wpf

  
Hi, For example: I have a class MediaList with a list of mediaitems. (Movie, Serie, Season, Episode). All these classes have a property FileSize. So we get this structure: Movie has a property FileSize. Serie has a property FileSize and a property Seasons. Seasons has a property FileSize and a property Episodes. Episode has a property FileSize If have a calculated property FileSize on MediaList that i want to show. If one episode or movie is deleted, the parents fileSize needs to be updated until MediaList.FileSize is updated. What is the best practices to handle this kind of properties? Thx   

Approval Workflow does not update the Content Approval status if started automatically

  

Hi,

I’m using a simple Approval Workflow associated with Content Approval on site pages. It works fine when I set it to be started manually (by using Allow this workflow to be manually started by an authenticated user with Edit Item permissions  option) and on the completion of the workflow the Content Approval status is updated accordingly. But when I set it to be started automatically (by using Start this workflow when a new item is created  / Start this workflow when an item is changed options), it does not updates the Content Approval status. Note that I’ve set the Update the approval status after the workflow is completed (use this workflow to control content approval) option to true.

Regar

Approval Workflow does not update the Content Approval status if started automatically

  

Hi,

I’m using a simple Approval Workflow associated with Content Approval on site pages. It works fine when I set it to be started manually (by using Allow this workflow to be manually started by an authenticated user with Edit Item permissions  option) and on the completion of the workflow the Content Approval status is updated accordingly. But when I set it to be started automatically (by using Start this workflow when a new item is created  / Start this workflow when an item is changed options), it does not updates the Content Approval status. Note that I’ve set the Update the approval status after the workflow is completed (use this workflow to control content approval) option to true.

Regards

Approval Workflow does not update the Content Approval status if started automatically

  

Hi,

I’m using a simple Approval Workflow associated with Content Approval on site pages. It works fine when I set it to be started manually (by using Allow this workflow to be manually started by an authenticated user with Edit Item permissions  option) and on the completion of the workflow the Content Approval status is updated accordingly. But when I set it to be started automatically (by using Start this workflow when a new item is created  / Start this workflow when an item is changed options), it does not updates the Content Approval status. Note that I’ve set the Update the approval status after the workflow is completed (use this workflow to control content approval) option to true.

Regards

how to display sharepoint DocumentLibrary files details into datagridview of windows forms applicati

  

HI!

Now iam using sharepoint server 2007, here DocumentLibrary is having some files.

i need to display these files information into datagridview of windows forms application.

where datagridview columns are like

type        name (file name)   modified (date)        modifiedby     checked out to

 

i have the code like...

 

 

private

update forms

  

I have a form that updates data in a table. How do i make the updated data show in the form when i come back to it. vb.net.


System.Windows.Forms.WebBrowser unable to update or change

  

I am using this WebBrowser component in a C# project.

I have declared and use "_wb" as shown below::

string httpcmd = @"https://...........";

System.Windows.Forms.WebBrowser _wb = new System.Windows.Forms.WebBrowser();                
_wb.ScriptErrorsSuppressed = false;                
Uri myuri = new Uri(httpcmd);
_wb.Url = myuri;
while (_wb.ReadyState != System.Windows.Forms.WebBrowserReadyState.Complete)
{
System.Windows.Forms.Application.DoEvents();
}

 

The above code in within a class.

Once my program uses the above code once, it then does seem possible to change.

i.e. After the first iteration, nothing changes each time the code is run.

The DocumentText property I reference stays the same once it is set.

It is like the URI is not even re-sent.

Only if I close the application and then re-run then the webbroweser will update as desired.

I have seen many references to this problem but have not been able to resolved it.

Can anyone suggest how to get this componet to reset or clear so it behaves like I have re-run the application?

 


How to export from DatagridView to Excel Sheet in C# Windows Forms

  

Hi,

I am developing an application that loads a spreasheet to a datagrid, i then add a column (with data) dynamically in the datagrid. How can I take the data in the whole datagrid and display it in a new spreadsheet. Please help!


how to update cell in datagridview ?

  

hi

i have datagridview that connect to my database (access)

if i stay on any cell and change the value, a see that the value is changed

but when i make refresh i see that the value is back to the original value.

how i can update this cell (without sql query)

i bind dataset to datagridview like this:

dsView = new DataSet();
            adp
= new OleDbDataAdapter("SELECT * FROM Items", Conn);
            adp
.Fill(dsView, "Items");

Any way to automatically update/refresh Linq to SQL model?

  

If I make a change to my database (let's say I add a column to a table), is there any magical buttons that I can click to have my Linq to SQL model update to reflect the changes to my table?  I had to create two additional columns yesterday, and both times I found myself destroying and then recreating the Linq model.


How to update .edmx and domain service automatically? if any changes occur in View Table

  
Hi,



I have a Age_Group Table in which its values change frequently and even I created View table. Based on Age_Group Table row's value which represent as columns in View Table. If Age_Group row's value change, new row occur or delete the rows based on that the View table is displayed. I am taking these View tables in .edmx and set domain service for that .edmx.

My query are:

Can I update the .edmx and domain service automatically? if Age_Group row's value change.

If yes, please tell me the way.



Thanks,

ASP.Net Gridview Edit Update Cancel Commands

  
In ASP.Net 2.0, GridView Control also provides the functionality to edit and update the data retrieved from the database using CommandField template. You can cancel the action using Cancel Command of the CommandField. GridView consists of events that can be used to perform the actions like edit, update and cancel upon the Data items displayed in the ASP.Net GridView Data Control.

How to format and update GridView and DataGrid rows using JQuery

  
The behavior described in this question is as expected. When you set text of a cell in grid, it directly affects HTML that is going to be rendered. When you set text value of a cell, it means that you are setting innerText of the cell. The column that GridView creates for command fields (Edit, Delete and Select) are a (anchor) or button elements. So you can see what will happen if you set text value in that cell. It will wipe out those link or button controls and replace them with simple text string.

Routing for Web Forms in ASP.NET 4.0

  
posted a prototype demonstrating how one could use Routing within Web Forms. This is something you can do today with ASP.NET 3.5 SP1, because of the work we did to separate Routing from ASP.NET MVC. I would have liked to include Web Form Routing as part of the Routing feature when we were working on SP1, but we didn't have the time to do so in a robust manner before SP1 was locked down.

Application Architecture in Windows Forms 2.0

  
Applications have special support in Windows Forms. For starters, you can manage and tailor your application's lifetime, and, when the work flow is disrupted by an unhandled exception, you can choose from several methods of response. Then, there are several application models that you can employ, including Single Document Interface (SDI) and Multiple Document Interface (MDI) applications, each of which can support either multiple-instance or single-instance mode, the former the VS05 default and the latter requiring special consideration. All applications, however, can discover and use a wide variety of information about the system and environment they execute in.
Categories: 
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend