• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 192
  • Last Modified:

HyperLinkColumn tab stop

Hello,
I have a datagrind column that contains a hyperlink column and a template column that is a text box for quantity.  Is there anyway to set the tab stop to false for the hyperlink column so when the user hits tab, it goes to the next text box?
Thanks
Chad
0
ChadMarsh
Asked:
ChadMarsh
1 Solution
 
tusharashahCommented:
In ItemDataBound Event of your DataGrid write down some code like following:

---------------------------------------------------------------------------------------------------------
private void DataGrid1_ItemDataBound(object sender, System.Web.UI.WebControls.DataGridItemEventArgs e)
{
      switch( e.Item.ItemType )
      {
            case ListItemType.Item:
            case ListItemType.AlternatingItem:
                  ( (HyperLink) e.Item.Cells[5].Controls[0] ).TabIndex = -1;                              
                  // Replace 5 with Column Number of your HyperLink Column..
            break;
      }
}
---------------------------------------------------------------------------------------------------------

-tushar
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now