|
|
Is there something wrong with the links on the that page you provided?
Code Samples
Documentation
Knowledge Base
led mike
|
|
|
|
|
there is nothing wrong on provided link, BUT I need a quick start. You may say a short cut
|
|
|
|
|
wEb GuRu... wrote: BUT I need a quick start. You may say a short cut
Those examples are provided as a short cut. You want a short cut to the short cut? WTF dude?
led mike
|
|
|
|
|
Hi all,
I'm trying to extend GridView control to add a DropDownList with values to change the PageSize in the Pager row. To reuse the control in the future, I'd like to add the values to the DropDownList either in the Properties window at design time or in the code behind. I created a class to keep the values and, following instructions found in several forums, add the requested attributes.
Here is the code:
[DefaultProperty("Text")]
[ParseChildren(true), PersistChildren(false)]
public class MyGrid : GridView
{
protected SizeItemCollection _PageSizeItems;
[Category("Paging")]
[Editor(typeof(CollectionEditor), typeof(System.Drawing.Design.UITypeEditor))]
[PersistenceMode(PersistenceMode.InnerDefaultProperty), MergableProperty(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Content)]
[Description("Items list for the PageSize selector DropDownList")]
public SizeItemCollection PageSizeItems
{
get { return (_PageSizeItems != null ? _PageSizeItems : new SizeItemCollection()); }
}
protected override void InitializePager(GridViewRow row, int columnSpan, PagedDataSource pagedDataSource)
{
}
}
public class SizeItem : Component
{
private int _size;
public SizeItem() { }
public SizeItem(int size)
{
_size = size;
}
public int Size
{
get { return _size; }
set { _size = value; }
}
}
public class SizeItemCollection : CollectionBase
{
}
I managed to see the PageSizeItems modal form at design time to add the values, but I don't know why they are not stored properly. Same problem happens if I try to add the values in the code behind using the Add(SizeItem) method, they don't load properly.
I guess it might be a problem with persistance. I'm pretty new to C# and .NET and would really appreciate some help on this. Please feel free to ask any other questions.
Thanks in advanced
|
|
|
|
|
LuKas23_ wrote: following instructions found in several forums,
Did you try looking at the documentation for ASP.NET Custom Controls[^]? Forums are not the best choice for information like that.
led mike
|
|
|
|
|
I did try to look to the documentation you pointed out[^], and also other sites talking about extending ASP Controls. I managed to create a control with a collection property and run in properly with data persitance. The problem is that the collection I have in my GridView control is used to bind a child control (DropDownList) of the GridView, and not the parent control. I don't really know if this can be affecting the normal behaviour, but the thing is that the SizeItemsCollection data doesn't persist.
Maybe I'm going in the wrong direction and the problem is somewhere else, but I hope someone here around TheCodeProject will guide me to the solution.
Thanks
|
|
|
|
|
I have a form view that use objectDataSource with cache enable as following:
<asp:ObjectDataSource ID="odsTest" Runat="server" EnableCaching="true" CacheDuration="300" CacheExpirationPolicy="Sliding" CacheKeyDependency="ckdCaseExam" TypeName="App.Test" SelectMethod="GetTestList" UpdateMethod="fvwTest">
*Assuming the SELECT item1, item2, item3 from tblTest WHERE item4 =’Y’
I need to access the cached data to check something in code behind without refresh the data. How can I do it?
|
|
|
|
|
hi
I have a regular validator for a textbox, I would like the textbox to only accept numeric entry but also allow a .
so it would except the following
1
11
1.1
but not
letter
i have this ([0-9]{1,2}) but I cant find anyway to enter a .
thanks
|
|
|
|
|
sorted it
\d+(\.\d{1,2})?
|
|
|
|
|
Erhm, I'm not a regular expressions wizard... but this may be the one
^([0-9]+)([\.]?)([0-9]*)$
|
|
|
|
|
I have created a web control library but i have the following two major problems:
1- when the page is posted back the control disappears from the page as it is added in the run time. I need it to still as it is and the values in (text boxes or radios).
2- I need to know a mechanism to take the user data entered in the control.
thanks in advance
abdelhameed81
|
|
|
|
|
This is such a common question, I should check if there's an article on it ( I'm sure there is ) and write one if need be
You need to add the control every time, on postback. And you need to add it before page load in order for viewstate to be restored so you can get values from it.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Ok, i am waiting for this article as i cannot find it
thanks in advance
|
|
|
|
|
Please read the article linked to in my sig. Then, read this[^].
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
How is it possible to open a external link in Content place holder ?
I hava master paeg and in menu there is link "Codeproject", when user click on this link, code project will loaded on this place holder.
Any idea.
Thanks in advance !!!
Best Regards
-----------------
Abhijit Jana
Microsoft Certified Professional
"Success is Journey it's not a destination"
|
|
|
|
|
An iframe is what you need here.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
|
Hello Friend
I've faced a problem
I am using .NET 2008. But I can not find Microsoft.Web.Preview.dll in my system.
Can any body tell me from where I can download Microsoft.Web.Preview.dll file or where the file is located in my system.
Thanks
|
|
|
|
|
There's a link in my sig, please read the article it links to, because your core problem is addressed there.
http://forums.asp.net/p/1049988/1481402.aspx[^] will answer your more direct question.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
i searched many website but i am not get proper answer for my question...
pls answer the following question.....
how to execute the textbox script value dynamically at runtime in ASP.net with c#
|
|
|
|
|
Could you not use ontextchange attribute for textbox to do it on the fly?
|
|
|
|
|
Please don't create a new account every time you ask this. Instead, try asking it a bit better. Possible reasons that you can't find your answer, after I gave it to you
1 - you want the code to run on the client ( this is impossible )
2 - the sort of code you want to run and the way you want to get the result, is your real problem/question and instead of asking the same thing over and over, you should refine your question to make it clearer
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
hai, how do execute the textbox script value at dynamically in .net with c#.if you know the answer replay to me..
|
|
|
|
|
um not sure if I understand you correctly so here is some possible answers
You can have an ontextchange event so that when someone clicks on your textbox enters a value, then clicks elsewhere the event is ran
You could have some script run on a button on the onclick event which executes what you want
please give more info on your problem if this doesnt help
|
|
|
|