I have a repeater displaying repeated rows, trying to figure a way to keep the first appearence and remove the next but it is not working how can i detect a first ocurrence of a record and add a e.Item.visible = false here? if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem) { if (Convert.ToString(((Label)e.Item.FindControl("itemselected")).Text) != "") { ((CheckBox)e.Item.FindControl("selectitem")).Checked = true; } //fstk.STOCK_ID as fsselected if (Convert.ToString(((Label)e.Item.FindControl("fsselected")).Text) != "") { ((CheckBox)e.Item.FindControl("selectitem")).Checked = true; ((CheckBox)e.Item.FindControl("selectitem")).Enabled = false; }
freeisgood
Posts
-
remove row using onitemdatabound -
master data - 'These columns don't currently have unique values'Hi, I am working on this master data repeater and got almost everything working, i have 3 levels of categories that show correct i believe the problem is on the data that i provide through stored ptocedures then i have the items under the first level almost fine, they are showing fine under their first level category, but the second and third go all under the first instead of group nicelly under their second like
correct: how it is: 1. 1. 1.1 1.1 2. 2.1 2.1 3.2 3. 2. 3.1 3.
here it is how the relation goes:DataRelation relation1 = new DataRelation("STOCK_CAT_1", ds.Tables["Cat1"].Columns["STOCK_CAT_ID"], ds.Tables["Items"].Columns["CAT_LEVEL_1"]); ds.Relations.Add(relation1); DataRelation relation2 = new DataRelation("STOCK_CAT_2", ds.Tables["Cat1"].Columns["LEVEL1"], ds.Tables["Items"].Columns["CAT_LEVEL_2"], false); ds.Relations.Add(relation2); DataRelation relation3 = new DataRelation("STOCK_CAT_3", ds.Tables["Cat1"].Columns["LEVEL2"], ds.Tables["Items"].Columns["CAT_LEVEL_3"], false); ds.Relations.Add(relation3); DataRelation relation4 = new DataRelation("CAT_1toCAT2", ds.Tables["Cat1"].Columns["STOCK_CAT_ID"], ds.Tables["Cat1"].Columns["LEVEL1"]); ds.Relations.Add(relation4); DataRelation relation5 = new DataRelation("CAT_2toCAT3", ds.Tables["Cat1"].Columns["STOCK_CAT_ID"], ds.Tables["Cat1"].Columns["LEVEL2"]); ds.Relations.Add(relation5);
then when i remove the false from ["CAT_LEVEL_3"], false); to create a relation, ig throws a "These columns don't currently have unique values" here is the data, can anyone spot what is wrong?:Items
Items
Items
Cat1
Cat1
Cat1
CAT_LEVEL_1
CAT_LEVEL_2
CAT_LEVEL_3
STOCK_CAT_ID
Leve1
-
nested repeaterI am working with nested repeater and i have 3 repeaters nested one under the other the one nested under the master, can be manipulated through a normal _OnItemDataBound event, but to reach the repeaters underneath the second level is not working i tried to add this: private void rptStockCategories_OnItemDataBound(object sender, RepeaterItemEventArgs e) { if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem) { ((Repeater)e.Item.FindControl("rptStockCategories2")).ItemDataBound += new RepeaterItemEventHandler(rptStockCategories3_OnItemDataBound); but i think it only add the event, but wont runn it any suggestions? any
-
File Uploading and Progress...There is no easy way for that you must refresh the client constantly to run a script on the server to verify how far the upload is Bruno