Geeks With Blogs
Rodney Vinyard - .NET & SQL Developer When all is said and done, more will be said than done GridView, Datagrid, DataList & Repeater
Capture DataGridView CheckBox Checked event on a WinForm
private void dgv_CellContentClick(object sender, DataGridViewCellEventArgs e) { try { int row = e.RowIndex; int col = e.ColumnIndex; if (dgv.CurrentCell is System.Windows.Forms.DataGr... { DataGridViewCell cell = dgv.CurrentCell; DataGridViewCheckBoxCell checkCell = (DataGridViewCheckBoxCell)d... //-------------------------... // //-------------------------... bool newBool = (bool) checkCell.EditingCellFormat... ......

Posted On Wednesday, April 13, 2011 11:19 AM

ASP.NET Export n GridViews to Excel
ASP.NET Export n GridViews to Excel Thanks to awesome article by Matt Berseth http://mattberseth.com/blog... http://forums.asp.net/t/152... //Web Page Call to ExcelExport Class protected void lnkExport_Click(object sender, EventArgs e) { //creating the array of GridViews and calling the Export function GridView[] gvList = new GridView[] { gvPlateList, gvPlateDetails }; ExcelExport.Export("Deliver... gvList); } //ExcelExport Class using System; ......

Posted On Friday, March 25, 2011 1:51 PM

ASP.NET Conditionally Change ButtonField text at runTime
ASP.NET Conditionally Change ButtonField text at runTime <asp:ButtonField CommandName="Edit" HeaderText="" Text="Edit" ButtonType="Link" /> protected void gvRequests_RowDataBound(object sender, GridViewRowEventArgs e) { if (e.Row.RowType == DataControlRowType.DataRow) { //-------------------------... // If status = "Saved", change buttonField.LinkButton.Text to "Copy" //-------------------------... if (e.Row.Cells[(int)gCol.Stat... == "Saved") ......

Posted On Tuesday, March 1, 2011 8:28 AM

windows datagridview hide cell CellPainting
Private Sub dgCompounds_CellPainting(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGr... Handles dgCompounds.CellPainting Try '--------------------------... 'if POS = <blank> , hide 'Punch' checkbox in cell '--------------------------... If e.RowIndex > -1 And e.ColumnIndex > -1 Then If Me.dgCompounds.Columns(e.Co... ......

Posted On Wednesday, October 20, 2010 9:56 AM

create a WinForms DataGridView checkbox column via databinding on dummy a SQL column
create a WinForms DataGridView checkbox column via databinding on dummy a SQL column select (Cast((SELECT 0 AS Active) as Bit)) AS [myCheckBox Column]

Posted On Tuesday, May 11, 2010 11:43 AM

Get a Weak or Strong DataTable Row from a selected DataGridView row.
Get a Weak or Strong DataTable Row from a selected DataGridView row. Private Sub btnGetDataGridViewSelectedR... sender As System.Object, ByVal e As System.EventArgs) Handles btnGetDataGridViewSelectedR... '--------------------------... 'Find the first selected row (should only be zero or one since DataGridView1.SelectionMode = FullRowSelect) '--------------------------... ......

Posted On Friday, November 13, 2009 12:59 PM

DataGridView CSV Editor
DataGridView CSV Editor · Load CSV File into Dataset -> DataGridView · Show cells with Validation Errors with backcolor & tooltip · Right-Click cell to correct cell via tooltip · Restrict KeyPress Keys · Show cell as “edited” via cell backcolor Public Function GetCSVDataTable(ByVal filePath As String) As DataTable ' The dataset to return Dim dt As DataTable = Nothing Try '--------------------------... ' Create "Excel Like" Column Headers '--------------------------... ......

Posted On Monday, November 2, 2009 8:10 AM

Gantt Chart - EventCalendarControl

Gantt Chart - EventCalendarControl

http://www.codeproject.com/KB/webforms/EventCalendarControl.aspx

Posted On Thursday, April 3, 2008 11:42 PM

GridViewRow Edit, disable column(s)
When user clicks GridViewRow Edit, depending on the data in the GridViewRow, enable/disable column(s) Protected Sub GridView1_RowDataBound(ByVal sender As System.Object, ByVal e As System.Web.UI.WebControls.G... Handles GridView1.RowDataBound If e.Row.RowType = DataControlRowType.DataRow Then Dim Offline_MediaId As Integer = Integer.Parse(e.Row.Cells(1... If Offline_MediaId > 4 Then 'Dim textBox As TextBox = CType(e.Row.FindControl("tx... TextBox) 'textBox.Enabled ......

Posted On Tuesday, March 4, 2008 7:28 AM

ASP.NET Sort List Control
ASP.NET Sort List Control Protected Sub btnLeft_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnLeft.Click While (Me.lsRight.Items.Count > 0 And Me.lsRight.SelectedItem IsNot Nothing) Dim selectedItem As ListItem = Me.lsRight.SelectedItem selectedItem.Selected = False Me.lsLeft.Items.Add(selecte... Me.lsRight.Items.Remove(sel... End While SortListControl(lsLeft, True) SortListControl(lsRight, True) End Sub Protected Sub btnRight_Click(ByVal sender As System.Object, ......

Posted On Thursday, February 14, 2008 7:03 AM

Multi select Dropdown list in ASP.NET
http://www.codeproject.com/aspnet/MultiSelectDropdownList.asp

Posted On Tuesday, April 24, 2007 9:44 AM

Change Datagrid Header At RunTime
Private Sub dgList_ItemDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.D... Handles dgList.ItemDataBound If e.Item.ItemType.ToString() = "Header" Then '--------------------------... ' rename DataGrid Columns '--------------------------... Dim i As Integer Dim objDataViewerAPI = New DataViewerAPI For i = 0 To e.Item.Cells.Count - 1 Dim ColumnNameRaw ......

Posted On Wednesday, April 11, 2007 1:53 PM

Complex Repeater and DataList Controls Made Simple

excellent original article by Michael Libby:

ttp://aspalliance.com/811_Complex_Repeater_and_DataList_Controls_Made_Simple

Posted On Wednesday, April 4, 2007 9:44 AM

Making Rows in an Editable DataGrid Un-Editable
Making Rows in an Editable DataGrid Un-Editable original article by : Scott Mitchell http://datawebcontrols.com/... Private Sub dgSchedules_ItemDataBound(B... sender As Object, ByVal e As System.Web.UI.WebControls.D... Handles dgSchedules.ItemDataBound If e.Item.ItemType = ListItemType.Item Or e.Item.ItemType = ListItemType.AlternatingItem Then 'Columns {templateColumn = 0, Date, Amount, BU_Name, BU_Id = 4} Dim bu As String = e.Item.Cells(4).Text ......

Posted On Thursday, January 4, 2007 2:13 PM

Copyright © Rodney Vinyard | Powered by: GeeksWithBlogs.net