/* ------------------------ My Meta Content Here SEO ------------------------ */

Pages

Main Menu

Friday, April 15, 2011

VB.NET Sorting in Data Grid View

For Each c In Me.DataGridView1.Columns c.SortMode = DataGridViewColumnSortMode.NotSortable Next This is the DataGridView handler you need to capture the button click event. this.dgvList.CellContentClick += new DataGridViewCellEventHandler(DGV_CellContentClick); This is the button click handler example #region DGV_CellContentClick public void DGV_CellContentClick(object sender, DataGridViewCellEventArgs e) { int selectedRowIndex = int.Parse(e.RowIndex.ToString()); if...
Read More »

Tree View Control in vb.net Code Example

protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) PopulateRootLevel(); } private void PopulateRootLevel() { SqlConnection objConn = new SqlConnection("Data Source=1.1.1.1;Initial Catalog=DREER_EDUCANDOS2006;User ID=sre_web;Password=xxx"); SqlCommand objCommand = new SqlCommand("select id_deficiencia,descricao,(select count(*) FROM NecessidadesEspeciais WHERE id_deficiencia_pai=sc.id_deficiencia) childnodecount FROM NecessidadesEspeciais sc...
Read More »

My Blog List