I am looking to incorporate the Excel Like Grouping on the columns of my grid view, Can this be done using the standard .net functionalities, if not can anyone recommend a 3rd party component library with features like this.
this is my error
i change textbox at gridview to dropdownlist (tempaltefield)
string connString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=DB.mdb";
OleDbConnection con = new OleDbConnection(connString);
OleDbCommand cmd = new OleDbCommand();
cmd.CommandText = "UPDATE Pay SET pay_sup_name=@pay_sup_name,pay_value=@pay_value,pay_check_No=@pay_check_No WHERE pay_id=@pay_id";
Unable to cast object of type 'System.Web.UI.LiteralControl' to type 'System.Web.UI.WebControls.TextBox
Error in itself is quite straight forward.
You are directly casting controls from Grid cells into a defined type. One of the conversion is not correct. There is a Literal control instead of a textbox. A simple use of Visual Studio debugger will tell the line of code. Once you know, just handle it properly.
If you are using ASP.NET AJAX and have UpdatePanel then you can use UpdateProgress for the same.
In case you are not using UpdatePanel then you can raise a onClientClick event of the submit button. In this client side event, show a div over the page with higher z-index. Once the update is done, hide back the div.
I had similar problem with storing very long numbers in excel. I solved it by putting a single quote (') in front of the number. This way it was able to display the number properly and could also take this number in account in formulas and computations. Perhaps this trick could work on dates too. try putting '01 Jan 2012 in the excel and see if excel could recognize it as date.
Sadly, I don't have excel on this computer otherwise i would have tried it before posting.
Twenty years from now you will be more disappointed by the things that you didn't do than by the ones you did do. So throw off the bowlines. Sail away from the safe harbor. Catch the trade winds in your sails. Explore, Dream. Discover.
Last Visit: 31-Dec-99 18:00 Last Update: 24-Jul-16 8:48