I realised that if I use datagrid and datasource is a
datatable, when I created a new row and while on that row
I exit the datagrid (ie. without moving into the next
row) and focus onto another control, that new row is not
recorded (check it at the datagrid.valida ting event).
However, if I use down arrow key to move to the next row
(without keying any data) and exit, the new row is
recorded in the datatable.
can anyone please advise if I can force the datagrid row
into the datatable without moving the arrow key ??
Thank you
AH 4 1301
Good question. I cant find a way of doing this easily, but I am sure that
there is a way. However, I am interested to know why you would want to add
blank rows to your grid ?
OHM
KB wrote: I realised that if I use datagrid and datasource is a datatable, when I created a new row and while on that row I exit the datagrid (ie. without moving into the next row) and focus onto another control, that new row is not recorded (check it at the datagrid.valida ting event). However, if I use down arrow key to move to the next row (without keying any data) and exit, the new row is recorded in the datatable. can anyone please advise if I can force the datagrid row into the datatable without moving the arrow key ??
Thank you
AH
Regards - OHM# On**********@BT Internet.com
Maybe there is a way. On the currentCellChan ged event, you can compare the
rowIndex with the rows.count on the bound table. If the row is greater, you
could save it at this point.
Worth a try.
OHM
One Handed Man [ OHM# ] wrote: Good question. I cant find a way of doing this easily, but I am sure that there is a way. However, I am interested to know why you would want to add blank rows to your grid ?
OHM
KB wrote: I realised that if I use datagrid and datasource is a datatable, when I created a new row and while on that row I exit the datagrid (ie. without moving into the next row) and focus onto another control, that new row is not recorded (check it at the datagrid.valida ting event). However, if I use down arrow key to move to the next row (without keying any data) and exit, the new row is recorded in the datatable. can anyone please advise if I can force the datagrid row into the datatable without moving the arrow key ??
Thank you
AH
Regards - OHM# On**********@BT Internet.com
Regards - OHM# On**********@BT Internet.com
hi, nice to know that I'm not the only one facing this
problem. re 1st question I did not create a blank row. I
actually key in data but cursor did not leave that row. I
realised it does not create that row in datatable until
you actual move the cursor to next row.
yes .. that could work but i believe that must be a
better way ... could any expert care to help? I do a
validating event and the set focus back to grid and next
validating event will create that row into the
datatable ... strange.. therefore I believe there must be
some event or method that can force the record into the
datatable.
Rgds,
AH -----Original Message----- Maybe there is a way. On the currentCellChan ged event,
you can compare therowIndex with the rows.count on the bound table. If the
row is greater, youcould save it at this point.
Worth a try.
OHM
One Handed Man [ OHM# ] wrote: Good question. I cant find a way of doing this easily,
but I am sure that there is a way. However, I am interested to know
why you would want to add blank rows to your grid ?
OHM
KB wrote: I realised that if I use datagrid and datasource is a datatable, when I created a new row and while on that
row I exit the datagrid (ie. without moving into the next row) and focus onto another control, that new row is
not recorded (check it at the datagrid.valida ting event). However, if I use down arrow key to move to the next
row (without keying any data) and exit, the new row is recorded in the datatable. can anyone please advise if I can force the datagrid
row into the datatable without moving the arrow key ??
Thank you
AH
Regards - OHM# On**********@BT Internet.com
Regards - OHM# On**********@BT Internet.com
.
I wouldnt swear to it, but this may be how it was intended to work !
OHM an*******@discu ssions.microsof t.com wrote: hi, nice to know that I'm not the only one facing this problem. re 1st question I did not create a blank row. I actually key in data but cursor did not leave that row. I realised it does not create that row in datatable until you actual move the cursor to next row.
yes .. that could work but i believe that must be a better way ... could any expert care to help? I do a validating event and the set focus back to grid and next validating event will create that row into the datatable ... strange.. therefore I believe there must be some event or method that can force the record into the datatable.
Rgds,
AH
-----Original Message----- Maybe there is a way. On the currentCellChan ged event, you can compare the rowIndex with the rows.count on the bound table. If the row is greater, you could save it at this point.
Worth a try.
OHM
One Handed Man [ OHM# ] wrote: Good question. I cant find a way of doing this easily, but I am sure that there is a way. However, I am interested to know why you would want to add blank rows to your grid ?
OHM
KB wrote: I realised that if I use datagrid and datasource is a datatable, when I created a new row and while on that row I exit the datagrid (ie. without moving into the next row) and focus onto another control, that new row is not recorded (check it at the datagrid.valida ting event). However, if I use down arrow key to move to the next row (without keying any data) and exit, the new row is recorded in the datatable. can anyone please advise if I can force the datagrid row into the datatable without moving the arrow key ??
Thank you
AH
Regards - OHM# On**********@BT Internet.com
Regards - OHM# On**********@BT Internet.com
.
Regards - OHM# On**********@BT Internet.com This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Steve M |
last post by:
I have subclassed CollectionBase. I have also implemented GetEnumerator().
I have tried to set the DataSource of a DataGrid to an instance of my
subclass. However, the items in the grid are not obtained via the Enumerator
that I create in the GetEnumerator() method.
I have tried elplicitly implementing IEnumerable on my sublass as well.
Can anyone help on this? Thanks in advance.
|
by: Junkguy |
last post by:
I need to be able to tell if the blank row of a DataGrid has been edited or
not.
In a DataGrid, you may notice that if you click on the asterisk row, the
asterisk will change to a triangle, but no "new" blank asterisked row will be
added to the bottom *until* you type some data. How can I tell if you have
begun to type data into this row or not?
Here is the reason I need this. I need to call
CurrencyManager.EndCurrentEdit() on a row...
|
by: Teep |
last post by:
Below is my code for dropdownlist that is populated from a SQL table.
After a selection from the ddl, a datagrid is suppose to come up
pertaining to the information selected, but I keep getting a DNS
error. I developed this "simple" page but so far it is not simple!
argh!
<%@ Page Language="VB" Debug="true" Explicit="true" %>
<%@ import Namespace="System.Data" %>
|
by: steroche |
last post by:
I would REALLY appreciate help please please please! Im sure it is
probably blindingly obvious to most of you but I am totally in the dark
here!I am lost - i thought i had finally figured out this dataSet
updating lark when i realised that i think i am right back at square
1!!!
Here's my scenario - i have a SQLDB and i retrieve all my data from
that into a dataset and display this to a datagrid(WebForm). I have got
this grid sorted and...
|
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 the file to a folder, and
then I read it back into the dataset using the dataset1.readxml. Up to this
point, everything works wonderfully. The query executes, the dataset gets
populated, and I get the results displayed in the datagrid.
| |
by: Coleen |
last post by:
Hi All :-)
Thanks for all of your help Cor :-)
I can not get the code you sent me to work in my application. I'm using an aspx datagrid in a web form. I'm getting the following error message when I try this code:
"Syntax error in aggregate argument: Expecting a single column argument with possible 'Child' qualifier."
Dim dr2 As DataRow = dt_stat_report_3b.NewRow
Dim sum As Double =...
|
by: Nina |
last post by:
Hi there,
I've tried everything that I know to prevent usre resizing datagrid columns,
but nothing works. Following are the code that I used. Please tell me
what's wrong with them. Thank you.
P.S.: dg is datagrid
Protected Overrides Sub OnMouseDown(ByVal e As
System.Windows.Forms.MouseEventArgs)
|
by: Bill nguyen |
last post by:
I've been using Datagrid for most of my app's data entry screens. Now I have
the need for users to select multiple rows for printing. Is it possible with
Datagrid items?
Thanks
Bill
|
by: Frank |
last post by:
Can someone please tell me when the ViewState is loaded? My
understanding, based on
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconControlExecutionLifecycle.asp
is that it should be loaded before the Page_Load event, however, given
the following code I don't get the expected results.
private void Page_Load(object sender, System.EventArgs e)
{
if (Page.IsPostBack & ViewState != null)
|
by: settyv |
last post by:
Hi,
I have webform which has 4 Datagrid controls with (built-in
Pagination) and 4 search buttons to perform the search operation.When i
click on search operation it is displaying the results in grid .when i
click next it is telling error...Please let me know how to solve this
problem.
Below method can be used for all the datagrids.
|
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...
| |
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
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...
|
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,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
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...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
| |
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
|
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...
| |