Click here to Skip to main content
15,896,153 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: question on MS_POSITIONING Pin
vanhawk15-Oct-07 23:32
vanhawk15-Oct-07 23:32 
GeneralRe: question on MS_POSITIONING Pin
Sathesh Sakthivel15-Oct-07 23:34
Sathesh Sakthivel15-Oct-07 23:34 
GeneralRe: question on MS_POSITIONING Pin
vanhawk15-Oct-07 23:39
vanhawk15-Oct-07 23:39 
GeneralRe: question on MS_POSITIONING Pin
mareers16-Oct-07 0:39
mareers16-Oct-07 0:39 
GeneralRe: question on MS_POSITIONING Pin
vanhawk16-Oct-07 14:10
vanhawk16-Oct-07 14:10 
Questionhow to find a content place holder in a master page dynamically Pin
scicorp15-Oct-07 22:59
scicorp15-Oct-07 22:59 
AnswerRe: how to find a content place holder in a master page dynamically Pin
Sandeep Akhare15-Oct-07 23:13
Sandeep Akhare15-Oct-07 23:13 
QuestionCollection Editor Problem Pin
Ujjaval Modi15-Oct-07 22:48
Ujjaval Modi15-Oct-07 22:48 
i have made one double type collection editor in web control library project.
the collection gets displayed properly at design time and i am able to add and remove items also but my problem is that value entered at design time does not effect the control at runtime.

Here's the code :
First of all I designed a class for creating a List Collection :

using System;
using System.Collections.Generic;
using System.Text;
using System.Collections;

namespace Funnel
{
public class SectionValue : CollectionBase
{
public double this[int index]
{
get
{
return ((double)List[index]);
}
set
{
List[index] = value;
}

}

public int Add(double value)
{
return (List.Add(value));
}

public int Add(string value)
{
try
{
double c = Convert.ToDouble(value);
return (List.Add(c));
}
catch (Exception)
{
throw new ArgumentException(string.Format(
"Error converting the given string '{0}' to a color",
value), "value");
}
}
public bool Contains(double value)
{
// If value is not of type Color, this will return false.
return (List.Contains(value));
}


public int IndexOf(double value)
{
return (List.IndexOf(value));
}
public void Insert(int index, double value)
{
List.Insert(index, value);
}
public void Remove(double value)
{
List.Remove(value);
}

public SectionValue(double[] sections) : base()
{
foreach (double s in sections)
{
this.Add(s);
}
}

public SectionValue()
: base()
{}
}
}

Then I use object of the class in my control as follows :

protected SectionValue m_SectionValue;

and write property for it as follows :


[Bindable(true)
, Category("Appearance")
, Browsable(true)
, PersistenceMode(PersistenceMode.Attribute)
, DesignerSerializationVisibility(DesignerSerializationVisibility.Content)
]

public SectionValue UserDefinedSection
{
get
{
if (m_SectionValue == null)
m_SectionValue = new SectionValue();

return m_SectionValue;
}
set
{
m_SectionValue = value;
}
}


Now this code is working perfectly regarding displaying the collection editor and add/deleting values from it. Even I am able to Smile | :) add/delete values from code-behind.
But the values added during design time do not get reflected at run-time. If I assign values to collection from code-behind file then the values get reflected at run-time but not from design-time.

Thanks & Regards,
Ujjaval Modi.
QuestionGridView with TextBox Control Pin
Elizma15-Oct-07 22:43
Elizma15-Oct-07 22:43 
AnswerRe: GridView with TextBox Control Pin
varshavmane15-Oct-07 22:46
varshavmane15-Oct-07 22:46 
GeneralRe: GridView with TextBox Control Pin
Elizma15-Oct-07 23:23
Elizma15-Oct-07 23:23 
GeneralRe: GridView with TextBox Control Pin
Sathesh Sakthivel15-Oct-07 23:33
Sathesh Sakthivel15-Oct-07 23:33 
GeneralRe: GridView with TextBox Control Pin
Elizma16-Oct-07 0:05
Elizma16-Oct-07 0:05 
GeneralRe: GridView with TextBox Control Pin
varshavmane15-Oct-07 23:39
varshavmane15-Oct-07 23:39 
GeneralRe: GridView with TextBox Control Pin
Elizma16-Oct-07 0:06
Elizma16-Oct-07 0:06 
GeneralRe: GridView with TextBox Control Pin
varshavmane16-Oct-07 0:31
varshavmane16-Oct-07 0:31 
Questionmaster page closing problem Pin
Sonia Gupta15-Oct-07 22:25
Sonia Gupta15-Oct-07 22:25 
AnswerRe: master page closing problem Pin
Piyush Vardhan Singh15-Oct-07 23:03
Piyush Vardhan Singh15-Oct-07 23:03 
AnswerRe: master page closing problem Pin
Sathesh Sakthivel15-Oct-07 23:10
Sathesh Sakthivel15-Oct-07 23:10 
JokeRe: master page closing problem Pin
Sandeep Akhare15-Oct-07 23:39
Sandeep Akhare15-Oct-07 23:39 
GeneralRe: master page closing problem Pin
Sonia Gupta15-Oct-07 23:41
Sonia Gupta15-Oct-07 23:41 
GeneralRe: master page closing problem Pin
Sandeep Akhare15-Oct-07 23:52
Sandeep Akhare15-Oct-07 23:52 
GeneralRe: master page closing problem Pin
Sonia Gupta15-Oct-07 23:57
Sonia Gupta15-Oct-07 23:57 
GeneralRe: master page closing problem Pin
Sandeep Akhare16-Oct-07 0:00
Sandeep Akhare16-Oct-07 0:00 
GeneralRe: master page closing problem Pin
Sonia Gupta16-Oct-07 0:02
Sonia Gupta16-Oct-07 0:02 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.