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


Top 5 Contributors of the Month
Jean Paul
SP
satyapriyanayak
ASPEvil
Ashutosh Jha
Post New Web Links

load TreeView data dynamically from differeny sources in WPF

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

This is regd treeview control in WPF.
My treeview should look like this
xxx
  1
  2
  3
YYY
  9
  8
  7

Here xxx and yyy(parent nodes) comes from XMl file and the 1,2,3(Child Nodes) comes from a different source and 9,8,7(Child Nodes) comes from other different source.
Here the problem is how to load treeview from different sources dynamically.
Can anyone guide me how to acheive it.
Thanks,




View Complete Post


More Related Resource Links

JQuery Treeview plugin is not working with Ajax page load in ie8

  

Hi there,

I developed a page where i m using jquery treeview plugin to generate tree. It worked fine on FF, IE8 with out ajax.

But when my page loads thro' ajax call in IE8, it is not collapsing or expanding tree.


Any idea?

Thanks in advance.



huge number of data from database ... so how to minimize load time

  


Hi ...

I have used the above method to configure my crystal report ...

Its working fine , But i have huge number of data in database ....

So , it take long time to load the report ...

So , i have decided to show only the last 50 records inserted into the database , not all the 500 records to be loaded every time.

Plz help me with this issue  ...

 

Also , Plz explain me abt index legend in crystal report.


Persist data in a dynamically populated ListBox in a user control

  

Hi All,

I am trying to persist data in a dynamically populated ListBox in a user control. Here are the details

I have a user control which contains a a listBox and button. On Page_Load of user control I am populating the ListBox control with some values. On Click of button, I am trying to fetch the values which I have selected in ListBox. Though this seems very simple and straight forward I am unable to fetch values.

My Page_Load Function

void Page_Load(object sender, EventArgs e)

{

       If(!IspostBack)

        {

              listBox.items.Add("Item1");

             listBox.items.Add("item2");

             listBox.items.Add("item3");

         }

}

 

My Click Function

Protected Void Button1_Click(object sender, EventArgs e)

{

       string strValue = listBox.SelectedValue

}

 

I have placed brake point at Page_Load and on click function, I am seeing that the moment the breakpoin

Data: More Load, Less Code with the Data Enhancements of ASP.NET 2.0

  

A data source control is a server control that wraps some basic functions of a data source - be it a SQL Server database, an XML document, an Excel worksheet, or a sitemap description. Through the services of a similar component, data-bound controls can fetch data as well as insert new records or update and delete existing ones. Data source controls enable a consistent model across a variety of data sources and dramatically reduce the amount of code needed to implement a two-way data-binding scenario. This article provides an introduction to data source controls and other related data binding features.

Dino Esposito

MSDN Magazine June 2004


.NET Reflection: Dynamically Bind Your Data Layer to Stored Procedures and SQL Commands Using .NET M

  

One major inconvenience of using SQL stored procedures from code is having to match type information. You have to write long wrapper functions around the procedures just to expose the data types. In the .NET Framework, however, the reflection services of the System.Reflection namespace allow you to query rich metadata that describe data types. This article explains how to use reflection in .NET to end your stored procedure nightmares. The author creates four custom classes, including one that generates a SQLCommand object based on the metadata of a method. Using this library, you'll be on your way to automating the generation of stored procedures.

Atif Aziz

MSDN Magazine August 2002


Dynamically load user control without postback

  

Hi all,

