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

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

WPF datagrid Tab Navigation problem not following tab index order

Posted By:      Posted Date: October 28, 2010    Points: 0   Category :WPF


I have designed a wpf page. But I not able to set Proper Tab Navigation on it. Controls (Specialy datagrid) on the page are not following tab index. 

It has a group box inside which there is a grid. this grid has rows and columns. In first three rows contains textboxes. 4th row contains  the datagrid forth row spans to 5 cols. in next row it agains has textbox and after that it has 3 buttons

Following is the design view, Run time view with tabindex which I have given to them and arrows show the index they are following.

I am loading datagrid with a object of list of items which has one object of type item. so as per my thinking it is not empty it has data in it. as you can see in run time view

View Complete Post

More Related Resource Links

WPF datagrid Tab Navigation problem not following tab index order



I have designed a wpf page with 3 textbox than a datagrid than again a text box

and I have set the tabindex to first 3 testbox 1, 2, 3, than 4 to datagrid and 5 to last testbox

But when I run page and press tab to navigate,first three textbox are ok they follow tabindex but when I tab to navigate to datagrid it jumps to forth textbox and again on next tab go to datagrid. means after navigating all of the four textbox its go to girdview.

Please tell me how I can set tab order?

SharePoint Calendar Error: The "ListViewWebPart" Web Part appears to be causing a problem. Index was

In one specific SharePoint calendar, on one specific week in that calendar when we select the "more items" link in the monthly view (or the expand all option) we get the following error:
The "ListViewWebPart" Web Part appears to be causing a problem. Index was outside the bounds of the array.

Web Parts Maintenance Page: If you have permission, you can use this page to temporarily close Web Parts or remove personal settings. For more information, contact your site administrator.
Troubleshoot issues with Windows SharePoint Services.

If we select a different week the expand and collapse works fine in that calendar.

What is the meaning of Ascending\descending sort order of a column within an index

When I add a new index I can also specify the "sort order" as ascending or descending. What does it mean? does it affect performance? does it mean that the binary search tree will be set in a certain way?

Problem with Global Navigation Excludes in VS workflow

Hi All I need help for WSS Global Navigation problem. I have one Visual Studio Workflow. In that I written following code. string globalNavExcludes = String.Empty; SPWeb webSite = MSDNSiteCollection.RootWeb; // _GlobalNavigationExcludes property contains a delimited string of  // GUIDs identifying the Id of each site to be excluded from global // navigation   if (webSite.AllProperties.ContainsKey("__GlobalNavigationExcludes")) {   globalNavExcludes =      webSite.AllProperties["__GlobalNavigationExcludes"].ToString(); }   SPWeb newsSite = MSDNSiteCollection.AllWebs["News"]; // string is delimited "{GUID};{GUID};", // use format code B to convert to string globalNavExcludes += String.Concat(ParentWeb.ID.ToString("B"), ";");   webSite.AllProperties["__GlobalNavigationExcludes"] = globalNavExcludes; webSite.Update(); After run this code workflow, I loss my Home from Navigation. Now I was unable to open my application. It is giving "Error" on the top Navigation in place of Home. Error is: "An error occured while rendering navigation for requested URL: .........url of my workflow site.......Exception Message: An Item with the same Key has already been added. Stack Trace : at System.Throwhelper.ThrowArgumentException(ExceptionResour

SQL Insert with Index Scan Problem....

Hi,   I'm having a very strange problem when inserting rows into a table. Let me try to explain a little better: Table1 (for example Book) with a lot of fields and one foreign key to Table2 (idVolume) and a primary key (identity - idBook). This table has a clustered index only on the primary Key. (this table has something like 10 Millions rows) Table2 (for example Volume) with a lot of fields and a primary key (idVolume) identity. (this table has hundreds of rows)   Now, the problem starts when I make a insertion on Table2. When I made an insertion, it was taking minutes to finish, so I stopped it. After looking into the execution plan of the query, there was something very very strange, there seems to be a clustered index scan on Table1... the problem is that since Table1 has so many rows, this index scan takes forever... Can anyone explain me why does the insertion on Table2 makes an clustered index scan on Table1? It really doesn't make any sense to me.   Thanks in advance. João Teixeira

