how to set focus on a row of a dataGrid from outside the datagrid control.

after a user selects a choice in the dropdownlist,

I am in the dropdownlist eventhandler OnSelected_event_handler()
based on the choice how can i programmatically set the focus inside another control, ie datagrid control's row.
note: the drop down list is OUTSIDE the datagrid, i.e not a template column

private void ddl_SelectedIndexChanged(object sender, System.EventArgs e)
{
dg.SelectedIndex = ddl.SelectedValue; // is this right, i am trying to set focus to the row

}
0
xmlguy
10/21/2003 10:01:17 PM
asp.net.web-forms 93655 articles. 6 followers. Follow

1 Replies
793 Views

Similar Articles

[PageSpeed] 2

What do you mean by "set the focus"? Are you looking to highlight the row or just make the page jump down to it or something else?
0
russnem
10/22/2003 12:08:35 AM
Reply:

Similar Artilces:

Clearing selection in DataGrid when user clicks outside the DataGrid control (Windows Forms)
Dear All, What is the best way to clear selection in the DataGrid/DataGridView when the user clicks outside the control? For example, user clicks inside the DataGridView, selects entire row, then clicks outside the DataGridView to clear the selection.  What events can I monitor, and what is the best approach to solving this problem? Any feedback would be appreciated, this seems to be very difficult to do.   Thanks....

How to place a DataGrid Control with in a DataGrid Control
Hi, I want to place a DataGrid control in a DataGrid control can any one plz tell me the procedure to place the control Thanks in Advance Krisamigo <!---<asp:DataGrid ID=dg_List runat=server><Columns><asp:TemplateColumn><ItemTemplate><asp:DataGrid ID=dg_List2 Runat=server></asp:DataGrid> </ItemTemplate> </asp:TemplateColumn> </Columns> </asp:DataGrid> ---> Hardik Joshi...

setting focus on a row in a datagrid
How can I search a datagrid for a column and set focus to a found row so that the row appears at the top of the grid? I appreciate any help...

datagrid, datagrid, datagrid help
hello everyone, why is this datagrid so confusing and tough to get right...is it really confusing or am i not getting it right...need immediate assistance....i am currently working on developing an email application. and i want to display the mails in a datagrid. so i have an aspx page called mailbox.aspx. and a menu consisting of Inbox, Sent mail, Starred, Trash and Compose .... on page_load i am able to assign the values to a data grid by hardcoding them. and i want to use the same datagrid for displaying the mails sent by the user or the starred mails of the user. and this needs dyn...

Datagrid into Datagrid
There is a datagrid(DG_B) into a datagrid(DG_A) When i click on Edit Columnfrom DG_B I get an error Object not foundHow do i make a reference into protected void DG_B_EditCommand(object source, DataGridCommandEventArgs e) to this DG_B ? What I've tried(but still not working): DG_B = ((DataGrid)e.Item.Cells[10].Controls[0]);DG_B = (DataGrid)e.Item.FindControl("DG_B");Best regards,Ivan Andrade The "source" parameter passed into your event handler should conatin a reference to your DataGrid. Simply cast it to the DataGrid type.Thanks, EdMicrosoft MVP - ASP/ASP.NET...

Datagrid in a Datagrid
I would like to place a datagrid in another datagrid based off the results of the datagrid I dont know if this would be possible but i will give you a basic idea of what i would like I have in the main datagrid the description of a computer and the image and price, in the other datagrid (or someother way) that is in the first datagrid i would like to list upgrade options specific to that computer. I have the table that relates to the description and price table but i dont know how to use the main datagrid as the trigger for which upgrades go to which computer...

Datagrid in Datagrid
Hi, I'm trying to create a webpage that can handle datagrid in datagrid. I have an aspx file and a web user control file. When I click the edit button in the webpage, a new web user control will be added to the webpage. This is done through code-behind method. This new datagrid must be able to do edit, update and cancel. But, the webpage can't catch the events of the second datagrid. By the way, the web user control is working fine except in the "datagrid in datagrid". Any idea how to fix this? Please feel free to ask if you need more detail. Thank you....

Multiple Selection of rows in a Web forms datagrid
Hello, I have a Web forms datagrid which displays more than 1000 rows, each row identified by an ID. Is it possible to multi select some of the rows? I would like to drag the mouse and select some of the rows and leave some and once again start selecting some of them and when I click the button below that grid, I should be able to remember those ID's for my next step. I know that I can do it using the check box option. I can also do that using a mouse click event. But I am wondering whether there is an option to drag the mouse and select the rows? Can I write some javascript ...

