This seems quite trivial but I can't seem to find out how to place two TreeViews (or any control with a TreeView) so that they sit right next to each other.
Any attempt always results in the TreeView claiming its own line on the displayed page. In other worse, the TreeView always ends up below or above the other control that I want it to be next to.
I've also tried to do this with two panels next to each other and they would simply sit on top of one another. I am sure I am missing something basic.
How do I place any of these controls so they are displayed right next to one another?
Have u tried
<table>
<tr><td>First Tree View<td>
<td>Second Tree Vie</td>
</tr></table>
Related
I got issue to format the dynamic grid view in vb. Hopefully anyone can help me to give some idea for this.
Apparently as in the image, in the red box will be dynamic sub header and dynamic rows. The value for those dynamic item were define by user entry. So I will retrieve the value of the sub headers and rows from database.
However, I faced issue when it come to format it into VB. Hopefully you may help me to give some ideas about it.
I believe that I still need to <asp:GridView></asp:GridView> in markup and also format the dynamic in code behind.
Thanks in advances.
I would suggest for such additional customizing, you use a list view.
And your heading requirements look NOTHING like a heading from a database table. So, a gridview (or better listview) can render the repeating rows of data.
But that heading part? That's not a database heading of columns at all - not even close.
This suggests that the top part can't really be a heading for the listview/gridview.
However, I do suggest that listview would be much better here then a gridview. the reason is both the rows of data, and the heading part can be markup with a listview.
In the gridivew, you could even layout that top part OUTSIDE of the lv, and then consider if it worth the efforts to move that layout into the lv, or just leave it on top.
So, I would just layout the top part as standard web layout like anything else you wish to have on that page.
Then below, you could use a listview/grid view for the repeating rows of data.
You might then be able to take what you laid out separate for the top part, and drop that into the listview, but it probably not worth the trouble.
Given the layout for the top part - I leaning towards the idea of building that separate. It also not clear how normalized the data source is for this, and how many tables are involved. So, boatloads of issues and details here, that would amount to 50 more pages of questions.
However, a list view would be a better choice for such high degrees of customizing. I would thus spend some time googling list view examples for asp.net.
but, that top part is a best as a separate part, and task for you to create. (so it really a form type of layout, and not some "repeating" set of row data).
however, for the bottom repeating rows of data? Listview or grid view would suffice. But the top part is not any kind of classical database heading based on column names with simple rows of data repeating below. that's going to be just pure HTML layout, and you have to do that as such like laying out any other web page.
One might even just use a plain jane HTML table for that part.
Note how listview allows this in the heading layout:
<LayoutTemplate>
<h2>My Cooling heading area layout</h2>
<div style="width:140px;border:solid;background-color:aquamarine;float:left">
Holiday description
<asp:TextBox ID="TextBox1" runat="server" BackColor="Transparent"></asp:TextBox>
</div>
<div style="width:140px;border:solid;background-color:aquamarine;float:left">
Holiday description
<asp:TextBox ID="TextBox2" runat="server" BackColor="Transparent"></asp:TextBox>
</div>
<div style="clear:both"></div>"
<table id="itemPlaceholderContainer" runat="server" border="0" style="">
<tr runat="server" style="">
<th runat="server">FirstName</th>
<th runat="server">LastName</th>
<th runat="server">City</th>
<th runat="server">Active</th>
So, we see this:
If I run the above, we get this:
so you can layout the heading part with ANY kind of markup you want.
but then below is the table layout for the repeating rows.
so you can layout quite much any HTML markup for the repeating rows (easy), and then layout the heading part (hard), but at least using a listview allows this. So, listview has much more configuration and layout abilities then does gridiew.
For a simple grid of data? Gridview is great.
For more complex, but more work? then use listview.
Probably an easy and simple answer to this, but everywhere I look, the questions are more complicated than my situation...
I've got a gridview which is set to be visible false in the aspx. If a search returns results, it gets made "visible", however, if there's more than 10 results (set to 10 per page) and the user clicks on one of the page numbers at the bottom, it resets it's visibility to false. Is there any way around this, short of adding a panel for it to sit on? seems like there should be a way to do this without adding extra objects to the DOM.
Also, on a related note, those page numbers are spaced out in cells across the bottom, instead of being neatly lined up next to one another. Is there a simple pagerStyle setting that collects them all in a row? I've not seen a gridview do this before... in the past its default settings have always placed those numbers neatly in the lower left hand corner... any quick tips?
In Visual Studio 2010 if I click on any <div> or <span> anywhere in the design view it selects this one grid always. Has anyone ever seen this? Are there any ways to fix this?
The only controls in design view that I can click on are textboxes / dropdowns / buttons / linkbuttons etc. So when I want to quickly jump to a span to edit its contents I have to click on the nearest one of those controls then make my way over to the <span>. Cause if I click on the <span>, BOOM highlight the gridview. It is driving me insane!
UPDATE
when i exceed 17 columns in the gridview this is happening. anything less than 17 does not cause this issue. i'd say this is a bug, and after a certain amount of columns the gridview does not function properly in design view and throws off other elements in the page.
This is what I have done do "work around" this problem.
It is a design view problem, not code.
Any time you have a grid view that has enough fields to push if off to the right of the visible editing area in design view, this bug will occur. Clicking spans and divs will always highlight that grid, it is so annoying.
You can expand your design view window wide enough to see the entire grid and this problem goes away for the time being. it is extremely annoying but works.
i am sure there are other work arounds but i have not seen anyone else have this problem (most people dont use the design view).
I am displaying several asp.net panel controls using an html table. Initially the panels are set as visible = false. Depending upon the data from database, some of the panels will be made visible. The problem is if the second and tenth panels are made visible, there are several blank lines are displayed in the page since there are several empty tags created corresponding to invisble panels. please let me know how avoid the blank lines.
Thanks
give style instead of visible property
<div style="display:none"></div>
then from code behind make display : "block" this will hide your element completely and there will be no empty spaces.
If you place your <tr> tags within the Panel control, these will not be rendered out when Panel.Visible == false:
<asp:Panel ...>
<tr>...</tr>
</asp:Panel>
I have two QTreeViews side by side and I want to implement dragging one item from one table into the other table. What I would like to do however is that when the item to be dropped reaches the destination table, that the two rows sort of "make space for it" and separate to really show the user exactly where the item would be dropped. Could someone point me in the right direction as to how to do this as I have no idea really where to start.
Thanks,
Stephen
http://doc.trolltech.com/latest/dnd.html should lead you to pretty much anything you want to do re drag and drop.
As for your specific goal, you need to implement QWidget::dragMoveEvent(QDragMoveEvent* event), which will get called every time the mouse moves within the destination tree while dragging an item. Then get the position of the cursor with QDragMoveEvent::pos(). After that, while in dragMoveEvent, use QTreeView::indexAt(pos()) to get the item under the mouse. Now, I don't know how to get the items to separate in a smooth animated way, which would be ideal. But what you can do is (temporarily) add a blank item to the list, which will have the almost identical effect. Then implement QWidget::dropEvent() to handle the drop event, and when this happens delete the blank item and insert the dragged item in the location where it was.