Dear Mr.Padmanabhan Thanks for tip and has worked for me kris
kris_viswa
Posts
-
Editing in gridview -
Editing in gridviewHi experts I have googled for tips/solutions and failed to get a right method to implement following scenario. I have a gridview populated with data on page load from my source table. To make it precise I have fields Ac_Id, Ac_Name, Balance, and user_Id in my table. The user_Id and Ac_Id forms the composite key. I have say 3 rows in my table as follows 1, Cash, 1000, ABC 2. CITI, 8000, ABC 3. BOA , 6000, ABC While editing in grid I want let user edit only the balance field if Ac_Name is Cash otherwise User can Edit both Ac_Name and Balance. whle I could make both ac_name and Balance field editable but failed to achive above. Advise is solicited Thanks in advance and regards Kris
-
Use of Javascript in ajax enabled Asp.net content pagesThanks Mark let me try calling function directly from script file referenced in masterpage. kris
-
Use of Javascript in ajax enabled Asp.net content pagesHi Gurus I am new to web programming and I started working with Asp.net 3.5 vwd express edition with ajax tool kit.For about a week now I screened most of articles on use of javascript in asp.net and following is suggested. 1. Use external script file and refer in masterpage and call from content pages by registerclientsciptblock On Master page it refered as follows" <script> 2.Place Java script functions in content place holders and refer them by adding attributes to controls. I tried using following function refering it in the clientvalidationfunction <asp:CustomValidator ID="CustomValidator1" runat="server" ErrorMessage="Enter Loan Account Name" ClientValidationFunction="chkloanac" OnServerValidate="Chk" ControlToValidate"TxtLoanSource" </asp:CustomValidator> <script type="text/jscript"> function chkloanac(source, arguments) { var Bal = document.getElementById("<%=TxtBalDebt.ClientID%>"); var acname = document.getElementById("<%=TxtLoanSource.ClientID%>"); if (Bal.value > 0 && (acname.value == 'NA' || acname.value == '')) arguments.IsValid = true; else arguments.IsValid = false; } 3.Build script strings and make call from code behind.example Dim sb As New System.Text.StringBuilder() sb.Append("") sb.Append("alert('Save Successful');") sb.Append("") ScriptManager.RegisterStartupScript(Me, Me.GetType(), "Alert", sb.ToString(), False) All my pages are using ajax controls or extenders and i observe the folllowing. When I use method-1 and try register the code block, the image placed in a panel for controlling collapsable panel do not load. Method-2 is not working at all I created a function to refer in custom validation control which would not fire Only mehod-3 is working which again has limitation for using long functions I request an expert guidence on above subject with known issues and limitations if any.Preferably wih a working example on method-1 or method-2 Thanks in advance Kris
-
Try Catchhi I am posting code wherein i am populating my datatable from an excel sheet and reading the sheet name through the user input in textBox5. Inspite of wrong value in the textbox my catch code do not execute and instead the default error page is displayed where as the expected routine is that it displays the message in lblmessage so that user corrects the entry. Try query = "SELECT * FROM [" & TextBox5.Text & "$]" 'Create the connection object conn = New OleDb.OleDbConnection(connString) 'Open connection If conn.State = ConnectionState.Closed Then conn.Open() 'Create the command object cmd = New OleDb.OleDbCommand(query, conn) da = New OleDb.OleDbDataAdapter(cmd) ds = New DataSet() da.Fill(ds) Catch ex As Exception lblMessage.Visible = True lblMessage.Text = (ex.ToString()) Finally conn.Close() End Try may i request guidance from experts to understand the above problem thanks in advance kris
-
Font growing on server transferHi all I find that on server transfer the size of font originally defined for html text is growing. I don't think this should be the behavior and what is the remedy to ensure that my page has consistent look. kris
-
Manupulating Columns of datatableHi pranay thanks for response. what you explained is all about connection and fetching data to data table which is ok. My actual requirement starts there after. I would like to explain the requirements stepwise here 1.Establishing connection to db and populating data table 2.Reading the column names of the data table and retaining only columns and data which user has specified as mapping fields in page, which too may not be in sequence. 3.Adding few more columns dynamically to data table with default values 4.finally binding data to grid for user editing and final saving to db thanks kris
-
Manupulating Columns of datatableHi experts I have designed my page to allow users to upload excel/csv files and I am interested to capture the data from only few columns of these files. The column names of the files varies from user to user hence i created the form to obtain the column names of user's file for mapping to my database. Now my requirement is that I want to first read the column names of uploaded file and retain only columns and data which are matching to the user entered column names for mapping. clues or guidance solicited preferably in vb.net thanks in advance kris