I
Imran Aziz
Hello All,
Is there a way to delete rows from a repeater control using any build in
features?
Imran.
Is there a way to delete rows from a repeater control using any build in
features?
Imran.
Hello All,
Is there a way to delete rows from a repeater control using any
build in
features?
Imran.
Craig Deelsnyder said:You could delete the row/item from the datasource and rebind...
//get private field ArrayList in RepeaterItemCollection
var items = repeater.Items.Get<ArrayList>("items");
...
//manipulate items however you want
public static T Get<T>(this Object obj, String name) {
BindingFlags flags = BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.FlattenHierarchy;
if (obj == null) return default(T);
var prop = obj.GetType().GetProperty(name, flags);
if (prop != null) return (T)prop.GetValue(obj, null);
var field = obj.GetType().GetField(name, flags);
if (field != null) return (T)field.GetValue(obj);
return default(T);
}
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.