We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

grid column

I'm using this code to get data into grid.
I would like to show only data in grid without column name. How?

SqlConnection conn = null;
conn = new
SqlConnection(sConn);
conn.Open();
SqlCommand cmd = new SqlCommand();
cmd.CommandText = "dbo.[GetClanImeiPosudbe]";
cmd.CommandType = CommandType.StoredProcedure;
cmd.Connection = conn;
cmd.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Sifra", System.Data.SqlDbType.Int, 16));
cmd.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Ime", System.Data.SqlDbType.NVarChar, 50, System.Data.ParameterDirection.Output, true, ((System.Byte)(0)), ((System.Byte)(0)), "serverName", System.Data.DataRowVersion.Current, null));
cmd.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Prezime", System.Data.SqlDbType.NVarChar, 50, System.Data.ParameterDirection.Output, true, ((System.Byte)(0)), ((System.Byte)(0)), "databaseName", System.Data.DataRowVersion.Current, null));

cmd.Parameters["@Sifra"].Value = txtSifra.Text;
cmd.ExecuteNonQuery();

grid.Grid.DataMember = "";


SqlDataAdapter adap = new SqlDataAdapter();
adap.SelectCommand = cmd;
DataTable dt = new DataTable();
adap.Fill(dt);
grid.Grid.DataSource = dt;

4 Replies

SS Suresh Sekarean Syncfusion Team October 8, 2007 01:26 PM UTC

Hi Hrvoje,

Column headers can be hidden using the property, 'ShowColumnHeaders' of GridGroupingControl which is available in the TopLevelGroupOptions Category.

Please refer the below code snippet.

[C#]

this.GridGroupingControl1.TopLevelGroupOptions.ShowColumnHeaders = false;

Thanks for using Syncfusion products.

Please let us know if you need more info.

Regards,
Sureshsekaran.


HV Hrvoje Voda October 9, 2007 02:12 PM UTC

I don't have that option under grid.


SS Suresh Sekarean Syncfusion Team October 19, 2007 02:17 AM UTC

Hi Hrvoje,

Please let us know the Syncfusion Essential Studio Version that you have used.

Please refer the below sample which illustrates hiding the column header of GridGroupingControl and let us know if you have any issues.

http://websamples.syncfusion.com/samples/Grid.Web/5.2.0.25/F68731/main.htm

Sorry fro the inconvenience caused.

Regards,
Sureshsekaran.


HV Hrvoje Voda October 19, 2007 09:47 PM UTC

I'm using 4.2.0.37 version.
I still can't get it to work without header column name.

Loader.
Live Chat Icon For mobile
Up arrow icon