Hello ,
I have designed updatable dashboard for updating workers over time its working fine later i added customization on top of that to create new coloumn in grid view called browse to upload workers medical certificate if they took medical leave functionality working fine but after making all the changes in the grid , when i click save button nothing is updating. Kindly help me to resolve this issue.
Here is my code
Code for Adding Browse Button:
private void addbrowsebutton()
{
try
{
DataTable dt=new DataTable();
dt.Columns.Add(“UD102A_Date01”, typeof(DateTime));
dt.Columns.Add(“UD102A_ShortChar01”, typeof(string));
dt.Columns.Add(“UD102A_ShortChar02”, typeof(string));
dt.Columns.Add(“UD102A_ShortChar03”, typeof(string));
dt.Columns.Add(“UD102A_ShortChar04”, typeof(string));
dt.Columns.Add(“UD102A_ShortChar05”, typeof(string));
dt.Columns.Add(“UD102A_Character03”, typeof(string));
dt.Columns.Add(“UD102A_Character04”, typeof(string));
dt.Columns.Add(“UD102A_Number05”, typeof(decimal));
dt.Columns.Add(“UD102A_Number06”, typeof(decimal));
dt.Columns.Add(“UD102A_ShortChar08”, typeof(string));
dt.Columns.Add(“UD102A_Character10”, typeof(string));
dt.Columns.Add(“RowMod”, typeof(string));
dt.Columns.Add(“RowIdent”, typeof(string));
dt.Columns.Add(“UD102A_Company”, typeof(string));
dt.Columns.Add(“UD102A_Key1”, typeof(string));
dt.Columns.Add(“UD102A_Key2”, typeof(string));
dt.Columns.Add(“UD102A_Key3”, typeof(string));
dt.Columns.Add(“UD102A_Key4”, typeof(string));
dt.Columns.Add(“UD102A_Key5”, typeof(string));
dt.Columns.Add(“UD102A_ChildKey1”, typeof(string));
dt.Columns.Add(“UD102A_ChildKey2”, typeof(string));
dt.Columns.Add(“UD102A_ChildKey3”, typeof(string));
dt.Columns.Add(“UD102A_ChildKey4”, typeof(string));
dt.Columns.Add(“UD102A_ChildKey5”, typeof(string));
dt.Columns.Add(“UD102_Key1”, typeof(string));
dt.Columns.Add(“UD102_Key2”, typeof(string));
dt.Columns.Add(“UD102_Key3”, typeof(string));
dt.Columns.Add(“UD102_Key4”, typeof(string));
dt.Columns.Add(“UD102_Key5”, typeof(string));
dt.Columns.Add(“UD102_Company”, typeof(string));
dt.Columns.Add(“SysRowID”, typeof(string));
EpiUltraGrid grd = (EpiUltraGrid)csm.GetNativeControlReference(“656e4eee-8573-4f86-9090-c7e107040b61”);
int cnt= grd.DisplayLayout.Bands[0].Columns.Count;
if(grd.Rows.Count > 0)
{
for(int j=0; j < grd.Rows.Count; j++)
{
dt.Rows.Add(
grd.DisplayLayout.Rows[j].Cells[“UD102A_Date01”].Value.ToString(),
grd.DisplayLayout.Rows[j].Cells[“UD102A_ShortChar01”].Value.ToString(),
grd.DisplayLayout.Rows[j].Cells[“UD102A_ShortChar02”].Value.ToString(),
grd.DisplayLayout.Rows[j].Cells[“UD102A_ShortChar03”].Value.ToString(),
grd.DisplayLayout.Rows[j].Cells[“UD102A_ShortChar04”].Value.ToString(),
grd.DisplayLayout.Rows[j].Cells[“UD102A_ShortChar05”].Value.ToString(),
grd.DisplayLayout.Rows[j].Cells[“UD102A_Character03”].Value.ToString(),
grd.DisplayLayout.Rows[j].Cells[“UD102A_Character04”].Value.ToString(),
grd.DisplayLayout.Rows[j].Cells[“UD102A_Number05”].Value.ToString(),
grd.DisplayLayout.Rows[j].Cells[“UD102A_Number06”].Value.ToString(),
grd.DisplayLayout.Rows[j].Cells[“UD102A_ShortChar08”].Value.ToString(),
grd.DisplayLayout.Rows[j].Cells[“UD102A_Character10”].Value.ToString(),
grd.DisplayLayout.Rows[j].Cells[“RowMod”].Value.ToString(),
grd.DisplayLayout.Rows[j].Cells[“RowIdent”].Value.ToString(),
grd.DisplayLayout.Rows[j].Cells[“UD102A_Company”].Value.ToString(),
grd.DisplayLayout.Rows[j].Cells[“UD102A_Key1”].Value.ToString(),
grd.DisplayLayout.Rows[j].Cells[“UD102A_Key2”].Value.ToString(),
grd.DisplayLayout.Rows[j].Cells[“UD102A_Key3”].Value.ToString(),
grd.DisplayLayout.Rows[j].Cells[“UD102A_Key4”].Value.ToString(),
grd.DisplayLayout.Rows[j].Cells[“UD102A_Key5”].Value.ToString(),
grd.DisplayLayout.Rows[j].Cells[“UD102A_ChildKey1”].Value.ToString(),
grd.DisplayLayout.Rows[j].Cells[“UD102A_ChildKey2”].Value.ToString(),
grd.DisplayLayout.Rows[j].Cells[“UD102A_ChildKey3”].Value.ToString(),
grd.DisplayLayout.Rows[j].Cells[“UD102A_ChildKey4”].Value.ToString(),
grd.DisplayLayout.Rows[j].Cells[“UD102A_ChildKey5”].Value.ToString(),
grd.DisplayLayout.Rows[j].Cells[“UD102_Key1”].Value.ToString(),
grd.DisplayLayout.Rows[j].Cells[“UD102_Key2”].Value.ToString(),
grd.DisplayLayout.Rows[j].Cells[“UD102_Key3”].Value.ToString(),
grd.DisplayLayout.Rows[j].Cells[“UD102_Key4”].Value.ToString(),
grd.DisplayLayout.Rows[j].Cells[“UD102_Key5”].Value.ToString(),
grd.DisplayLayout.Rows[j].Cells[“UD102_Company”].Value.ToString(),
grd.DisplayLayout.Rows[j].Cells[“SysRowID”].Value.ToString());
}
dt.Columns.Add("Upload", typeof(string)).SetOrdinal(32);
if(dt.Rows.Count > 0)
{
foreach (DataRow row in dt.Rows)
{
row["Upload"]="Browse";
}
}
grd.DataSource = dt;
grd.DisplayLayout.Bands[0].Columns["Upload"].Style = Infragistics.Win.UltraWinGrid.ColumnStyle.Button ;
}
}
catch(Exception ex)
{
MessageBox.Show(ex.Message);
}
}
Calling this function in EpiViewNotification -> InitializeRow