I am using Datagrid to show data.I am also using header template to show column headers. Now I want to have one row above the header which contains the name of the datagrid and colspan="no of columns" which can be achieved in HTML table. How can i do in Datagrid ?? Any ideas??:confused: Thanx in advance.
rujuc
Posts
-
DataGrid Cell Merging -
Validation ControlsValidation group will solve your problem ...check out this .. <asp:TextBox ID="TextBox1" Runat="server" ValidationGroup="First"></asp:TextBox> <asp:TextBox ID="TextBox2" Runat="server" ValidationGroup="First"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" Runat="server" ValidationGroup="First" ErrorMessage="TextBox1 should not be blank" ControlToValidate="TextBox1"> </asp:RequiredFieldValidator> <asp:Button ID="Submit1" Runat="server" ValidationGroup="First" Text="Submit 1" /><asp:TextBox ID="TextBox3" Runat="server" ValidationGroup="Second"></asp:TextBox> <asp:TextBox ID="TextBox4" Runat="server" ValidationGroup="Second"></asp:TextBox> <asp:RequiredFieldValidator ID="RequiredFieldValidator2" Runat="server" ErrorMessage=" TextBox3 should not be blank" ControlToValidate="TextBox3" ValidationGroup="Second"> </asp:RequiredFieldValidator> <asp:Button ID="Submit2" Runat="server" ValidationGroup="Second" Text="Submit 2" />
-
Serial NoUse this formula for the serial number column of the DataGrid (PageIndex * pagesize) + ItemIndex +1
-
Gridview Column widthTry this dgTableCreator.HeaderRow.Cells[1].Width = System.Web.UI.WebControls.Unit.Pixel(50)
-
Gridview Column widthUse <ItemStyle Width="100px"></ItemStyle> for your particular column. happy coding!!!!:)
-
Disapear slnhi Compile your project once, you will see .sln file under your folder. It will not appear in solution explorer. And wht do you want to do with .sln file???:confused::omg:
-
Syntax error converting datetime from character string.Hi szukuro Thanx for your suggestion. But your tric was not working for my solution. Some how i modified my stored procedure. Is this the correct way?? can we optimized it?? CREATE PROCEDURE ic_get_processeddata ( @frmDate DateTime, @toDate DateTime, @empType varchar(20), @ein varchar(15) ) as if(@empType !='') and (@ein !='') begin select EIN,empName,empType,I2C,callAnswered,I2CPer,USLeaves,CBF,SOS,SOI,FCR,Bonus from ic_process where frmDate=@frmDate and toDate=@toDate and empType=@empType and ein=@ein order by empType,empName end else if (@empType !='') and (@ein ='') begin select EIN,empName,empType,I2C,callAnswered,I2CPer,USLeaves,CBF,SOS,SOI,FCR,Bonus from ic_process where frmDate=@frmDate and toDate=@toDate and empType=@empType order by empName,empType end else if(@ein !='') and (@empType ='') begin select EIN,empName,empType,I2C,callAnswered,I2CPer,USLeaves,CBF,SOS,SOI,FCR,Bonus from ic_process where frmDate=@frmDate and toDate=@toDate and ein=@ein order by empName,empType end else begin select EIN,empName,empType,I2C,callAnswered,I2CPer,USLeaves,CBF,SOS,SOI,FCR,Bonus from ic_process where frmDate=@frmDate and toDate=@toDate order by empName,empType end GO
-
Syntax error converting datetime from character string.I ve written a stored procedure to fetch data from a table. Here i m getting an error "Syntax error converting datetime from character string.". Please guide me. ////////////////////////////////////////////////////////////////////////// CREATE PROCEDURE ic_get_processeddata ( @frmDate DateTime, @toDate DateTime, @empType varchar(20), @ein varchar(15) ) as declare @sqlStr as varchar(255) set @sqlStr ='' set @sqlStr='select EIN,empName,empType,I2C,callAnswered,I2CPer,USLeaves,CBF,SOS,SOI,FCR,Bonus from ic_process where frmDate='+@frmDate+' and toDate='+@toDate if(@empType !='') begin set @sqlStr = @sqlStr + ' and empType=' + @empType end if(@ein !='') begin set @sqlStr = @sqlStr + ' and EIN='+@ein end set @sqlStr = @sqlStr + (' order by empName,empType') print(@sqlStr) exec @sqlStr GO thanx in advance
-
doubt about ds.Tables[0].DefaultViewds.Tables[0].DefaultView referes to opening view or customized view of the table that may include a filtered view, or a cursor position.
-
Remember Username and PasswordHi Socheat If your are using .net 2.0 then go for login control. Usage of this control is explained here http://www.codeproject.com/useritems/Remember_me_next_time.asp[^] Otherwise use cookies to store username and password and next time fetch their values from there. Hope this will help you.
-
online examhey try this http://www.geekinterview.com/Interview-Questions/Microsoft[^] all d best for ur exam.:)
-
validating a dateUse this function for date validation. //Date validator public static bool validateDateTime(object _datetime) { try{ DateTime testdate = DateTime.Parse(_datetime as string); return true; } catch{ return false; } }
-
Help with parametersYou can solve your problem by taking help from this link http://www.nigelrivett.net/SQLTsql/TableNameAsVariable.html[^] cheers!! :)
-
HyperLinkInstead of www.rediff.com, use http://www.rediff.com and it will work fine. :)