How to access datagrid on a web form from user control
I have a web page named itemList.aspx. It contains a datagrid (id = datagrid1). The web form also have a user control named itemSearch.ascx. This user control have several options to search and a submit button. I want to change the datasource property of datagrid1 on the click of submit button. As the datagrid1 is on the itemList.aspx page and the submit button is on the user control, I connot access the datagrid directly. Is there any way to acess it from the .vb file of user control?Yanesh TyagiASP.Net GeekWebsite | Please 'Mark As Answer' if this helps you....

Controlling tab and setting focus in a web form
Hi, How do I set the focus for a particular text box when a page is loaded? In a windows form there is a property called focus. But I can't find that in a web form. Also how do I use the tab property? Thanks in advance, Rushdi You can use my free FirstFocus control to set the focus to your textbox. I put this in the body tag. I placed it at the beginning onload="document.all('tbUserName').focus(); where tbUserName is my textbox works for me. There are couple issues with that script. 1) It's IE only. document.all is a MS specific object. b) tbUserName is the ...

datagrid inherited control with datagrid
Hi, I want a control which has all the features of the datagrid control. So I Inherit from the datagrid control and get all the features. But now I also want to add two buttons with the same control. How can I do that ? Since the my control is inherited from datagrid and not from webControl class. Thanks,HighOnCodingWanna get high! ...

DataGrid and Controls within DataGrid
Ok, so I am totally beat  .  Noone was able to reply to my last topic regarding the complications I was running into with creating a DataGrid programmatically. (If curious, please find the last thread I created).  This is what I need to do: Page loads values into dropdownlist.  User selects a grade from this ddl.  Code takes value, queries the db, stores result in a datatable, dt.  Cool.  Now we bind data from this dt to the DataGrid, dgDataGrid.  The two items the db returns are 'Item Name' and 'Quantity'.  Please keep in mind ...

How do you edit a datagrid row, but not in the datagrid?
I'm using a Datagrid to display links from an Access database. The URL is incorporated in to the displayed link, of course. But I would like to click an edit button and have an edit form appear beside the datagrid columns, for that row only, allowing me to edit everything, including the URL, instead of editing directly in the datagrid. I would also like the ability to add new rows from the form. Can anyone tell me how to do this? Thanks, Gary I should have added that I'd like the edit form to appear only when the edit button is clicked... G. <asp:DataGrid id="D...

Datagrid not refreshing in Parent web control even after re-binding from Child web control?
Hello .....,               I have dropped a web user control (B) in one my web user control (A). Now (A) contains control (B). After proving some data in (B) to be binded to the DataGrid control used in (A), I call the DataBind. When debugging the Items, the Count property shows the number of Items correctly, but the datagrid doesn't seems to have rendered the updated datagrid content. Please help me out of this problemThanx and Regards,Hemant...

Web resources about - how to set focus on a row of a dataGrid from outside the datagrid control. - asp.net.web-forms

Want to preview our new DataGrid for Xamarin.Forms?
tl;dr Zumero.DataGrid is a Xamarin.Forms control for displaying data in rows and columns. If you would be interested in testing and previewing ...

Mad King DataGrid
This post is about scrolling in WPF and the egocentric DataGrid control. I’ll give the project background but if all you’re interested in is ...

Stack Overflow
Stack Exchange log in - careers - chat - meta - about - faq Questions Tags Users Badges Unanswered Ask Question Top Questions interesting 295 ...

Microsoft Silverlight - Wikipedia, the free encyclopedia
Microsoft Silverlight is an application framework for writing and running rich Internet applications , with features and purposes similar to ...

Flash Builder Plug-in for SAP Netweaver Gateway - Adobe Labs
Search Navigation Labs Home Wiki Home Technologies Alchemy Blueprint Camera Profiles and DNG Profile Editor Cirrus ColdFusion 10 DNG Codec Fireworks ...

Casaba Security » Products » X5s Testing Tool For Finding XSS Vulnerabilities
Security analysis, consulting, development and testing partners who understand your business strategy.

CodeGuru - Microsoft developers related ideas, articles, tips, tricks, comments, downloads, and so much ...
CodeGuru is where developers can come to share ideas, articles, questions, answers, tips, tricks, comments, downloads, and so much more related ...

Caliburn Micro: WPF, Silverlight, WP7 and WinRT/Metro made easy.
A small, yet powerful framework designed for WPF, Silverlight and WP7. It implements a variety of UI patterns for solving real-world problems. ...

Quick Answers - CodeProject
Questions - Free source code and tutorials for Software developers and Architects.; Updated: 11 Jul 2012

license-discuss@opensource.org: 11636: first draft of license proliferation committee report
FYI,the first draft report of the OSI's License Proliferation Committee.To join the OSI's license proliferation discuss email list, send anemail ...

Resources last updated: 1/11/2016 8:27:36 PM