How to show GridView in tooptip in asp.net - c#

Normally what happens, a single or more lines are shown as a tooltip. What I need is to show a gridview as a tooltip. Actually in my project i need to show all the notes associated with a stock in a gridview.
Can anybody help me?
Thanks for sharing your valuable time.

As you are working on the web; why not use a dynamic DIV or the equivalent and have a JS function that loads it with the relevant content and moves it to where you want it upon the mouseover event of the control you want to display the tooltip for?

GridView in a tooltip? gringe
Why don't you use a Sql Data Reader to fetch the data, then set the server control's tool tip text to that?

Related

Unable to select data from combo box using CodedUI

I am using CodedUI technology to do the automation.I have a combo box control and a grid inside as an item. I can find the combo box and managed to open the grid as shown in Fig (01) Control with properties. Now,for further testing I need to click on row item inside the grid.
Issue : I couldn't find the grid and failed to navigate using the search properties. As you see in Fig (01) , the parent level is in desktop client and not bound to our application. Even though the grid belongs to the combo box visually, still it is not listed either parent or the application window.
Solution required: I need to select/click on row item in the grid using hand coded coded ui.
Code Snippet
Note : Playback control also failed to do the desire output.Clicking on the row based on mouse co-ordinates is not much appreciated.
Looking for the solution and thanks much in advance.
Try identifying the grid/Table with combobox as a parent instead of your main application.Something like this
if cboName is your combobox then
HtmlTable tbldata = new HtmlTable(cboName);
Provide any of the columnheaders or one of the Search Property to identify it.
Hope it helps
Hope you must have tried highlighting the grid and checked the parent.
Just try to do record and play u r case and generate code .And see code is getting generated ,how it is maintaing child parent relationship.Than u will get some idea and parameterized the thing in your code

how to show image and text to the list of drop down list control from asp.net?

I'm new to the asp.net . I have placed dropdown list control on my web page. I want to bind image as well as text to the drop down list. The control should be unbound control.
How to do this?
thanks.
Short answer is: you can't do it with a regular dropdown control. You need to cook your own version of something similar to what telerik does with their combobox control. If you look at the HTML rendered, you notice that they achieve this by using <div>, <ul>,<li> and a lot of javascript.
One alternative could be to use jQuery for this. There's a nice plugin called ImageDropDown that does what you need.

How to edit popup window in gridview

I am retrieving data from SQL SERVER using SqlDatasource control and displaying it in asp.net gridview.
for that GridView Control I want to edit that particular data which is displaying in the grid
if i click on a particular edit row then the data should display in a popup window and should display the selected record data in popup window. after editing and saving the data i want the gridview to update.
how can i implement this feature in my app.
thanks for your help
Few links which may be helpful to you.
http://www.aspsnippets.com/Articles/Add-Edit-Update-Records-in-GridView-using-Modal-Popup-in-ASP.Net.aspx
http://choosedaily.com/1178/15-jquery-popup-modal-dialog-plugins-tutorials/
http://forums.asp.net/p/1685721/4440319.aspx/1?Re+Fancy+Box+in+Gird+View
http://forums.asp.net/p/1683887/4433122.aspx/1?Re+I+need+help+appending+a+JQuery+modal+box
http://forums.asp.net/p/1660076/4335007.aspx/1?Re+show+gridview+within+dialog
You could use GridView.RowEditing event. In it you have e.NewEditIndex parameter from which you can fill your popup window data and save it back to the database after editing.

Different popups for different textbox edits, possible?

I have an issue with a popup in Asp.net using AJAX modalpoup extender. Is it possible to show one kind of popup when the user edits few textboxes and the other kind of popup for the remaining textboxes.
I guess it is possible with some javascript function. Could someone help me out?
Ex: Only when txtbox1's value is changed, it should show me popup1 when the save button is clicked. Or else popup2.
Thanks in advance!
This might be something that is limited by the fact that you're using ASP.net's modulapopup. Have you tried looking into jQuery?
For example, you could assign event handlers to the specific buttons/textboxes and have them trigger different events - which you would then handle accordingly, i.e. displaying different popups. Take a look at jQuery UI, specifically their Dialog demo.

HTML divs popup to select columns

I have a web application(ASP.NET2.0 C#) and in it, I have a gridview that gets its data from a datasource.
I wanted to add the following feature: the user can click a button "select columns", and a box pops up with a list of all the columns(a checkboxlist in a div, possibly) and that way, the user can choose the columns they want to see, and click another button "show" and the list of columns goes away, and the table shows the columns that the user selected.
I have already implemented the column choosing part, but it is the popup part that I need help with. How can I make the div popup and then disappear?
The solution might require javascript, and I might not have figured it out since I don't really know javascript that well.
Thank you.
HI,
Its better to make the display of div to be none rather than setting visibility to hidden. If visibility is set to hidden even if the div doesn't show up but it will take the rendering space which in some situation might not be that good.
You can dynamically create a div using createNode and then by absolute positioning and setting the top and left according to your convenience you can align the div to any portion in the page. Its better if you could disable the background when the div pops out.
Create the div and set visible=false. When you want to pop it up write the javascript to set it visible=true.
here's a good pointer http://lists.evolt.org/archive/Week-of-Mon-20020624/116151.html

Categories