摘要: Private Sub xlsout1_Click() '导出Excel文档 If rs1.RecordCount 2 Then If Not .EOF Then .MoveNext End If DoEvents outstate1.Caption = "正在导出,完成: " + CStr(Int(100 * (iRow - 2) / iRowCo... 阅读全文
posted @ 2009-06-08 09:04 栢芯 阅读(741) 评论(0) 推荐(0) 编辑
摘要: Private Sub docout_Click() '导出WORD按钮 If rs1.RecordCount < 1 Then MsgBox "导出失败,当前列表中没有记录!" outstate1.Visible = False Exit Sub End IfOn Error GoTo not_installword '当没装word软件时的出错处理If MsgBox(Chr(13) + ... 阅读全文
posted @ 2009-06-08 09:03 栢芯 阅读(1417) 评论(0) 推荐(0) 编辑
摘要: private void BindGrid(){ for (int i = 0; i < this.dgSmsFilters.Items.Count; i++) { this.dgSmsFilters.Items[i].Attributes.Add("onMouseOver", "this.style.backgroundColor='#CDDAFF'... 阅读全文
posted @ 2009-06-05 10:05 栢芯 阅读(228) 评论(0) 推荐(0) 编辑
摘要: (转)前些日子在公司的一个项目中,要用到DataGrid自带的删除功能,并且实现分页,原以为很简单的,但却偏偏困扰了我们组的所有人!每当删除一条记录后要退回到前一页时,便出现了“无效的 CurrentPageIndex 值。它必须大于等于 0 且小于 PageCount。”错误。单步调试并跟踪进去,方才发现,问题出在了DataGrid.DataBind();的时候。我调了一下DataBind()之... 阅读全文
posted @ 2009-06-05 10:01 栢芯 阅读(298) 评论(0) 推荐(0) 编辑