Jump to content
Software FX Community

julio15

Members
  • Posts

    9
  • Joined

  • Last visited

julio15's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Hi, I have a problem when I want to print a Chart. When I click in the print button it go to a blank page and don't print any chart, thanks, Julio
  2. Thank you very much for your response, it worked out ok, Julio CFXSilverlightDLLs.zip
  3. Is possible to make the Chart Visible or not visible in Javascript? Example: C#: Chart1.Visible = true; (or false) Javascript: function Button1_onclick() { var chart = document.getElementById('Chart1'); chart.???? } Thanks,
  4. julio15

    some questions

    Hi! First of all, thank you for your answers. In the cases of creating dynamically the Grids, both the master table and the detail table, up to a second level, already function properly. At present, I am using IIS and two tables (master table and detail table) to carry out a test. Statically, I create Grid 1 with an empty field(NombreProvincia) otherwise I could not create Grid 2 as a daughter table. I do all the remaining work dynamically. Given below is the code showing the way I configure the Grids: protected void Grid1_Load(object sender, EventArgs e) { if (!IsPostBack) { Session["Llamada"] = "Nulo"; String d = Grid1.DataSourceID; Grid1.DataSourceID = ""; NumberField field2 = new NumberField(); NumberField field3 = new NumberField(); FieldColumn col2 = new FieldColumn(); FieldColumn col3 = new FieldColumn(); field2.DataPath = "IndiceRango"; col2.Field = field2; field3.DataPath = "IndiceNacional"; col3.Field = field3; Grid1.Fields.Add(field2); Grid1.Fields.Add(field3); Grid1.Columns.Add(col2); Grid1.Columns.Add(col3); Grid1.DataBind(); Grid1.Fields[0].Title = "Provincia"; Grid1.Fields[1].Title = "Indice rango"; Grid1.Fields[2].Title = "Indice nacional"; ((FieldColumn)Grid1.Columns[0]).Style.Bold = true; // para una sola columna Grid1.ItemSettings.Style.HorizontalAlign = HorizontalAlign.Center;// para todos los items Grid1.SideBars[0].Side = SideBarSide.Bottom; } } protected void Grid1_DataBinding(object sender, EventArgs e) { TCtrInterrupciones interrupciones = new TCtrInterrupciones(); if (Session["Llamada"].ToString() == "Nulo") { DateTime Fecha1 = new DateTime(); DateTime Fecha2 = new DateTime(); Fecha1 = Convert.ToDateTime("20/02/06"); Fecha2 = Convert.ToDateTime("22/06/06"); DataSet DSInt = interrupciones.ReporteIndiceLineasNV("Nacional", Fecha1, Fecha2, "Circuitos Primarios"); DataView DV = new DataView(); DV = DSInt.Tables[0].DefaultView; Grid1.DataSource = DV; } Session["Llamada"] = "Nulo"; } protected void Grid1_PageIndexChanging(object sender, GridPageEventArgs args) { String sd = args.ToString(); int t = args.NewPageIndex; Grid1.DataBind(); Session["Llamada"] = "ok"; } protected void Grid2_Load(object sender, EventArgs e) { try { int pos = DevolverPosItemExp(); if (Session["Expandido"].ToString() != "True") { Grid Grid2 = (Grid)Grid1.Items[pos].DetailsCell.FindControl("Grid2"); ConfigurarGrid2(Grid2); Session["Llamada"] = "Nulo"; Session["Llamada"] = "BindingGrid2Exp"; Grid2.DataBind(); Grid2.ItemSettings.Style.HorizontalAlign = HorizontalAlign.Center;// para todos los items Session["Expandido"] = "True"; } else { Session["Expandido"] = "False"; } } catch { Session["Expandido"] = "False"; } } protected void Grid2_DataBinding(object sender, EventArgs e) { try { String prueba = Session["PrimeraLlamadaGrid2"].ToString(); } catch { Session["Expandido"] = "False"; Session["PrimeraLlamadaGrid2"] = "True"; } TCtrInterrupciones interrupciones = new TCtrInterrupciones(); if (Session["Llamada"].ToString() == "BindingGrid2Exp") { int pos = DevolverPosItemExp(); Grid Grid2 = (Grid)Grid1.Items[pos].DetailsCell.FindControl("Grid2"); String Prov = Grid1.Items[pos].DataValues["NombreProvincia"].ToString(); Grid2.DataSourceID = ""; DateTime Fecha1 = new DateTime(); DateTime Fecha2 = new DateTime(); Fecha1 = Convert.ToDateTime("20/02/06"); Fecha2 = Convert.ToDateTime("22/06/06"); DataSet DSInt = interrupciones.ReporteIndiceLineasNV(Prov, Fecha1, Fecha2, "Circuitos Primarios"); DataView DV = new DataView(); DV = DSInt.Tables[1].DefaultView; Grid2.DataSource = DV; } Session["Llamada"] = "Nulo"; } private void ConfigurarGrid2(Grid Grid2) { Grid2.LayoutType = GridLayoutType.Columnar; Grid2.Motif = GridMotif.Default; Grid2.Palette = GridPalette.Windows; Grid2.EnableFloatingBar = false; Grid2.Selection.Enabled = true; Grid2.Highlighting.Enabled = false; Grid2.Paging.PageSize = 10; Grid2.DataSourceID = ""; TextField field2 = new TextField(); NumberField field3 = new NumberField(); NumberField field4 = new NumberField(); NumberField field5 = new NumberField(); NumberField field6 = new NumberField(); NumberField field7 = new NumberField(); NumberField field8 = new NumberField(); FieldColumn col2 = new FieldColumn(); FieldColumn col3 = new FieldColumn(); FieldColumn col4 = new FieldColumn(); FieldColumn col5 = new FieldColumn(); FieldColumn col6 = new FieldColumn(); FieldColumn col7 = new FieldColumn(); FieldColumn col8 = new FieldColumn(); field2.DataPath = "FechaMes"; col2.Field = field2; field3.DataPath = "IndAnnoAntMes"; col3.Field = field3; field4.DataPath = "PlanMes"; col4.Field = field4; field5.DataPath = "Indice"; col5.Field = field5; field6.DataPath = "IndAnnoAntAcum"; col6.Field = field6; field7.DataPath = "PlanAcum"; col7.Field = field7; field8.DataPath = "IndAcumulado"; col8.Field = field8; Grid2.Fields.Add(field2); Grid2.Fields.Add(field3); Grid2.Fields.Add(field4); Grid2.Fields.Add(field5); Grid2.Fields.Add(field6); Grid2.Fields.Add(field7); Grid2.Fields.Add(field8); Grid2.Columns.Add(col2); Grid2.Columns.Add(col3); Grid2.Columns.Add(col4); Grid2.Columns.Add(col5); Grid2.Columns.Add(col6); Grid2.Columns.Add(col7); Grid2.Columns.Add(col8); Session["PrimeraLlamadaGrid2"] = "False"; } private int DevolverPosItemExp() { int j = 0; foreach (GridItem currItem in Grid1.Items) { if (currItem.Expanded) { return j; } j++; } j = -1; return j; } I have other 2 questions: What can I do to prevent the message
  5. julio15

    some questions

    Hello, How can I dynamically in C# create an expandable grid (detail table) from Grid1 (master table)? Are these two grids related through the primary key? 2. How can I change the message: No data in Grid?. 3. When I do a copy of the data contained in Grid1, and I want to see the next page I encounter the following difficulty: - The operation takes forever to materialize and the message : "it is taking a long to process your request..." comes on the screen. How can I avoid such a problem? Thanks, julio
  6. It is exactly what I needed. Thank you very much.Is it possible to assign to each Grid a dataset, and in this case, how can I configurate it with the fields that the dataset returns in C#?.Thanks,julio
  7. Hello, first thank you very much for the response.In the first case I wanted to ask you how can I get the position of the element that has been expanded by the user. For example, if the grid have five elements, I want to know who of the five was the expanded, which would be the x in the response that you gave to me (Grid1.Items[x]).In the second case I test it and it works very well.Sorry for my bad English, thank you very much again,Julio
  8. Hello, first thank you very much for the response. In the first case I wanted to ask you how can I get the position of the element that has been expanded by the user. For example, if the grid have five elements, I want to know who of the five was the expanded, which would be the x in the response that you gave to me (Grid1.Items[x]). In the second case I test it and it works very well. Sorry for my bad English, thank you very much again, Julio
  9. Hello.#1: I would like to know how I can obtain the index of the item that one wants to expand to gather information, for example:String Province = Grid1. Articles [0] .DataValues ["idProvincia"] .ToString ();In this case there is gathered the value of the first element but I don't know how to catch the value of the one that expands, that can be any position.#2: How I can do to get the values of an element in a detail table, since in the previous question I do it for the master table.Thank you, Julio
×
×
  • Create New...