D3Helper 2.2의 원래주소에서 다운받아서 사용하세요.
링크 수정함.
해당페이지에서 티스토리 링크 올려주셨네요. 첨부합니다.
https://ccusean.tistory.com/entry/D3Helper
첨부파일은 비상용도임.
D3Helper 2.2의 원래주소에서 다운받아서 사용하세요.
링크 수정함.
해당페이지에서 티스토리 링크 올려주셨네요. 첨부합니다.
https://ccusean.tistory.com/entry/D3Helper
첨부파일은 비상용도임.
RadGrid의 DetailTable 컬럼 크기 조절
ItemDataBound.... 이벤트에서.
//item["EMPTY"].Width = new Unit(75,UnitType.Pixel); <--설정했지만 크기가 안변함.
//상부로 올려서 헤드를 설정해야 된다는..item.OwnerTableView.GetColumn("EMPTY").HeaderStyle.Width = Unit.Pixel(75);
출처 : https://www.telerik.com/forums/how-to-set-column-width-in-code-behind-for-detailtable
위에서 크기만 변경되고. Refresh 시.. 기본값으로 초기화됨.
ItemCreate 이벤트에서 설정해주어야함.
컬럼 전체가 되니..
DetailTable.KeyValue 로 구분하여.. 처리해야함.
근데, 구분자가.. 다행히 ExpandCollapseColumn.Display 발생했던 문제였으므로,
이것으로 구분함. (문제발생한 부분이 구분값의 키구나..)
protected void rgClnDept_ItemCreated(object sender, GridItemEventArgs e)
{
if (e.Item is GridDataItem)
{
GridDataItem item = (GridDataItem)e.Item;
string[] strKeyValue = item.KeyValues.ToString().Replace("{", "").Replace("}", "").Split(':');
//키가없으면 기본항목
if (strKeyValue.Length == 1)
{
}
else if ("CntrNm".Equals(strKeyValue[0]))
{
if (!item.OwnerTableView.ExpandCollapseColumn.Display)
{
item.OwnerTableView.GetColumn("EMPTY").HeaderStyle.Width = Unit.Pixel(75);
}
}
}
}
//연결정보 웹 콘피그 내용
string connectionString = "Data Source=XXX;Initial Catalog=XXX;User Id=XXX;Password=XXX;Application Name=TEST";
System.Data.SqlClient.SqlConnection connection = new System.Data.SqlClient.SqlConnection(connectionString);
try
{
connection.Open();
System.Data.SqlClient.SqlBulkCopy oBulk = new System.Data.SqlClient.SqlBulkCopy(connection);
oBulk.DestinationTableName = "XXXX.dbo.MyDataValues"; //자기가 연은 카탈로그에서 실행
oBulk.BatchSize = 10000;
DataTable dtUpd = new DataTable();
dtUpd.Columns.Add("MyDataID", typeof(string));
dtUpd.Columns.Add("ColSeq", typeof(Int16));
dtUpd.Columns.Add("RowSeq", typeof(int));
dtUpd.Columns.Add("ColVal", typeof(string));
DataRow row;
foreach (var vrListIn in pList)
{
row = dtUpd.NewRow();
row["MyDataID"] = vrListIn.MyDataID;
row["ColSeq"] = vrListIn.ColSeq;
row["RowSeq"] = vrListIn.RowSeq;
row["ColVal"] = vrListIn.ColVal;
dtUpd.Rows.Add(row);
}
oBulk.WriteToServer(dtUpd);
oBulk.Close();
dtUpd = null;
}
catch (Exception ex)
{
}
finally
{
if (connection != null)
{
connection.Close();
}
}