Hi to all,
i think, this datagrid will drive me nuts...
I have the below code and i cannot figure out what is wrong and i cannot
format
the columns in the grid.
I, for example, try to format some things in "Sender" column but this is not
happening..
Can anyone give me a shot before i jump out of the window ??
thanks a lot for any help!
anthonyb
SqlConnection cnn = ...
cnn.Open();
SqlCommand cmd = new SqlCommand("Ema ils_FetchPendin g", cnn);
cmd.CommandType = CommandType.Sto redProcedure;
SqlDataAdapter da = new SqlDataAdapter( cmd);
AddGridStyle();
DataSet ds = new DataSet();
da.Fill(ds, "MyTable");
gridPendings.Da taSource = ds;
gridPendings.Da taMember = "MyTable";
cnn.Close();
private void AddGridStyle()
{
DataGridTableSt yle ts = new DataGridTableSt yle();
ts.MappingName = "MyTable";
DataGridTextBox Column sender = new DataGridTextBox Column();
sender.MappingN ame = "Sender";
sender.HeaderTe xt = "anthonyb";
ts.GridColumnSt yles.Add(sender );
grid.TableStyle s.Add(ts);
}
i think, this datagrid will drive me nuts...
I have the below code and i cannot figure out what is wrong and i cannot
format
the columns in the grid.
I, for example, try to format some things in "Sender" column but this is not
happening..
Can anyone give me a shot before i jump out of the window ??
thanks a lot for any help!
anthonyb
SqlConnection cnn = ...
cnn.Open();
SqlCommand cmd = new SqlCommand("Ema ils_FetchPendin g", cnn);
cmd.CommandType = CommandType.Sto redProcedure;
SqlDataAdapter da = new SqlDataAdapter( cmd);
AddGridStyle();
DataSet ds = new DataSet();
da.Fill(ds, "MyTable");
gridPendings.Da taSource = ds;
gridPendings.Da taMember = "MyTable";
cnn.Close();
private void AddGridStyle()
{
DataGridTableSt yle ts = new DataGridTableSt yle();
ts.MappingName = "MyTable";
DataGridTextBox Column sender = new DataGridTextBox Column();
sender.MappingN ame = "Sender";
sender.HeaderTe xt = "anthonyb";
ts.GridColumnSt yles.Add(sender );
grid.TableStyle s.Add(ts);
}
Comment