problem with datagrid

I am trying to create datagrids dynamically using Datagrid Array.But I am getting exception while setting Datasource.  Do anybody have the solution for this? Code  using(SqlDataAdapter da =new SqlDataAdapter(cmd1))      {       DataSet ds =new DataSet();       da.Fill(ds);              for(int i=ds.Tables.Count;i >=1;i--)       {        int j=ds.Tables.Count;        DataGrid[] dgd=new DataGrid[i];        DataGrid DataGrid[i]= new DataGrid();        DataView dv1=new DataView(ds.Tables[i-1]);        dgd[i].DataSource=dv1;//    Exception        dgd[i].DataBind();        plh1.Controls.Add(dgd[i]);       }      } 

Reorganize index order

Hi experts, If a table has mulptiple indexes (cluster and NCluster index), which index should be reorganized first? I know if you want to rebuild index, you want to start with Cluster index and then do the rest (NC index) Regards

Index droping problem in SSIS package?

Hi All, I have one ssis package. After load the staging data I am creating index in one column. I am dropping the index end of package. But sometimes after create the index if I got any error I need to re run the package, already index is created so that’s why  once again I will get a error. So that purpose drop index statement I used before create index sqltask.If the first time package runs the table don’t have index. If the table have index it will drop the index otherwise it will skip that task. I used below code. But I am getting the error index is not dropped properly. IF EXISTS (SELECT name FROM sys.indexes WHERE name =   N'IND1_TRAN_DT ')  DROP INDEX  IND1_TRAN_DT  ON SLS_STNT_DTL_STGNG;   Thanks CMK

DataGrid cells ImageUrl properties problem

At the outset i would like to welcome all as this is my first post on this forum :) probably i've got a simple problem for most of you, namly:   I want to dynamically replace ImageUrl into DadaGrid cell. I've already prepare a right type of field (Image Field) and this is my code:   Private Sub GridView1_RowDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GridView1.RowDataBound If e.Row.RowType = DataControlRowType.DataRow Then If e.Row.Cells(3).Text = "1" Then e.Row.Cells(3).Text = "Online" DirectCast(e.Row.Cells(4).Controls(0), Image).ImageUrl = "~/Css/green.png" 'e.Row.Cells(9).ForeColor = System.Drawing.ColorTranslator.FromHtml("#489A38") 'e.Row.ForeColor = System.Drawing.Color.LightGray Else e.Row.Cells(3).Text = "Offline" DirectCast(e.Row.Cells(4).Controls(1), Image).ImageUrl = "~/Css/red.png" End If End If End Sub And i.ve got this error: Specified argument was out of the range of valid values.Parameter name: index Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and whe

Top navigation menu render problem

Hi, we have a problem with top menu used in a sharepoint site. There is a main site and one subsite wich inherits navigation from the parent. When we are viewing the main site top menu renders ok. When we are viewing child site, with some computers and browsers (not all) instead of the name of the parent site it apears the link. Name of the main site is 'Activity' Name of the subsite is 'Programs' Problem Accesing main site menu renders like ->    Activity  |   Programs Accesing child site menu renders like ->     sites/activity  |   Programs I have uploaded some image to clarify http://yfrog.com/jltopmenurendererrorp   At the master page the top menu is set in this way     <PublishingNavigation:PortalSiteMapDataSource ID="topSiteMap" runat="server" EnableViewState="false" SiteMapProvider="CombinedNavSiteMapProvider" StartFromCurrentNode="true" StartingNodeOffset="0" ShowStartingNode="true" TrimNonCurrentTypes="Heading" /> <SharePoint:AspMenu ID="TopNavigationMenuV42" Runat="server" EnableViewState="false" DataSourceID="topSiteMap" AccessKey="<%$Resources:wss,navigation_accesskey%>" UseSimpleRendering="true" U

sharepoint permission problem in navigation


I had created a site in sharepoint 2007 I have full access as will as I am site collection administrator. But i dident find the navigation settings from site action => site settings=>modification

I can see only 3 options Create,editpage,site settings. What can I do please help.

remote server problem ; index file cant find my layouts


hi !

i finally managed to finish my first dynamic application with Webmatrix and razor , everything works well locally.

But there are issues online.

i got an index file and a layout file.



in the index file , i've got the following code :

LayoutPage = Href("~/layouts/_layout.cshtml");

when i call the index page with


everything works

but when i try

http://mysite.com/test (without the / at the end )

the server throws this :

Server Error in '/test' Application.

The specified layout page 'test/layouts/_layout.cshtml' could not be found. The following paths have been used: ~/test/layouts/_layout.cshtml;~/Shared/test/layouts/_layout.cshtml;

it seems it cant find the layout file.

any suggestions ?

Problem with language pack and navigation to pages



We have installed the Norwegian language pack for Sharepoint 2010 RTM, as explained in this technet article: http://technet.microsoft.com/en-us/library/cc262108.aspx

Everything seemed to be working as excepted, except for some page navigation which is not using the correct language files. We are registerring some web parts in the onet.xml, and the code below are causing some problems.  

 <Module Name="MyWebpart" Url="$Resources:osrvcore,List_Pages_UrlName;" Path="">

 The "$Resources:osrvcore, List_Pages_UrlName" retrieves 'Pages' from cmscore.resx. The problem is that the Norwegian translation for the List_Pages_UrlName is located in the cmscore.nb-NO.resx. Do I have to replace the original cmscore.resx with the language specific version? I thought Sharepoint would handle this for me. Or is there some step I have missed?


Binding execution order problem?



I'm developing DataGridTreeViewItem custom control which task is to display some icon and title. This control should be placed in TemplateColumn of wpf DataGrid.

Here is the code:

<wpfToolkit:DataGridTemplateColumn Header="Entire Network" Width="Auto" MinWidth="200">

Persist sort order in datagrid



I've got multiple datagrids in the application I'm currently working on. Their ItemSource can be updated with new content on server notifications. When this happens, the ItemSource is being replaced by a new one (would it be better to update the content of the ItemSource - which is much more complicated for this case of figure - instead of binding a new one?)

When the new ItemSource is being bound, the sorting of the grid is being lost. I've solved this behaviour by saving the sorting before setting the new binding and restoring it after the new binding has been done. Below you'll find the static methods used for that:

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Windows.Controls;
using System.Windows.Data;
using Telecontrol.SIPPR.Client.Commons.DataObjects;

namespace Telecontrol.SIPPR.Client.Commons.Utils
  public static class DataGridUtil

Datagrid CellStyle vertical align problem


Im using the WPF toolkit when I set a textcolum cell style to align the text to the center vertically it becomes very hard to select the text

without the cellstyle I can just click anywhere in the cell and begin editing the text in there, but with the cellstyle you have a very limited area in the cell where you can select the text field

does anyone have any way to fix this?

                      <Style TargetType="{x:Type dg:DataGridCell}">
                          <Setter Property="VerticalAlignment" Value="Center"></Setter>

Key-Navigation with Wpf Toolkit DataGrid


Hello everybody

I d'like to navigate in the wpf datagrid with keys. That means, if i press B, it should navigate to the first entry, which contains a B in the first column (or better in the column, that is first sorted by). And if I type an I afterwards, it should navigate to the first entry containing BI and so on..
I don't think that the DataGrid gives an implemented solution...?
Does anyone has an idea?

Thanks for your help!

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