Hi, I added RadioButton ItemTemlate column to my DataGrid, so I am getting one RadioButton column in each row in the Datagrid, but at any time only RadioButton should be seleted in the DataGrid. How can I do this. Regards, Chakravarthy.V
User 1804931
Posts
-
RadioButton as ItemTemplate in DataGrid -
Why string is reference data type.In .Net why is string is treated as reference type, it is a primitive datatype. All premitive datatype are value type except string why this is. Is there any spl reason. Regards, Chakravarthy.v
-
witdh of Dynamically generated BoundedC olumHi, Sorry for disturbing again, I excluded non string columns, still the text in the columns are not displaying properly i.e. text is not displaying in single line. . I didn’t understand this unusual behavior. Regards, Chakravrthy.v
-
witdh of Dynamically generated BoundedC olumHi, Thanks for your reply, but I am getting the following error. MaxLength applies to string data type only. You cannot set Column 'EmployeeID' property MaxLength to be non-negative number. Regards, Chakravarthy.V
-
witdh of Dynamically generated BoundedC olumHi, I tried the code that you send but it is not working, my actual code is like this. public void BoundColumns(DataTable table) { foreach(DataColumn c in table.Columns) { this.Columns.Add(CreateBoundColumn(c)); } } private BoundColumn CreateBoundColumn(DataColumn c) { BoundColumn column = new BoundColumn(); column.DataField = c.ColumnName; column.ItemStyle.Width = New Unit(200) column.HeaderText = c.ColumnName.Replace("_"," "); column.DataFormatString =setFormating(c); column.SortExpression=c.ColumnName; return column; } The problem with this code is all columns will have same length irrespecive of length. For ex the Employee id may have 5 char, Empname may have 50 char length, but in datagrid these two col will have same length and at design time we dont know the length of the columns. What i required is the record which is having maximum length in a perticular column, how to find this while databinding. Regards, Chakravarthy.V
-
witdh of Dynamically generated BoundedC olumHi, It is not working, this code will set all the bounded columns with same width, but I want to set the each bound column width depending on the maximum text length of the that perticular column in the Database. Regards, Chakravarthy.V
-
witdh of Dynamically generated BoundedC olumHi, I am creating BoundedColumns in a Datagrid dynamically, for this I am just passing the table object to a method which creates bounded columns. In this case how can I set the width of the BoundedColumns, because the default length of the each cell is equals to the length of the column headers text. How can I change this according to the maximum length of the text in that particular column? Regards, Chakravarthy.V
-
UserControl life cycleHi, This is the code that I written. I created one UserControl named UserControl1 this control contains one DropDownListBox, in this control I exposed one property named TableName. In the Page_Load() event of the UserControl I am calling SP_TABLE storedprocedure which takes TableName as a parameter. I am using this UserControl in my WebForm1 Page, and in the Page_Load event of the WebForm1 page I am setting the TableName property of the UserControl1 like this.TestControl is the Id of the UserControl1 in WebForm1. Control _myUC = this.FindControl("TestControl"); UserControl1 c = ((UserControl1)_myUC); c.TableName ="Currency_Master"; but this is code is not working, and If I set the TableName property in HTML editor it is working fine, is there anyting wrong in the code. Please help me out. Regards, Chakravarthy.V
-
UserControl life cycleCan anybody please tell me what is the Life Cycle of the UserControls. Because I exposed some propterties(Set properties) in my user control, I want to set the properties of the usercontrol from my WebFrom at design time and the values are not assigning.I am doing this by in pageLoad event of WebForm page. Please tell me where I find the life cycle of the usercontrols. Regard, Chakravarthy.V
-
Table name as parameterHi, I tested it but it is causing some problems, can you please verify this because this query is imp for me. Initially I tested this code only by passing the code then it worked fine. Regards KLAYAN
-
Table name as parameterHi, It is working fine, thank you very much. Regards, Chakravarthy.v
-
Table name as parameterHi, Can I pass table name as a parameter to an stored procedure. Please is there any round the way to do this. Regards, Chakravarthy.V
-
Getting element by passing string in javascriptHi, In javascript is it possible to get the element by passing the string variable. Is there any way to do this.(I want to get it by passing a string variable only) Example. var ElementName ="ComboBox1"; this.form.getElementById(ElementName); Regards, Chakravarthy.v
-
Removing Top attribute for webform controlsHi, How can I remove the 'Top' attribute of all controls in the form dynamically i.e. I want to do this before render. First I want to check weather the type of control is web control or not, because in my form I have some user controls also. I tried it with using form.controls, but it is giving invalid cast exception. How can I do this? Regards, Chakravarthy.V
-
Adding footer control to the page Dynamically.Hi, I created one footer user control, and want to load that control dynamically.I have one BasePage class in my application, it is the base page for all web forms. In the base page overridden Render, onPreRender events. I tried to add the footer control in both methods and it is not working properly. Problem is that the footer control is adding between the page controls, but I want it to be at the bottom in the webpage (I tried it using writer object and also adding to form control using Add,AddAt methods). Please provide suggestions. Regards, Chakravarthy.v
-
Need help in JavascriptHi, In my user control, I have two DropDownList boxes(two instances of DropDownList user control) and this DropDownList box itself an usercontrol. It is not possible to set from the .cs file. I want to set it from JavaScript only. Reagrds, Chakravarthy.v
-
Render method.I also did the same thing, but I got the following exception. Control '_ctl0_DropDownList1' of type 'DropDownList' must be placed inside a form tag with runat=server. In my UserControl I have one DropDownList box. Can you please tell me why this error is occurred? Regards, Cahakravarthy.V
-
Render method.Hi, Is it possible to add a usercontrol to the page in onPreRender() event. I am trying to add a user control in onPreRender event but the control is adding after the tag. I want the control to be first control in the page.I don’t want to register the control. In the same way I want to add user control before the . I want to keep this functionality in one routine so it can be used for all the webpages. Is it possible to manipulate the writer object which is passed as a parameter to the render method. Regards. Chakrvarthy.V
-
Recarding problemsI have a cable connection and TV tunner card in my Desktop, but when I am recarding the programmes it is taking lots of space ex for 1 min recording it is taking 150MB space, is there any softwares to reduce the size while recording. Regards, Chakravarthy.
-
Setting a column to non editable in Excel file from C#I want to read an Excel file from C# (or) Asp.Net, but the Excel file may be password protected, so how to know that the file is password protected or not. When writing data in to an Excel file is it possible to make the column not editable, if possible how to do this. I want to know How to do this in Excel file also. Regards, Chakravarthy