간단한 방법이 있었는데.. 이것을 못 찾고 있었다.ㅡㅡ;;
출처: http://stackoverflow.com/questions/17311757/on-clicking-the-hyperlink-inside-gridview-it-should-redirect-to-a-page-and-and
|
변형
<Columns> </Columns> |
간단한 방법이 있었는데.. 이것을 못 찾고 있었다.ㅡㅡ;;
출처: http://stackoverflow.com/questions/17311757/on-clicking-the-hyperlink-inside-gridview-it-should-redirect-to-a-page-and-and
|
변형
<Columns> </Columns> |
출처: http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.detailsview.itemupdating%28v=vs.110%29.aspx
가끔 데이터 입력시 확인이 필요하거나 자동으로 입력이 필요할 때가 있다.
이때 필요한 것들
void CustomerDetail_ItemInserting(object sender, DetailsViewInsertEventArgs e) { // Iterate though the values entered by the user and HTML encode // the values. This helps prevent malicious values from being // stored in the data source. for (int i = 0; i < e.Values.Count; i++) { if (e.Values[i] != null) { e.Values[i] = Server.HtmlEncode(e.Values[i].ToString()); } } }
버튼으로 DetailsView의 모드를 변경할 경우가 있다.
이때 모드 확인 후 사용하기
// check the Detail View Mode |
mode는 3가지가 있다.
edit, insert, readonly
출처: http://brian.chipsofttech.com/post/DetailsView-Confirm-Delete.aspx
itemCreated 이벤트에서 사용하면 된다.
protected void DetailsView1_ItemCreated(object sender, EventArgs e)
{
// Test FooterRow to make sure all rows have been created
if (DetailsView1.FooterRow != null)
{
// The command bar is the last element in the Rows collection
int commandRowIndex = DetailsView1.Rows.Count - 1;
if (commandRowIndex > 0)
{
DetailsViewRow commandRow = DetailsView1.Rows[commandRowIndex];
// Look for the DELETE button
DataControlFieldCell cell = (DataControlFieldCell)commandRow.Controls[0];
foreach (Control ctl in cell.Controls)
{
LinkButton link = ctl as LinkButton;
if (link != null)
{
if (link.CommandName == "Delete")
{
link.ToolTip = "Click here to delete";
link.OnClientClick = "return confirm('Do you really want to delete this record?');";
}
}
}
}
}
}
출처: http://stackoverflow.com/questions/987672/format-make-bold-or-italics-a-portion-of-a-textbox-or-formula-object-in-crysta
You can do this by inserting HTML markup in the field (using a formula) and then displaying the new formula as a HTML field.
e.g. Here's a basic Syntax formula that takes a field and adds the bold tag around the text before the colon.
dim sTmp as string
dim sLeft as string
dim sRight as string
dim sAll as string
sTmp = {yourtable.yourfield}
sLeft = (split(sTmp,":"))(1)
sRight = (split(sTmp,":"))(2)
sAll = "<b>"+sLeft+":</b>"+sRight
formula = sAll
If you place this new formula into the report and then ...
<p style="font-family:arial;text-align:center;font-weight:bold;color:black;font-size:10px;">A paragraph.</p>