TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Raja
NA
2k
355.9k
How to Delete Repeater Row using button click?
May 4 2017 12:59 AM
I have add the empty row for repeater using below code
protected void btnAddRow_Click(object sender, EventArgs e)
{
DataTable dt = new DataTable();
dt = AddDataTable();
if (dt.Rows.Count >= 1)
{
dt.Rows.Add();
rptrReference.DataSource = dt;
rptrReference.DataBind();
}
btnSave.Focus();
}
protected DataTable AddDataTable()
{
DataTable dtReference = new DataTable("Project");
dtReference.Columns.Add("IN_ORGAN_CODE");
dtReference.Columns.Add("IN_COMP_REF_NO");
dtReference.Columns.Add("IN_REFERENCE_TYPE");
int rowID = 0;
dtle = dtReference.Clone();
TextBox tbxCode = new TextBox();
foreach (RepeaterItem dataItem in rptrReference.Items)
{
tbxCode = (TextBox)dataItem.FindControl("tbxCode");
dtle.Rows.Add();
dtle.Rows[rowID]["IN_ORGAN_CODE"] = 9212;
dtle.Rows[rowID]["IN_COMP_REF_NO"] = tbxLegacyCode.Text.Trim().ToUpper();
dtle.Rows[rowID]["IN_REFERENCE_TYPE"] = "PRF";
rowID++;
}
return dtle;
}
How to Delete using button click using particular row?
Reply
Answers (
3
)
find End date based on Start date and number of weeks C#.net
some body help me