473,545 Members | 1,759 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

how to set the topmost row item in a datagrid control

Hi,

i want to set the topmost row displayed in a datagrid control but can't find
the command for it.
Before there was the .setfirstrow property,

but in this datagrid (framework 1.1) control i can't find it?

thanks.
Nov 20 '05 #1
2 995
Hi Willie,

The DataGrid doesn't have a public method to do this. Below are links to two
entries on George Sheperd's Windows Forms FAQ that show how to use
inheritance to allow scrolling to a particular row and finding out the
top/left cell in the grid. Hopefully you can combine these to get what you
need.

http://www.syncfusion.com/faq/winforms/search/895.asp
http://www.syncfusion.com/faq/winforms/search/880.asp

--
Rob Windsor [MVP-VB]
G6 Consulting
Toronto, Canada
"Willie wjb" <wj****@nomail. nl> wrote in message
news:Om******** ******@TK2MSFTN GP10.phx.gbl...
Hi,

i want to set the topmost row displayed in a datagrid control but can't find the command for it.
Before there was the .setfirstrow property,

but in this datagrid (framework 1.1) control i can't find it?

thanks.

Nov 20 '05 #2
thanks!

strange that this is no default property!

"Rob Windsor [MVP]" <rw******@NO.MO RE.SPAM.bigfoot .com> wrote in message
news:OL******** ******@tk2msftn gp13.phx.gbl...
Hi Willie,

The DataGrid doesn't have a public method to do this. Below are links to two entries on George Sheperd's Windows Forms FAQ that show how to use
inheritance to allow scrolling to a particular row and finding out the
top/left cell in the grid. Hopefully you can combine these to get what you
need.

http://www.syncfusion.com/faq/winforms/search/895.asp
http://www.syncfusion.com/faq/winforms/search/880.asp

--
Rob Windsor [MVP-VB]
G6 Consulting
Toronto, Canada
"Willie wjb" <wj****@nomail. nl> wrote in message
news:Om******** ******@TK2MSFTN GP10.phx.gbl...
Hi,

i want to set the topmost row displayed in a datagrid control but can't

find
the command for it.
Before there was the .setfirstrow property,

but in this datagrid (framework 1.1) control i can't find it?

thanks.


Nov 20 '05 #3

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

Similar topics

0
1409
by: Sajjadul Hakim | last post by:
Hello Everyone, When i add a DataGrid to a form, the TopMost property of the form becomes invalid; i.e. even if the TopMost property is set to "true" the form does not stay on top of other forms. This is very weird. You can try it out. I tried a way around. If I reset the form's TopMost property in the DataGrid's "Paint" event, it works....
2
1578
by: martin | last post by:
Hi, I am iterating through the dataitems in a datagrid and producing and xml document, If a particular cell in the datagrid has a textbox control or a datagrid control in it then I have no problem retrieveing it value by casting with CTYPE however when the datagrid cell contains no control, but does contain text, then I am having great...
3
4363
by: Tim::.. | last post by:
Can someone please tell me how I go about preselecting an item in a drop drown list when I click the Edit Command in a datagrid? I have tried the following but it doesn't work for me! I would be really grateful for any assistance! Thanks
4
2288
by: Chris | last post by:
Using: DataGrid1_ItemCommand(ByVal source As Object, ByVal e As System.Web.UI.WebControls.DataGridCommandEventArgs) Handles DataGrid1.ItemCommand is there a way to find a specific item in the datagrid. I'm using the CommandEvent to do some stuff. When I try to use syntax like this: e.Item(1).FindControl("txtQuestion"), TextBox).Text
3
1396
by: louise raisbeck | last post by:
Hi, I have been on this for hours and just cannot work it out. I have a datagrid. I set the edititem index to a row to edit, that works. However if i want to put a value into this textbox it wont let me. I just cant find the control in the controlcollection for the cell. Is it because it hasnt rendered yet? (very annoying as i have set the...
2
3667
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 checkbox in the datagrid, if it is checked, it updates the corresponding rows prices. That works, no problem. What I need to do is that when a user...
3
1760
by: Skowronek | last post by:
What is the best method to obtain a data value from a parent datagriditem from a child datagrid - datagrid footer item command event handler? Here is the layout of my asp.net controls <datagrid1> <datagriditem1> <datagrid2> <datagridfooter> <listbox><commandbutton>
1
2014
by: SamSpade | last post by:
I learned about the TopMost property from a recent post which solved some problems. But I have a situation where a control wants to make the form it is on be the topmost. It could raise an event but be cleaner if it could do it directly. I tried the following but the compiler thinks Parent is a control (they don't have a topmost...
15
3082
by: glenn | last post by:
Hi folks, I have a DropDownList in a DataGrid that is populated from records in a database. I want to add a value that might be a string such as "Select a Company" for the first item since an OnSelectedIndex event is not fired if you select the first item. Does anyone know of an easy way to do this?
0
7467
marktang
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...
0
7401
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7656
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, 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. ...
0
7807
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
7756
tracyyun
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...
0
5971
agi2029
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...
1
5326
isladogs
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...
0
3450
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
1879
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 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.