Click here to Skip to main content
15,394,885 members
Home / Discussions / C#
   

C#

 
SuggestionRe: what exactly below code do Pin
ZurdoDev11-Jul-14 1:47
professionalZurdoDev11-Jul-14 1:47 
QuestionC# insert command error Pin
PJeffrey10-Jul-14 16:11
MemberPJeffrey10-Jul-14 16:11 
AnswerRe: C# insert command error Pin
Dave Kreskowiak10-Jul-14 18:20
mveDave Kreskowiak10-Jul-14 18:20 
AnswerRe: C# insert command error Pin
jldavis515-Jul-14 8:13
Memberjldavis515-Jul-14 8:13 
QuestionPrivate chat Pin
Member 1076298010-Jul-14 11:15
MemberMember 1076298010-Jul-14 11:15 
AnswerRe: Private chat Pin
Dave Kreskowiak10-Jul-14 12:11
mveDave Kreskowiak10-Jul-14 12:11 
QuestionRe: Private chat Pin
ZurdoDev11-Jul-14 1:49
professionalZurdoDev11-Jul-14 1:49 
QuestionButton within a gridvew that clicking opens a form Pin
Member 1092277510-Jul-14 5:01
MemberMember 1092277510-Jul-14 5:01 
Good afternoon,
in my project I have a button inside a gridvew that clicking opens a form.
This form is what I fill in two columns of the grid.
wanted to know how I program the button to open the form.
C#


My code:


//Preenche template registos
templateRegistar.AllowAddNewRow = false;
templateRegistar.AutoSizeColumnsMode = GridViewAutoSizeColumnsMode.Fill;
templateRegistar.Caption = "Registo de Lavagem de Fardamento";
templateRegistar.Columns.Add(new GridViewTextBoxColumn { HeaderText = "Nº Ticket", FieldName = "SYS_Registo_Entrega.SYS_Ticket.Ticket_ID", IsVisible = true });
templateRegistar.Columns.Add(new GridViewTextBoxColumn { HeaderText = "Fardamento", FieldName = "Fardamento_Funcionario.Fardamento.Descricao", IsVisible = true });
templateRegistar.Columns.Add(new GridViewTextBoxColumn { HeaderText = "Quantidade", FieldName = "Quantidade", IsVisible = true });
templateRegistar.Columns.Add(new GridViewTextBoxColumn { HeaderText = "Utilizador", FieldName = "SYS_Utilizador.Funcionario.Nome_Funcionario", IsVisible = true });
templateRegistar.Columns.Add(new GridViewTextBoxColumn { HeaderText = "Data Entrega", FieldName = "DtEntrega", IsVisible = true });
templateRegistar.Columns.Add(new GridViewComboBoxColumn { HeaderText = "Utilizador", FieldName = "Utilizador_IDLevantamento", IsVisible = true });
templateRegistar.Columns.Add(new GridViewComboBoxColumn { HeaderText = "Data Levantamento", FieldName = "DtLevantamento", IsVisible = true });
templateRegistar.Columns.Add(new GridViewCommandColumn { HeaderText = "", DefaultText = "Registar Levantamento", UseDefaultText = true, MaxWidth = 150, Name = "Levantamento" });
templateRegistar.Columns.Add(new GridViewTextBoxColumn { HeaderText = "Num_Mecanografico_Funcionario", FieldName = "Num_Mecanografico_Funcionario", IsVisible = false });


GridViewRelation relationRegistar = new GridViewRelation(radGridViewFuncionarios.MasterTemplate);
relationRegistar.ChildTemplate = templateRegistar;
relationRegistar.RelationName = "FuncionarioLavagem";
relationRegistar.ParentColumnNames.Add("Num_Mecanografico_Funcionario");
relationRegistar.ChildColumnNames.Add("Num_Mecanografico_Funcionario");
radGridViewFuncionarios.Relations.Add(relationRegistar);

radGridViewFuncionarios.CommandCellClick += radGridViewFuncionarios_CommandCellClick;
//Botao registar Levantamento
void radGridViewFuncionarios_CommandCellClick1(object sender, EventArgs e)
{

GridCommandCellElement click = (GridCommandCellElement)sender;
SYS_Registo_Entrega row = click.RowInfo.DataBoundItem as SYS_Registo_Entrega;
RegistarLevantamento reg = new RegistarLevantamento(row);
if (reg.ShowDialog() == DialogResult.OK)
{
PreencheFuncionarios(); // se foi adicionado novo funcionario a BD, entao atualiza a lista
}


}
AnswerRe: Button within a gridvew that clicking opens a form Pin
Mycroft Holmes10-Jul-14 14:22
professionalMycroft Holmes10-Jul-14 14:22 
QuestionProblem Encode Base 64 Pin
KaKoten10-Jul-14 2:42
MemberKaKoten10-Jul-14 2:42 
AnswerRe: Problem Encode Base 64 Pin
OriginalGriff10-Jul-14 2:59
mveOriginalGriff10-Jul-14 2:59 
GeneralRe: Problem Encode Base 64 Pin
KaKoten10-Jul-14 18:03
MemberKaKoten10-Jul-14 18:03 
GeneralRe: Problem Encode Base 64 Pin
Dave Kreskowiak10-Jul-14 18:16
mveDave Kreskowiak10-Jul-14 18:16 
GeneralRe: Problem Encode Base 64 Pin
KaKoten10-Jul-14 19:00
MemberKaKoten10-Jul-14 19:00 
GeneralRe: Problem Encode Base 64 Pin
Bernhard Hiller10-Jul-14 21:07
MemberBernhard Hiller10-Jul-14 21:07 
GeneralRe: Problem Encode Base 64 Pin
Dave Kreskowiak11-Jul-14 1:31
mveDave Kreskowiak11-Jul-14 1:31 
GeneralRe: Problem Encode Base 64 Pin
KaKoten12-Jul-14 15:40
MemberKaKoten12-Jul-14 15:40 
QuestionCombobox.SelectedValue and Combobox.Text Pin
JCompiler10-Jul-14 1:45
MemberJCompiler10-Jul-14 1:45 
AnswerRe: Combobox.SelectedValue and Combobox.Text Pin
Mycroft Holmes10-Jul-14 14:25
professionalMycroft Holmes10-Jul-14 14:25 
GeneralRe: Combobox.SelectedValue and Combobox.Text Pin
JCompiler10-Jul-14 23:39
MemberJCompiler10-Jul-14 23:39 
AnswerRe: Combobox.SelectedValue and Combobox.Text Pin
Dilan Shaminda14-Jul-14 7:43
professionalDilan Shaminda14-Jul-14 7:43 
QuestionC# Pin
livhuone9-Jul-14 23:04
Memberlivhuone9-Jul-14 23:04 
AnswerRe: C# Pin
OriginalGriff9-Jul-14 23:41
mveOriginalGriff9-Jul-14 23:41 
AnswerRe: C# Pin
Richard MacCutchan9-Jul-14 23:43
mveRichard MacCutchan9-Jul-14 23:43 
QuestionReading and writing from a List<string> simultaneously Pin
Retro6179-Jul-14 16:06
MemberRetro6179-Jul-14 16:06 

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.