.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

Split Container Tab Order Issue

Posted By:      Posted Date: October 21, 2010    Points: 0   Category :Windows Application


  I have a split container on my form with a MonthCalendar control in Panel1 on the left, tab order 1.0.0 and a Datagridview control in Panel2 on the right, tab order 1.1.0.  When the form opens I want the focus to be on the first visible cell of the Datagridview, but I am unable to change the tab order of the split container panels.

I've tried adding Datagridview.Select or Datagridview.Rows(0).Selected = True to the Form_Load event, but once it runs through all the code & events after it still seems to put the focus back to the MonthCalendar.

View Complete Post

More Related Resource Links

WPF Threading issue with Win32 Container

We are trying to integrate existing WPF window on to Win32 container application. The win32 application can integrate and show only Winforms Usercontrols. Since we already have a running WPF window code, we used windows forms usercontrol , element host and the content presenter of the window inside the element host to show in winforms usercontrol.The WPF window code overrides the function protected virtual void OnInitialized(EventArgs e) and calls first base.OnInitialized and then the custom code. The issue is here is that you can run the below code for the first instance from win32 container , but second instance when we execute same code , it  throws the error "The calling thread cannot access this object because a different thread owns it." from the line  base.OnInitialized when initializing AutoUpdate window = new Autoupdate(); Even if we use the below code under dispatcher it throws the same error after the firstime.            ElementHost elementHost = new ElementHost();                         elementHost.Dock = DockStyle.None;                         element

Order by property issue



I have a dimension called DimLocation which has this strucutre





I want to arrange the State members using the OrderBy property, if I select the Value  AttributeName and then try to precise the attribute according to which attribute members would be ordered using the next property OrderByAttribute then I didn't find any corresponding attributes in the OrderByAttribute drop own list, I tried to specify this by direct writing the name of the attribute on the property cell but it won't work if I hover the given attribute in the attributes zone (next to the hierarchy zone) a  tooltip tells me "The ordering criteria is set to 'Attribute Name', but the ordering attribute is not set "

The complexity resides in the simplicity

perfomance issue with 'order by' clause



  I have copied 2 queries and their execution plans below.first one taking long time to execute and the second one finishes with in a second.can u guys pls explain what is happening inside sql server engine.


--first part

select   se.eventdate
haregistration r inner join
screening_event_slot ses

