Click here to Skip to main content
15,908,013 members
Home / Discussions / C#
   

C#

 
AnswerRe: How i can redirect URLs entered in the browser with C#? Pin
OriginalGriff1-Mar-14 23:36
mveOriginalGriff1-Mar-14 23:36 
JokeRe: How i can redirect URLs entered in the browser with C#? Pin
Richard Andrew x643-Mar-14 9:44
professionalRichard Andrew x643-Mar-14 9:44 
AnswerRe: How i can redirect URLs entered in the browser with C#? Pin
Ravi Bhavnani2-Mar-14 5:59
professionalRavi Bhavnani2-Mar-14 5:59 
AnswerRe: How i can redirect URLs entered in the browser with C#? Pin
Eddy Vluggen2-Mar-14 7:19
professionalEddy Vluggen2-Mar-14 7:19 
AnswerRe: How i can redirect URLs entered in the browser with C#? Pin
Eddy Vluggen2-Mar-14 7:23
professionalEddy Vluggen2-Mar-14 7:23 
Questionfacial expression recognition Pin
Member 95388301-Mar-14 12:31
Member 95388301-Mar-14 12:31 
AnswerRe: facial expression recognition Pin
Richard MacCutchan1-Mar-14 21:05
mveRichard MacCutchan1-Mar-14 21:05 
AnswerRe: facial expression recognition Pin
Eddy Vluggen2-Mar-14 7:30
professionalEddy Vluggen2-Mar-14 7:30 
QuestionDoubt Pin
Member 105917231-Mar-14 1:21
Member 105917231-Mar-14 1:21 
AnswerRe: Doubt Pin
Maciej Los1-Mar-14 3:24
mveMaciej Los1-Mar-14 3:24 
AnswerRe: Doubt Pin
BillWoodruff1-Mar-14 8:16
professionalBillWoodruff1-Mar-14 8:16 
GeneralRe: Doubt Pin
Member 105917233-Mar-14 2:32
Member 105917233-Mar-14 2:32 
GeneralRe: Doubt Pin
BillWoodruff3-Mar-14 5:49
professionalBillWoodruff3-Mar-14 5:49 
GeneralRe: Doubt Pin
Member 105917234-Mar-14 2:38
Member 105917234-Mar-14 2:38 
QuestionCreate 3 application separately & retrive data from 1st app using 2nd app & show that data on 3rd app using .net Pin
Member 1063449628-Feb-14 19:26
Member 1063449628-Feb-14 19:26 
AnswerRe: Create 3 application separately & retrive data from 1st app using 2nd app & show that data on 3rd app using .net Pin
Raj Mouli28-Feb-14 21:57
Raj Mouli28-Feb-14 21:57 
QuestionRe: Create 3 application separately & retrive data from 1st app using 2nd app & show that data on 3rd app using .net Pin
Richard MacCutchan28-Feb-14 22:10
mveRichard MacCutchan28-Feb-14 22:10 
AnswerRe: Create 3 application separately & retrive data from 1st app using 2nd app & show that data on 3rd app using .net Pin
Eddy Vluggen1-Mar-14 0:31
professionalEddy Vluggen1-Mar-14 0:31 
QuestionAlgorithm change of reference in C # Pin
tuning100128-Feb-14 18:39
tuning100128-Feb-14 18:39 
AnswerRe: Algorithm change of reference in C # Pin
OriginalGriff28-Feb-14 23:04
mveOriginalGriff28-Feb-14 23:04 
GeneralRe: Algorithm change of reference in C # Pin
tuning10011-Mar-14 6:43
tuning10011-Mar-14 6:43 
Questionrichtextbox Pin
Shanug28-Feb-14 18:34
Shanug28-Feb-14 18:34 
AnswerRe: richtextbox Pin
Tom Marvolo Riddle28-Feb-14 21:58
professionalTom Marvolo Riddle28-Feb-14 21:58 
AnswerRe: richtextbox Pin
Raj Mouli28-Feb-14 22:00
Raj Mouli28-Feb-14 22:00 
QuestionYou can define columns for a temporary DataTable? Pin
Souza-1063377928-Feb-14 8:34
Souza-1063377928-Feb-14 8:34 
Confused | :confused:

Friends, good morning everyone.
I am needing to define the columns and their characteristics to a temporary DataTable, and not let it generates the columns, the data are inserting correctly, I have my grid:


C#
<asp:GridView ID="GridResumoTotal" runat="server" Height="2px"
Width="100%" AutoGenerateColumns="true" >
</asp:GridView>


I wanted to set my grid with the fields and formatting without using AutoGenerateColumns
I greatly appreciate the help!

I'm doing this:

C#
protected void Page_Load(object sender, EventArgs e)
{

if (!IsPostBack)
{
//dataTable para guarda dados temporario
dtb = CriaDataTable();
Session["mDatatable"] = dtb;
GridResumoTotal.DataSource = ((DataTable)Session["mDatatable"]).DefaultView;
GridResumoTotal.DataBind();
}

//criar um DataTable temporário
private DataTable CriaDataTable()
{
DataTable mDataTable = new DataTable();
DataColumn mDataColumn;

mDataColumn = new DataColumn();
mDataColumn.DataType = Type.GetType("System.String");
mDataColumn.ColumnName = "MODALIDADE";
mDataTable.Columns.Add(mDataColumn);

mDataColumn = new DataColumn();
mDataColumn.DataType = Type.GetType("System.String");
mDataColumn.ColumnName = "QTD_OBJ_16";
mDataTable.Columns.Add(mDataColumn);

mDataColumn = new DataColumn();
mDataColumn.DataType = Type.GetType("System.String");
mDataColumn.ColumnName = "QTD_OBJ_17";
mDataTable.Columns.Add(mDataColumn);

return mDataTable;
}

private void incluirNoDataTable(string modalidade, string qtd_obj16, string qtd_obj_17, DataTable mTable)
{
DataRow linha;
linha = mTable.NewRow();
//gera o número GUID
//linha["CODIGO"] = Guid.NewGuid().ToString();
linha["MODALIDADE"] = modalidade;
linha["QTD_OBJ_16"] = qtd_obj16;
linha["QTD_OBJ_17"] = qtd_obj_17;
mTable.Rows.Add(linha);
}


GridResumoTotal.Columns.Clear();
incluirNoDataTable("TOTAL GERAL DIA : ", footer.Cells[16].Text,footer.Cells[17].Text, (DataTable)Session["mDatatable"]);
GridResumoTotal.DataSource = ((DataTable)Session["mDatatable"]).DefaultView;
GridResumoTotal.DataBind();

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.