I am looking for a specific control panel - c#

I am looking for a specific control panel to contain the 3 gridviews that I have. The user should flip through the gridviews (preferably with no postback). The controls of the flipping should be at the top of the panel. What "control panel" can I use to achieve that aim?

If i understand correctly what you mean with "flip", you could use an ASP.NET Ajax TabContainer to organize the GridViews in different TabPanels. With ASP.NET-Ajax you could also load the TabPanels/GridViews asynchronously and also only if visible.
Here are some tips.
Lazy-Load TabPanels
TabContainer: Tips&Tricks

Well no postback means client side, and there's no better way to do this than with javascript!
If you would consider using jquery/jquery ui, then the ui tabs are probably what you are looking for.
So now you could create a custom control containing all 3 gridviews, and hide/show them using tabs

Related

Dashboard controls in Winforms

I am working on a WinForm based applications(Yes I don't know WPF) and want's a dashboard like panels in it. Picture given below
Each panel will have a title and records from Database and some action controls. How could this be achieved? I don't want to use GridControl as I don't want to show Excel like spreadsheet here. How could this be achieved?
It sounds like you want to make a UserControl, possibly coupled with an automatic layout panel like FlowLayoutPanel.
Simply speaking, you would create a UserControl with whatever properties and events you require (i.e. in your example you might have a Title property and a Data property), and any events you need to respond to (e.g. you might have a button that you provide a wrapper event for). Then you can add the control to your existing form as you would any other standard control.
As far as displaying data in list form goes, one suggestion is to use a Panel and dynamically add Labels to it. Another idea could be just a simple Label with line breaks in the Text.

ASP.NET changing controls order in div

I have two controls in div wrapped into update panel. My code requires for user to be able to change position of second control left,top,right,bottom from first controls point of view. I was thinking of adding a MultiView and adding 4 Views but controls can't have same ID in views and that is essential for my code functionality.
What would be best approach here?
You could add the second control into a placeholder control. See this question : How can you move ASP.Net controls to different places on the Web form at runtime?

Is it possible to hide the Tab Strip on an ajax TabContainer?

Suppose I have an ajax TabContainer with two tabs. Due to certain buisness logic, we might set one of the tabs to Visible = false.
In this scenario, is it possible to hide the TabStrip at the top, so that they don't see only one tab?
OK; didn't get any replies, but just wanted to summarize what I was able to do:
For the above situation, I actually was able to move the contents of the one visible tab outside the container by reassigning its parent control, and then re-adding where it needed to go (my example is a little more complicated than usual, due to update panels being in the section of code getting moved)
However, it does seem possible to hide the TabStrip by modifying its CSS class depending on how many tabs should be displayed. See http://www.krissteele.net/blogdetails.aspx?id=117 or http://cushen.wordpress.com/2007/10/25/how-to-styling-the-asp-net-ajax-tabcontainer-control/ for some examples of how to modify the styling.

what is the best replacement for TabPages

if one part of one form of our app has many views - let's say depending on a radio button selection some where else on that form - then sometimes using a TabControl with some tabPages can be easy and helpful to show different views based on that selection.
so I still would like to have that "multiple views" functionality but I do not want to use a TabPage.... what would be the best replacement for that?
As far as I know, you'll have to code such a control yourself if you desire a lot of functionality. For regular operations, however, you can use this control I found on CodeProject: Multipane Control.
You could just have a Panel or something to define the area and then you could create one User control for each "view" that you want and then when the user selects a different radio button you just shows/hides the relevant user controls inside that Panel.
Or if the "views" are very simple, maybe the User controls would be overkill and you could just have a GroupBox for each view that you show/hide, but that can quickly create messy code if there are lots of event handlers etc.

C# ASP.NET Collapsible Gridview

Is there a way to create a collapsible ASP.NET gridview displaying a parent child relationship based on a check box click?
An easy solution would be to wrap your GridView in an UpdatePanel, and just code everything as you would with normal postbacks. But this is a very heavy-handed approach.
Another option is to use Microsoft's AJAX Library to invoke PageMethods. See the second example here: http://www.asp.net/ajax/documentation/live/Tutorials/ExposingWebServicesToAJAXTutorial.aspx . Once the page loads, you can bind a function to the checkboxes' click events that invokes a PageMethod to inject the appropriate HTML labels and inputs into the row, with a link that passes the values from the form to a different PageMethod.
I don't think that any of the Microsoft grids can do that. However, third party grids will do this. We used ComponentArt's grid control on my last project, and used it to do exactly what you want.

Categories