Dear all, I have 3 buttons placed one above the other inside template of gridvew. I want to the buttons one after the other on click on them like cards. Can any one give the code or give me sollution?
sanjay kumar samantaray
Dear all, I have 3 buttons placed one above the other inside template of gridvew. I want to the buttons one after the other on click on them like cards. Can any one give the code or give me sollution?
sanjay kumar samantaray
dear all , i want to change the color of gridview's cell dyanamically, default color is green. on click on green cell it should be yellow. on click on yellow cell it sould be red. clicking on red cell the color should get changed to green
sanjay kumar samantaray
type priortity status --------------------------------------- bug low postponed bug low yy bug medium xx bug1 low xx bug1 high postponed --------------------------------------- The above table's data is required in following format as grouped data and needs to be displayed in a datatable or gridview. Can anyone give me code. --------------------------------------- low postponed bug yy --------------------------------- medium xx ---------------------------------------- low xx bug1 -------------------------------- high postponed
sanjay kumar samantaray
Dear All, I have a gridview where first 2 columns are bound fields. Next 3 columns have template fields with textboxes which are requiered to be filled by user. i want if user does not provide any value, should be informed then and there through javascript. I have written one which displays message but focus moves to next field. I have given my code below. Please help me. Thanks; ----------------------------- var gridViewCtlId = '<%=gridview1.ClientID%>'; var gridViewCtl = null; var curSelRow = null; var curRowIdx = -1; function getGridViewControl() { if (null == gridViewCtl) { gridViewCtl = document.getElementById(gridViewCtlId); } } function onGridViewRowSelected(rowIdx) { var selRow = getSelectedRow(rowIdx); if (null != selRow) { curSelRow = selRow; var cellValue = getCellValue(rowIdx, 0); alert(cellValue); } } function getSelectedRow(rowIdx) { return getGridRow(rowIdx); } function getGridRow(rowIdx) { getGridViewControl(); if (null != gridViewCtl) { return gridViewCtl.rows[rowIdx]; } return null; } function getGridColumn(rowIdx, colIdx) { var gridRow = getGridRow(rowIdx); if (null != gridRow) { return gridRow.cells[colIdx]; } return null; } function getCellValue(rowIdx, colIdx) { var gridCell = getGridColumn(rowIdx, colIdx); switch(gridCell.childNodes.item(0).value) { case "": gridCell.childNodes.item(0).focus(); alert("Please enter the value"); break; return false; default: return true; } } -------------------------------- Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load If Not Page.IsPostBack Then LoadGridData() End If For Each row As GridViewRow In GridView1.Rows rowIndex = rowIndex + 1 For ctr = 0 To 4 CType(row.FindControl("Textbox" + (ctr + 1).ToString), TextBox).Attributes("onblur") = "javascript: return getCellValue(" + rowIndex.ToString() + "," + ctr.ToString() + ")" Next Next End Sub
sanjay kumar samantaray
Dear All, I have a gridview where first 2 columns are bound fields. Next 3 columns have template fields with textboxes which are requiered to be filled by user. i want if user does not provide any value, should be informed then and there through javascript. I have written one which displays message but focus moves to next field. I have given my code below. Please help me. Thanks; <%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" %> Untitled Page
var gridViewCtlId = '<%=gridview1.ClientID%>'; var gridViewCtl = null; var curSelRow = null; var curRowIdx = -1; function getGridViewControl() { if (null == gridViewCtl) { gridViewCtl = document.getElementById(gridViewCtlId); } } function onGridViewRowSelected(rowIdx) { var selRow = getSelectedRow(rowIdx); if (null != selRow) { curSelRow = selRow; var cellValue = getCellValue(rowIdx, 0); alert(cellValue); } } function getSelectedRow(rowIdx) { return getGridRow(rowIdx); } function getGridRow(rowIdx) { getGridViewControl(); if (null != gridViewCtl) { return gridViewCtl.rows[rowIdx]; } return null; } function getGridColumn(rowIdx, colIdx) { var gridRow = getGridRow(rowIdx); if (null != gridRow) { return gridRow.cells[colIdx]; } return null; } function getCellValue(rowIdx, colIdx) { var gridCell = getGridColumn(rowIdx, colIdx); if (null != gridCell) { alert(gridViewCtlId) return gridCell.innerText; } return null; } If i call it as: For Each row As GridViewRow In GridView1.Rows CType(row.FindControl("Textbox1"), TextBox).Attributes("onclick") = "javascript: return getCellValue("+row.rowindex.toString()+",1)" It shows the heading of 2nd column only if i click on first row. 2nd row onwards it does not show any value. <div class="ForumSig">sanjay kumar samantaray</div></x-turndown>
Dear All, I want to create a template field say texbox inside a gridview to accept marks in different 5 subjects. Marks fields should not be blank. i want to have java script to check each textbox at client side only.
sanjay kumar samantaray
Thanx for your reply. Now i am getting only the column heading of 2nd column. how could i display each cell's value of 2nd column. Dialog box appears without any text. Thanx . -- modified at 2:05 Saturday 1st September, 2007
sanjay kumar samantaray
var gridViewCtlId = '<%=gridview1.ClientID%>'; var gridViewCtl = null; var curSelRow = null; var curRowIdx = -1; function getGridViewControl() { if (null == gridViewCtl) { gridViewCtl = document.getElementById(gridViewCtlId); } } function onGridViewRowSelected(rowIdx) { var selRow = getSelectedRow(rowIdx); if (null != selRow) { curSelRow = selRow; var cellValue = getCellValue(rowIdx, 0); alert(cellValue); } } function getSelectedRow(rowIdx) { return getGridRow(rowIdx); } function getGridRow(rowIdx) { getGridViewControl(); if (null != gridViewCtl) { return gridViewCtl.rows[rowIdx]; } return null; } function getGridColumn(rowIdx, colIdx) { var gridRow = getGridRow(rowIdx); if (null != gridRow) { return gridRow.cells[colIdx]; } return null; } function getCellValue(rowIdx, colIdx) { var gridCell = getGridColumn(rowIdx, colIdx); if (null != gridCell) { alert(gridViewCtlId) return gridCell.innerText; } return null; } I i call it as: For Each row As GridViewRow In GridView1.Rows CType(row.FindControl("Textbox1"), TextBox).Attributes("onclick") = "javascript: return getCellValue(0,1)" it works... But how to pass dynamic value in place of 0 and 1 <div class="ForumSig">sanjay kumar samantaray</div></x-turndown>
Generally i use this to associate the java scrpt with a button. Private Sub Page_Load(ByVal sender As System.Object, _ ByVal e As System.EventArgs) Handles MyBase.Load If (Not Page.IsPostBack) Then Me.btnSave.Attributes.Add("onclick","return validate();") End If End Sub But if the button is in side a gridview's footer control how can i do this?
sanjay kumar samantaray
My prime objective is to create one asp.net application to send fax. For which i have written the following code , and added the reference of required DLL called (fsxcomex.dll). But still i am not being able to rectify the following errors. FAXCOMEXLib.FaxServer not defined. FAXCOMEXLib.FaxDocument not defined . so alternatively i tried to create Activex object for it . But it didn't work. Here is my Complete Code : Seeking immediate respone . Thanx in advance. Dim faxServer As Object faxServer = CreateObject("FAXCOMEXLib.FaxServer") Dim faxDoc As Object faxDoc = CreateObject("FAXCOMEXLib.FaxDocument") ' Dim faxServer As FAXCOMLib.FaxServer = New FAXCOMLib.FaxServerClass faxServer.Connect(Environment.MachineName) ' Dim faxDoc As FAXCOMLib.FaxDoc = CType(faxServer.CreateDocument(path), FAXCOMLib.FaxDoc) faxDoc.RecipientName = RecipientName faxDoc.FaxNumber = FaxNumber faxDoc.DisplayName = DocumentName faxDoc.SenderName = "SenderName " faxDoc.SenderCompany = "SenderCompany " Dim Response As Integer = faxDoc.Send faxServer.Disconnect()
sanjay kumar samantaray
dear all i want to display the following structure inside grid. First Previous 1 of 10(inside a text box) Next Last or << < 1 of 10 > >> Can anyone help me with source/example/steps.
sanjay kumar samantaray
Dear Friends, I have a web application,in which I need a paging in Grid view which has to have following output: First Prev 1 2 3 4 5 Next Last I have done Paging with the following format- 1 2 3 ... >> or << ... 2 3 4 But can anyone help me ,how to show numeric links,also limited no. of numeric links can be visible(3 ta a time) with string values. Thanking You
sanjay kumar samantaray
Please send it to : sanjaya_samantaray@rediffmail.com Thanks
sanjay kumar samantaray
Dear all, I have created on grid view which shows out put as follows: 1 2 3 ... >> or << ... 2 3 4 >> But I require the output as follows: << < 3 4 5 > >> or First Prev 3 4 5 next Last Thanks,
sanjay kumar samantaray