this seems like a simple request, but I've searched the fullCalendar posts and was unable to find anything similiar to this question.
I am using the monthly view of fullCalendar on my .net site and need to add an asp.net link button control to each day in the month.
Is this possible?
I've been doing a lot of work hacking the js for fullCalendar, its a fabulous plugin.
You're not going to be able to do exactly what you want, because fullCalendar builds its HTML dynamically in Javascript. What you can do is to hack the JS, the place you need to look is a function called 'buildSkeleton' which generates the HTML for the table fullCalendar uses for display. Its not too hard to see what its doing.
You would also need to deal with the problem that the calendar might render events on top of your button, probably the easiest way is to give your button a positive z-index in CSS so it was always on top of the event bars.
Why do you need a button? If it's to initiate the adding of an event or something like that have a look at one of the demos which shows an dialog box popup when you click on a day. This can be expanded into a host of other posibilities
Related
I like using jqGrid and TableToGrid especially. Getting Json data is nice as well, and I use that functionality in a couple of views in my asp.net MVC4 application, however, the one page where I have jqGrid TableToGrid. The only thing is, when you first load the page or when you refresh a page with a table to grid page on it, The table looks ugly, and then it stabilizes. Is there a way I can hide the table or show a loading screen until the thing is fully ready to view...
I know regular jqGrid has a loading text option, but that is only when your table is being loaded via ajax...
You can put a load dialog over the grid... But I have my loading dialog pop up on document.ready and the ugly looking grid is still there initially. Maybe there is a way I can hide the table earlier than $(document).ready ?
Maybe you can put your entire grid into a div with visibility:hidden or display:none and just show that div with jquery in document.ready.
[Update]
You may show div in jqgrid's gridComplete event. According to their documentation "This fires after all the data is loaded into the grid and all other processes are complete. Also the event fires independent from the datatype parameter and after sorting paging and etc."
Check their wiki for more info http://www.trirand.com/jqgridwiki/doku.php?id=wiki:events
I guess this is a lot of questions bundled into one post.
I want to build a wizard-like control which looks similar to the TabContainer
But I need certain customizations. These would be like I'd want to associate some help text with the TabPanel. So I imagine I'd want to write my markup like below for the tabpanel:
<cc1:MyTabPanel ID="mtp1" runat="server">
<HelpTextTemplate>
This is your step 1 which is about ...
</HelpTextTemplate>
<ContentTemplate>
Content goes here...
</ContentTemplate>
</cc1:MyTabPanel>
So what do you do to make markup like that...? And how would our control from code behind be able to access data between HelpTextTemplate - which may contain server controls and all?
Moreover, notice that there is a button called 'Save' in the above pic. The user simply drags and drops into the tab panel. And when the user double-clicks on it we have a method stub generated in the code behind (which belongs to the aspx page). How is all of this achieved?
And to cap the whole solution off, I realize we have to wire some javascript to simulate that tab functionality. There is css here too (Notice the images behind the tabs - the gradient, etc). The aspect that I am looking at is making this into a control that the users can use out-of-box just like the toolkit's tabcontainer control. Hence the css/javascript should kind of be bundled. How to achieve this?
Edit:
I am also interested in making the control designer (design-time interaction) part. I am looking for functionality the same way we have for the asp.net wizard control. I have found answers to some of the questions I had above will add it when I find time.
For embedding a script or image to the asp.net custom control I found a solution mentioned in the below site:
Embed js resource with custom asp.net control
What I suggest here it may sound too much, but I can not think other easy way for what you ask and the way you won it.
Grab the source code of the TabContainer, clone it, and make all your custom settings base on that source code. The first steps is to get the full source code of this asp.net toolkit and make a build that working. The second step is to add a clone of the TabControl, with new names. Then you work on this clone to make your changes as you wish for. The final step is to try to separate your custom control in a stand alone library if this is possible.
Download the latest version of the full asp.net ajax control toolkit
http://ajaxcontroltoolkit.codeplex.com/SourceControl/list/changesets
Here you can see online the source code for the TabContainer only
http://ajaxcontroltoolkit.codeplex.com/SourceControl/changeset/view/2c482e5ad6c4#Server%2fAjaxControlToolkit%2fTabs%2fTabContainer.cs
The control you are trying to build is not incredibly complex, but it does involve a number of different techniques.
I would suggest creating your own control from scratch rather then inheritting an existing one. Probably using CompositeControl as the base would be best since it gives you a lot of flexibility.
For HelpTextTemplate/ContentTemplate you'll want to create some ITemplate containers, take a look at this article http://msdn.microsoft.com/en-us/library/aa478964.aspx on how to set these up. Since you may want to access the contents/controls in HelpTextTemplate take a look at this article for how to access them: ASP.Net ITemplate - ways of declaring.
For the tabs, since this is custom, I would probably avoid AjaxControlToolkit. Instead I would include a reference to jQuery UI and use jQuery UI Tabs: http://jqueryui.com/demos/tabs/. Your CompositeControl just needs to output some divs, ul/li elements and you'll be good to go for making the tabs.
If you are fixated on using the AJAX Control Toolkit Tabs then you still can. You'll need to instantiate an instance in your custom control, add it to the control tree, and then use a technique like this: http://msdn.microsoft.com/en-us/library/0e39s2ck.aspx to transfer the contents of your template to the tab pages.
Being able to drag and drop a control from the toolbox onto your page is simple; if your server control library is already part of the same solution as your website then it will just show up. Worst case scenario you can use the Add Items option and add the DLL by browsing for it. As for how the Click event is created when you double click a button, that is done through an attribute on the class, take a look at this tutorial on setting up default events: http://msdn.microsoft.com/en-us/library/43sxkdeb.
As for embedding javascript into the library, these two questions cover how to do this specifically for jQuery UI, if you choose to go some other route it should still be pertinent: How to embed jquery library in asp.net custom server control?, http://forums.asp.net/t/1599621.aspx/1.
As for design time support, try reviwing Microsofts article on this (includes a sample): http://msdn.microsoft.com/en-us/library/aa478960.aspx or this CodeProject article on it: http://www.codeproject.com/Articles/9227/ASP-NET-Server-Control-Design-Time-Support.
I have a webpage with a textbox and a button and when the button is clicked i get som calculations on the value entered, but i cannot enter another value and see calulations on that new number.
How can I achieve this? Thanks in advance.
From your question it sounds like you want to be able to change the values without having to click the button again, and have the calculations redone. The reason clicking your button works is because the page goes through a Postback The calculations are then processed server side and returned after the page has loaded. What you want to do can be accomplished in a handful of ways including: jQuery or ajax. One thing you may want to look at is jQuery .post This can help you post the values of your form to a processing page and then set the return value on your form. On the other hand since you're using .NET you could also take a look at the Microsoft AJAX Control Toolkit One place you could start is by looking at the Update Panel. Good luck and I hope this helps!
i have dropdownlists in my asp.net web site, now i want to switch them into something like menu and its items should look like menu items, at mouseover event items in that control should be displayed, is it possible to achieve? how?
It is very well possible using javascript/jquery and setting the css to give it the placing and affects you feel like. You will many such examples googling it out....one such is: http://www.queness.com/post/1047/easy-to-style-jquery-drop-down-menu-tutorial
If you like to convert an existin dropDownList to a menou like I know the the Linkselect jQuery plug-in but also I know a similar from Yahoo User Interface Library
jQuery or other library is strongly suggested for a complex conversion like that, at least the examples I know use a library.
The control buttons don't actually show up in the markup... I'm sure it's possible to do this, but I can't figure it out. I've tried adding a button, but then I get dupes. I suspect there's a way to set the command name and achieve this, but no luck so far.
I think that when in design view, you can click the little arrow that appears on the top right of the control and convert to a template. This may also be .net version specific.