Hi, Create an GridVew say it's ID (grdEmployee) with 5 columns at design time and make the last three ItemTemplates visible false. and set AutoGenerateColumns property to false only. And In Page_Load event based on ur req. display ur columns by using following syntax: if u need to display 3rd ItemTemplate use the following code snippet: grdEmployee.columns(2).Visible = true if u need to display 4th ItemTemplate use the following code snippet: grdEmployee.columns(3).Visible = true if u need to display 5th ItemTemplate use the following code snippet: grdEmployee.columns(4).Visible = true
ssurya4u
Posts
-
Dynamic item tempalte with different control in datalist -
Server Error - Operation must use an updateable queryhttp://www.eggheadcafe.com/community/aspnet/6/10021386/operation-must-use-an-upd.aspx[^] Use the above link to fix ur problem.
-
Server Error - Operation must use an updateable query -
insert datettime problemHi, try with the following statement for inserting value into Datetime field string sttiming = DateTime.Parse(DateTime.Today.ToShortDateString(), System.Globalization.CultureInfo.CreateSpecificCulture("en-US").DateTimeFormat) instead of ur DateTime dttimenow = DateTime.Now; dttimenow.ToShortTimeString(); lbtime.Text = dttimenow.ToShortTimeString(); string sttiming = lbtime.Text; code.
-
sql Update command ErrorIn "tblSave" table, if CWords and WPM columns are of VarChar Datatype then you have to alter update query as below: 'UPDATE tblSave SET Level='" & level & "',Exercise='" & exercise & "',CWords='" & CW & "',FWords='" & FWds & "',WPM='" & RCW & "',SpanTime='" & SpanTime & "' WHERE tblSave.UserName='" & CurrentUser & "'" And For Level, Excercise, FWords and SpanTime columns ur giving one space after single quote, if the query runs successfully that space will also insert into the database.