on r.ScreeningSlotID=ses.SlotId
inner join screening_event se
on se.eventid=ses.eventid  order by EventDate

 |--Nested Loops(Inner Join, WHERE:([microsoft].[dbo].[HARegistration].[ScreeningSlotID] as [r].[ScreeningSlotID]=[microsoft].[dbo].[screening_event_slot].[SlotId] as [ses].[SlotId]))
       |--Nested Loops(Inner Join, OUTER REFERENCES:([se].[EventId], [Expr1006]) WITH ORDERED PREFETCH)
       |    |--Index Scan(OBJECT:([microsoft].[dbo].[screening_event].[IX_EventDate] AS [se]), ORDERED FORWARD)
       |    |--Index Seek(OBJECT:([microsoft].[dbo].[screening_event_slot].[AK_screening_event_slot] AS [ses]), SEEK:([ses].[EventId]=[microsoft].[dbo].[screening_event].[EventId] as [se].[EventId]) ORDERED FORWARD)
       |--Clustered Index Scan(OBJECT:([microsoft].[dbo].[HARegistration].[PK_HAR

Issue with top and order by


I have two different queries in which the only difference is the order by clause. There result set is empty (no records returned). Query 1 runs completes immediately, but Query 2 take 1:06 to complete. Any ideas on why adding the order by clause results in this type of performance penalty?

Thanks, Mike



select cp.* 

from tblcourseregistration cr 

inner join tblcourseposition cp on cr.sitememberid = 77434 and cr.courseregistrationid = cp.courseregistrationid 

order by cp.coursepositionid desc



select top 1 cp.* 

from tblcourseregistration cr 

inner join tblcourseposition cp on cr.sitememberid = 77434 and cr.courseregistrationid = cp.courseregistrationid 

order by cp.coursepositionid desc

Linq to Sql CompiledQuery container

Ok now let's go. Here is just a little trick but with some interesting patterns that could be useful in some other contexts not connected to Linq to Sql.

When using Linq expressions, like with Linq to Sql, translating the expression into something else (sql for example) is taking time and resources. Sometimes it's negligible, sometimes not...

Using Conditional Split data Transfer in SSIS 2008

This article uses the Integration Services Conditional Split Data Transformation element to filter and transfer data from a set of flat text files to SQL Server database table. The concept can be easily extended to apply to any other source or destination such as Microsoft Excel. This scenario is useful in creating denormalized database tables in a reporting and analysis situation.

Split Name In SQL Server

One common task performed in database applications is given a full name, how can this be split into the first name and last name. In this article, three different methods are discussed to perform this task using three different functions in SQL Server. It is assumed in this article that the full name is just made up of one first name and one last name.

IsapiModule Error 500 Issue


I am about exhausted trying to figure out this error:

HTTP Error 500.0 - Internal Server Error

Description: The page cannot be displayed because an internal server error has occurred.

Error Code: 0x8007007b

Notification: ExecuteRequestHandler

Module: IsapiModule

Requested URL: http://localhost:80/ReportServer

Physical Path: c:\Program Files\Microsoft SQL Server\MSSQL.2\Reporting Services\ReportServer

When I enable Failed Request Tracing Rules and view the log output I am supposing that the actual problem is in the 2nd call where there are 2 backslashes before the actual filename in the specified path:


CALL_ISAPI_EXTENSION DllName="C:\Windows\Microsoft.NET\Framework\v2.0.50727\\aspnet_isapi.dll"


MVC2 issue - Stuck. Trying to create a cms with nested partials


I am currently trying to display multiple items on a single page. I am not sure as to how to tackle this. What I have is a database table that has all the page data in. I have this run as a PagesController and this works fine. However what I would like to do is, if say the Products page is selected via the menu, I want to pull back not only the Products page html but also get all the products, and even be able to pull them through via category. I was trying to use a partial view, but I can't get it to work. The same would be for other pages, having partial views to display the other content, ie if Gallery is selected, the page html for Gallery shows and it then can push to a partial view that pulls all the gallery images from the gallery db table and so on. 

Maybe I am tackling this the wrong way. I have the pages stored in the db to allow for a CMS system I have setup. Maybe I need to use models for all the other items(Products, Gallery, Videos and such) and use the partial for the page html?

Any help would be greatly appreciated as I am confused.

Tab container rendered with visibility:hidden - This was reported over three years ago.



Here is (more) code that demonstrates the issue.  If the control in the host page is removed the tab control renders correctly.  Otherwise it is rendered with the visibility attrubute set to hidden as reported in the above link.  Is this broken or am I doing something wrong?



<%@ Page Language="C#" AutoEventWireup="true" CodeFile="S2.aspx.cs" Inherits="S2" %>
<%@ Register Src="~/SelectorPatternControl.ascx" TagName="TestControl" TagPrefix="sam" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <form id="form1" runat="server">
        <cc1:ToolkitScriptManager ID="ScriptManager1" runat="server" EnablePageMethods="true"></cc1:ToolkitScriptManager>

split with javascript



i have this garbache value %B463822546831472^MILIN JONE/OBAMA         ^1308226223780000731000000?;E?

now i wana slit with javascript and show on my aspx page like this(bold words)




How can i split with java script.plz help in this issue

Re-positioning an HTML container with javascript onresize with a Master page.


I have an HTML <div> container that I float to the right of a gridview.  When the browser window is maximized, it looks fine.  When minimized, the gridview positions below the floating container and most of the data is pushed off the bottom of the browser - you have to scroll down to see it.

If I position the floating container above the gridview it looks fine in a minimized window, but looks real bad when maximized.

What I want to do is use a javascript: onresize event to re-position the floating container up or down depending on the window.inner.width AND do it with a Master/Content page structure AND do it for only the one page where needed.

I can capture the onresize event and display the window dimensions but haven't figured-out how to do it with a Content page that still uses the Master page.  I think I'm having a very "thick" week...

- Tinker




Is it possible with SQL sorted in descending order according to the word?
In Table I shrajeno Mastercard, Visa, Diners etc ...

All Visa are the first in the order, another Mastercard, etc. ...

Something does not work: ORDER BY PaymentType = 'Visa';

I would not want to work in one field PaymentId (111,222,33, etc. ..) and then use the ORDER BY.

Is this possible in such a way?

Linq qry with order by basic questions


I have never tried a group by with linq, now I do and I'm stuck.

I try to convert this sql statement to its linq counterpart :

SELECT COUNT(tb_Mailer_Smses.Id) AS [cnt], tb_Mailer_mailing.Id As [Id]
,SUM( CASE WHEN tb_Mailer_smses.DLRStatus = 200 THEN 1 ELSE 0 END) As [Delivered]
FROM tb_Mailer_mailing INNER JOIN
tb_Mailer_Smses ON tb_Mailer_mailing.Id = tb_Mailer_Smses.MailingId
WHERE tb_Mailer_mailing.ApplicationId = 1
GROUP BY tb_Mailer_mailing.Id

Is there some one who can me show me the convertion process ?

xpath issue


Hi i am using xpath to loop through each node,

the xml is below i can get the value of "link" but i cant get the thumbnail value, have you got any ideas how i can do this, my code is below.



     <link>test 1</link>
     <media:thumbnail url="http://test.com/image.jpg" height="75" width="75" />



     <link>test 2</link>
     <media:thumbnail url="http://test.com/image.jpg" height="75" width="75" />


public void FindLinks(XPathNavigator p_xPathNav, DataTable dt)
            //run the XPath query
            XPathNodeIterator xPathIt = p_xPathNav.Select("//item");

            //use the

User validation Issue in xlsx file



I am validating user from Login.xlsx file. It was working fine by validating email and password from that file. For testing i got new file same contents of file but added some more user names.

So after that when i validating the user i am getting the following error "Data type mismatch in criteria expression".

But when i replaced the new to old one it is working fine. The contens of both files are the same. So why this kind of error happened.


Multiple Paramatized Threading issue


I need the funcitonality to have two methods run concurrently of each other and the parent thread (aka the method that makes these two calls) to halt until BOTH are done. After the threads are done, I need to perform logic on the returns of the method, so it is essential for both of them to be complete before the parent thread continues. I have searched the internet and tried varous attacks, and I always come up with the same result, this being the parent thread continues operation after the first thread finishes, leaving the second thread running.  Can someone show me a quick example of how I can do this. I have tried checking states of the threads, halting the threads, but I always end up with the same thing. Any help would be great. Thanks.

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