0
How can I set a variable in a form designer?
Today I set the variable for my parameter, but when I see the form it gives this warning (even with the warning, it normally runs):
The variable 'id_grid' is either undeclared or was Never Assigned.
Follows the code:
this.sqlDataSource1.ConnectionName = "String tpspoazsql01 onee";
this.sqlDataSource1.Name = "sqlDataSource1";
columnExpression15.ColumnName = "nome";
table3.MetaSerializable = "0|0|125|260";
table3.Name = "Cliente_enderecos_alter";
columnExpression15.Table = table3;
column15.Expression = columnExpression15;
columnExpression16.ColumnName = "endereco";
columnExpression16.Table = table3;
column16.Expression = columnExpression16;
columnExpression17.ColumnName = "numero";
columnExpression17.Table = table3;
column17.Expression = columnExpression17;
columnExpression18.ColumnName = "bairro";
columnExpression18.Table = table3;
column18.Expression = columnExpression18;
columnExpression19.ColumnName = "cidade";
columnExpression19.Table = table3;
column19.Expression = columnExpression19;
columnExpression20.ColumnName = "estado";
columnExpression20.Table = table3;
column20.Expression = columnExpression20;
columnExpression21.ColumnName = "cep";
columnExpression21.Table = table3;
column21.Expression = columnExpression21;
selectQuery3.Columns.Add(column15);
selectQuery3.Columns.Add(column16);
selectQuery3.Columns.Add(column17);
selectQuery3.Columns.Add(column18);
selectQuery3.Columns.Add(column19);
selectQuery3.Columns.Add(column20);
selectQuery3.Columns.Add(column21);
selectQuery3.FilterString = "[Cliente_enderecos_alter.id_cliente] = ?ID1";
selectQuery3.Name = "Cliente_enderecos_alter";
queryParameter5.Name = "ID1";
queryParameter5.Type = typeof(int);
queryParameter5.ValueInfo = "0";
queryParameter5.Value = id_grid;
selectQuery3.Parameters.Add(queryParameter5);
selectQuery3.Tables.Add(table3);
this.sqlDataSource1.Queries.AddRange(new DevExpress.DataAccess.Sql.SqlQuery[] {
selectQuery3});
this.sqlDataSource1.ResultSchemaSerializable = resources.GetString("sqlDataSource1.ResultSchemaSerializable");
Good afternoon friend, thanks for telling me. I will study your tips, I opened a question on MSDN and it contains photos, if you can take a look, I would be very grateful. https://social.msdn.microsoft.com/Forums/pt-BR/b831a788-10e9-4378-a260-f8a9b68ff4d3/gridcontrol-com-where-idcliente-idcliente?forum=vscsharppt
– Thomas Erich Pimentel
@Thomaserichpimentel I think it’s kind of weird someone being on a site specializing in Q&A trying to get users to answer their questions in a forum.
– Bacco
@Thomaserichpimentel I see no reason to see your post on MSDN. I already answered here...
– Jéf Bueno
Perfect.Thank you..
– Thomas Erich Pimentel
@Thomaserichpimentel remembering that if you have other questions that need image, you can open the questions here at Sopt and insert the images in the post without problems. It is only important to note that if it is code, or even error messages, you should put the source in text itself, which is easier to read, and copy and paste for tests and searches. Here are some formatting tips, and the post toolbar already has the comic icon for inserting images, and the icon { } for formatting code. This text also has some good tips for valuing the text: [Ask].
– Bacco
Buddy, good afternoon. perfect, I’ll give a read on formatting and watch me when post any questions. Thanks
– Thomas Erich Pimentel