I need urgent help. (c#coding)

In my base page, I have a dropdownlist control which loads different usercontrols on selectedindexchanged event.

While loading these usercontrols, my page postbacks all the page. I used updatepanel but again same problem.

Is there any way to load controls without postback? I Really need help as soon as possible.

Here is my code:

protected void Page_Init(object sender, EventArgs e)
    {
        if (Session["control"] != null)
        {
            string c = Session["control"].ToString();
            if (c == "1")
            {
                iuc = (IlkogretimUC)LoadControl("~/Controls/Ilkogretim.ascx");
                dl.SelectedValue = Session["control"].ToString();
                ph.Controls.Add(iuc);
                //UpdatePanel2.ContentTemplateContainer.Controls.Add(iuc);
            }
            else if (c == "2")
            {
                luc = (LiseUC)LoadControl("~/Controls/LiseUC.ascx");
                dl.SelectedValue = Session["control"].ToString();
                ph.Controls.Add(luc);
            }
            else if (c == "3")
            {
                youc = (YuksekokulUC)LoadControl("~/Controls/Yuksekokul.ascx");
                dl.S

How to load a DLL Dynamically in c#

  

I have one application, where based on some functionality i need to load and unload dll's. For Example, if the user wants to perform some normal arithmetic operations then the application has to load Arithmetic.dll. If the user try to perform some trigonometric calculations then we will load trigonometric.dll. And these dll's can be updated at any point time. My application is running as a background process.

 

My problem here is, I am able to load DLL's but i am unable to unload them while my application is running.

I have tried Assembly.Load . It's working fine.Even i am able to unload also.  But i an unable to use serialization functionality.

Then I have tried Assembly.LoadFile . Only Loading  of DLL and Serialization is working properly. But i ma unable to unload it.

 

Please anybody help me to fix this issue or please give me thoughts on it.

 

Thanks in advance.


How do you create an association between two different data sources in BDC web parts?

  

Hi,

I have a SQL Server database with the customer details and an authenticated web service providing contact details of the selected customer.  How do i connect them using web part connections to retrieve and display the data.

Or is it possible to create a Primary key-Foreign Key relationship between two tables in different databases with a common column?

Thanks

Senthil


wss2.0 Infopath 2007 'This form requires connections to data sources when it is loaded. At least on

  

Hi all

I have a user who receives the error 'This form requires connections to data sources when it is loaded. At least one of these connections is not available. As specified by the form designer, this form will not open' when trying to Submit an infopath form located on a WSS2.0 site.

The user has been having this issue since upgrading to Office 2007 and IE7. I have had the user run an Office Diagnostics but this has not resolved the issue.

I am not aware of any other users experiencing this issue.

Any ideas please?


Ajax Accordion to load data from client click event

  

I have a Ajax Accordion control on my page with treeview in Content Template. As the treeview for each pane are big. I am wondering whether I can load the treeview from codebehind only after the pane is selected. I can reuse the code from ItemDataBound of Accordion control.


asp.net VS-2005 Website Data Sources is empty

  

Hi,

When I create a rdlc file(Report) the dialog box : "Website Data Sources" is empty, I can add a typed dataset, but the buisness objects (Classes) I created sometime disappear and sometime shown,

When I click/ remove some references it show and hide.

I would really appriciate some help,

thanks in advance,

BTW

I followed:

http://msdn.microsoft.com/en-us/library/ms251692(VS.80).aspx

It works fine but after a while, it disappears again.

I tried it on several computers(which means it's not a problem of my machine), and tried it on several projects, all behave the same.

Dani.


Using the single *.rpt file with multiple data sources

  

I've created a set of CrystalReports (*.rpt files) for an ASP.NET web app on a development server. I call each report using the following code:

protected void BTN_RunReport_Click(object sender, ImageClickEventArgs e)
{
CrystalReportViewer_ClientLetter.Visible = true;

ConnectionInfo con = new ConnectionInfo();
con.ServerName = Constants.ServerIP;
con.DatabaseName = Constants.DatabaseName;
con.UserID = Constants.UserID;
con.Password = Constants.Password;

CrystalReportViewer_ClientLetter.ReportSource = Server.MapPath(Constants.ClientLetters);
ParameterFields parameter = CrystalReportViewer_ClientLetter.ParameterFieldInfo;
ParameterField batchdate = new ParameterField();
batchdate.Name = "@BatchDate";
ParameterDiscreteValue batchdate_value = new ParameterDiscreteValue();
batchdate_value.Value = Convert.ToDateTime(txtBatchDate.Text);
batchdate.CurrentValues.Add(batchdate_value);
parameter.Add(batchdate);

foreach (TableLogOnInfo tlf in CrystalReportViewer_ClientLetter.LogOnInfo)
{
tlf.ConnectionInfo = con;

How can i add a textbox into a GridView Cell dynamically and how can i retrieve entred data

  
Hey, i think that the the subject can explain what i need, it's about adding a TextBox control with the code behind into a GridView, and also about how can i retrieve entered data after submitting, im using C#,Thanks.

System.Data.SqlClient.SqlException: Bulk load data was expected but not sent

  
Hi everyone We've had this error twice now from our C# code. Nothing is changing the columns, but I've noticed though that it appears to happen when two threads are attempting to bulk insert into the same table, generally millions of rows. The docs say that SqlBulkCopy.WriteToServer is not guaranteed to be thread-safe, but is this the problem here? It feels like it. I've seen some posts where people appeared to have experienced problems in similar circumstances (http://social.msdn.microsoft.com/forums/en-US/sqldatabaseengine/thread/85d51484-6381-46bc-bcce-63b58b362d2d). There is no identity column just a non-unique clustered index that is (spid) process keyed to each thread. Do I need to synchronise access to the table for WriteToServer - is this a known problem? Many thanks Reg --- System.Data.SqlClient. SqlException: Insert bulk failed due to a schema change of the target table.   at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)   at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)   at System.Data.SqlClient.SqlBulkCopy.WriteToServerInternal()   at System.Data.SqlClient.SqlBulkCo
Categories: 
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