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


Post New Web Links

how do I match the hover effect in the property grid?

Posted By:      Posted Date: December 04, 2010    Points: 0   Category :Windows Application
 

I made a custom editor for FontFamily shown below. It works fine, but I notice that the standard value editors in the property grid don't show the combo box until I move the mouse over the grid cell. (There may even be some fade-in animation on it?) How do I modify this code to make the combo box only show up on IsMouseOver and just show it's item template otherwise?

I tried using reflection to find the PropertyValueEditor (and its template) that is used for the default value list in the WF4 property grid, but I couldn't find it. Where is it?

using System.Activities.Presentation.PropertyEditing;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Media;

namespace Client.Wpf.PropertyValueEditors
{
	public class FontFamilyEditor: PropertyValueEditor
	{
		public FontFamilyEditor()
		{
			var comboFact = new FrameworkElementFactory(typeof(ComboBox));
			comboFact.SetV


View Complete Post


More Related Resource Links

Hover effect implementation

  
Hi I am trying to get the hover effect in a gridview via jQuery since IE does not support it in CSS directly. However I can't figure out how to get it back to the way grid looked before the gray hover over effect. I am just using the alternate row style = "#FFE4B5" in my C# code behind so when the grid first loads it has a white background with the alternate rows being shown in Moccasin color. After I hover over it via this JQuery:if (event =='mouseover') {$(this).Css("background", "#D3D3D3")}Once mouse moves out all the rows hovered over remain gray colored. Does some one know how to make it go back to the original colors (white background with the alternate rows being Moccasin color) as they were prior to the hover effect, may be I need an else condition above but not sure. Thanks

don't apply static hover style to siteMapNode that has an empty url property

  

Hi,

I was wondering if there is any way to not apply the static hover effect to asp:menu items where their corresponding sitemapnodes don't have a url specified?

It sounds a little confusing so I thought I'd add snippets of what I'm trying to do:


I have a sitemap file with 3 levels:

<?xml version="1.0" encoding="utf-8" ?>
<siteMap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0" >
  <siteMapNode url="~/default.aspx" title="SOME TITLE"  description="">
    <siteMapNode url="" title="Admin"  description="" roles="Admin">
      <siteMapNode url="~/admin/userMgmt.aspx" title="User Mgmt"  description="" />
      <siteMapNode url="~/admin/roleMgmt.aspx" title="Role Mgmt"  description="" />
    </siteMapNode>
    <siteMapNode url="" title="Users"  description="" roles="User">
      <siteMapNode url="~/Users/MyAssignments.aspx" title="My Assignments"  description="" />
    </siteMapNode>
  </siteMapNode>
</siteMap>


I then have my sit

Property Grid

  

Hi,

I haven't never used Property Grid before and i am struggling to bind the data to Property grid...

I created a class which has public properties and binded the class to Property Grid and it is working fine.

In my scenario i have to bind the datatable to the property grid, please let me know how can i bind the datatable to property grid

Thanks,

Sandeep


Sandeep...

Building a grouping Grid with GridView and ASP.NET AJAX toolkit CollapsiblePanel

  
I've posted an update to this post to apply on demand loading of Details data using ASP.NET AJAX PageMethods. I'm demonstrating the usage if CollapsiblePanelExtender client events on the new post. Check it out.

I admit, Matt Berseth is really inspiring me! Few days ago I pass through 2 of his great posts:

.Surrounding your Data Table and Dialog Controls with ComponentArt Styled Panels
.Building a Grouping Grid with the ASP.NET 3.5 LinqDataSource and ListView Controls
The first one is pure design tips one which I used for making good presentation of my demo here. The 2nd post is actually the idea.

jQuery grid view plugin

  
jqGridView is new, client-rich, XML-based, ajax grid plugin for jQuery library. jqGridView provides professional solution for representing and editing tabular data on the web. Carefully designed, with powerful script API, this editable DHTML grid is easy configurable with XML, and shows convincing results working with large amounts of data. jqGridView allows easy implementation of nice looking(managed through css). jqGridView is not platform-depending plug-in, it can be used with different web -programming platforms like: ASP .NET/ASP, PHP, JAVA, CGI scripts etc. jqGridView has hight bowser compatibility.

WPF / Silverlight tutorial: Visibility property and binding

  
Visibility property is a very powerful and yet often overlooked property available in both WPF and Silverlight. It enables you to set Visibility of certain UIElement objects to different states like: Visible, Collapsed and Hidden (not supported by Silverlight). This tutorial shows you how to use it and how to bind to Visibility property

jQuery grid view plugin

  
jqGridView is new, client-rich, XML-based, ajax grid plugin for jQuery library. jqGridView provides professional solution for representing and editing tabular data on the web. Carefully designed, with powerful script API, this editable DHTML grid is easy configurable with XML, and shows convincing results working with large amounts of data. jqGridView allows easy implementation of nice looking(managed through css

abstract away the source of the connection string using a class with a static property.

  
ASP.NET provides a configuration system we can use to keep our applications flexible at runtime. In this article we will examine some tips and best practices for using the configuration system for the best results.

The element of a web.config file is a place to store connection strings, server names, file paths, and other miscellaneous settings needed by an application to perform work. The items inside appSettings are items that need to be configurable depending upon the environment, for instance, any database connection strings will change as you move your application from a testing and staging server into production.

Encapsulation
Let's abstract away the source of the connection string using a class with a static property.

Get pixel format, raw format, property id list and property items image in VB.net - C#.net.

  
n this simple article you will learn that how we can get pixel format, raw format, property id list and property items image in VB and C#.net.

Get Pixel Format:

Image consists of pixels to get the format of the pixel we have a property named pixel format. This property returns an enumeration of pixel format. This enumeration tells the pixel format.

To demonstrate make a window application. Drag one button and a picture box on form.

Now write the following code on Button click event:

How to take value of bound field of grid in a variable or in a textbox.

  

How to take value of bound field of grid in a variable or in a textbox.

 I m using this code in .aspx page for grid.

<asp:GridView ID="Grd_Mprocess" runat="server" AutoGenerateColumns="False"

                      Width="100%" AllowPaging="True"

                      onpageindexchanging="Grd_Mprocess_PageIndexChanging"

                      AllowSorting="True" PageSize="5"  >

                 <RowStyle CssClass="odd" />

                    <Columns> 

<asp:BoundField HeaderText="DOC_TYPE_PK" DataField="DOC_TYPE_PK"  Visible="true" >

</asp:BoundField>

  <asp:TemplateField HeaderText="DOC TYPE ID" Visible="true">  &nbs

animate effect work but the render items are messed up.

  

Hi all,

     I have a very unique problem, humm i think. I am using a jquery effect that animate bounce effect, i have a line in my javascript pageLoad function $("#UserBrowserInfoDIV").show('bounce'); - the effects run smoothly but what it does is mess up the bolded text in the div. I have try the items inside the div without bolding and it works fine and no render problem but when bolded the text that are bolded is quite messed up, and barely readable.

Please let me know is there anything else i can do i really would like use this effect.

P.S all the effect have the same render problem, and i am using ie8 under compatibility mode.

Thanks

Kabir

 

 


Jscript error: Object does not support property or method

  

 Hi, i have little knowledge on javascript but i need to use this code get from somewhere for a jquery to work.

I face this "Jscript runtime error: Object does not support property or method" whenever im trying to run this page.

In my experience, im get this error msg 9 out of 10 times i use javascript in my system.

Im using Microsoft Visual web developer 2008, i wonder if this is related to my problem, i not sure there is anything i need to add as reference or update anything.

But anyway, in short, i just couldn't use javascript code when using this development tool because of this sort of error.

Anyway, it happen that last time i tried use the same type of jquery code in another project and it seems to work well without an error.

But now when im try to use it again in this recent project i created, it come out with this error and i have no idea how to solve it even look through google and this forum.

It doesn't really seems like its the code problem itself although im not sure, because any javascript code just couldn't work.

So below is my code that i need to use.

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js" ></script>
<script type="text/javascript" src=&quo

Pass a grid column value to a Modal

  

Hi, I have a requirement to hide a field called details on a gridview and show it in a jQuery modal dialog when users click on the Customer ID hyperlink. This grid is created programmatically. I will be hiding the details column via the CSS display:none property. Does some one know how can I pass the grid's selected hidden column value to the modal? Here is some of the code I started:

            GridView mygrid = new GridView();
            //.....................................More columns code for the grid

            //Here is where I need to pass the Details column value associated with the customer ID field selected to the Modal and open the Modal dialog.            
            HyperLinkField linkField = new HyperLinkField();
            string[] dataNavigateUrlFields = { "CustomerID" };
            linkField.DataTextField = "CustomerID";
            linkFi

The number of members in the conceptual type ... does not match with the number of members on the ob

  

 Hello,

I've added a scalar property to an entity and now ASP.NET Dynamic Data scaffolding throws this error:

The number of members in the conceptual type 'TrainingModel.Users' does not match with the number of members on the object side type 'TrainingModel.Users'. Make sure the number of members are the same.

This happens at the following line in global.asax:
model.RegisterContext(typeof(TrainingModel.TrainingEntities), new ContextConfiguration() { ScaffoldAllTables = true });

Please help!
Thanks


Is it possible to populate property choices from a database?

  

I'm creating my first server control, and have it working where I can set up an enum and the user can set a property's choices,  based off of that enum.  But I'd like it to pull records from a database and populate the list of choices for the property from a database.  This would allow me to add a new "Host System" to the database, and the other designers wouldn't have to get a new copy of the dll.

Thanks,

Russ


Custom Server Control Property not maintaining state

  

I have created a server control consisting of a TextArea and a div under it.  My goal is to create my own asp:TextArea type control.  the div is for a Character count of the text area and seems to work ok but i added a CharacterCountVisible property to the control that is always returning true.  See Proptery definition below

 

<Bindable(False), Category("Appearance"), DefaultValue("True"), Localizable(True)> Property CharacterCountVisible() As Boolean
    Get
        Return _CountBoxVisible
    End Get
    Set(ByVal value As Boolean)
        _CountBoxVisible = value
    End Set
End Property

Note the _CountBoxVisible variable is define inside the class as :

Dim _CountBoxVisible as Boolean = True

What I am trying to do is give the user/coder the option to show/utilize the char count feature.  Can make it disappear with textarea1.CharacterCountVisible = False but setting it to true will not make it display.

 

What am i missing

 

Thanks

 

 


Category attribute of user control property does not work correctly in categories tab.

  

Hi,

I have a User Control (ascx) and a property which a want to display in my categories tab in Visual Studio in the category named "Styles".

[Category("Styles"), DefaultValue(""), Description("The value for formating something.")]
public String MyFormatProperty
{
set { /* the code for set */; }
get { /* the code for get */; }
}

And here is the problem: Actually I do not need a get, because I only have to set the property (write only property). But when I omit the get, the property is displayed in the "Misc" category in the categories tab in Visual Studio. Only when I code the get as well, then the property is displayed correctly in the "Styles" category in the categories tab in Visual Studio.

Does anybody know why? How can I display the category correctly only with set?

Thanks, S.



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