Hello, I wish to merge horizontally and/or vertically cells in a datagridview control, mostly in its header. Does anyone know how to do it? Thanks Programmer in trouble
israeli
Posts
-
Cells merging in datagridview control - how? -
ho to capture raw data from webcam ?Hello everybody, Is there a way I can capture the raw data from my web camera? I know how to acquire bitmaps with c# but the bitmaps are already processed data and I need the matrix of light intensities over the ccd/cmos array. Please guide me with c# code. Thanks
-
MapPath cross-browser image failureHi, After almost 6 months I found the reason why the images I'm placing on my page are not loaded in firefox although being loaded well in IE. The method Server.MapPath(...) is not working well in firefox. Instead of using: ImageUrl(or Src)=MapPath(...) use the direct string of the image's path: ImageUrl(or Src)=@"MyImages\pic.jpg"; Bye
-
Using jpg added as an item to the projectHi, I'm trying to use an image file that was added to the project as an object as follows: Project --> Add existing item --> [Adding MyPic.jpg file to the project] Now the image file is an item within the project but what can I do with it? I guess it's possible to declair an image control to refer to this file (System.Web.UI.Image I= [what?] ) but I can't see how can I refer it? What's the difference between the properties of this item : None,Content,Compile,Embedded resource ? Can I erase the image file from my hard disk after I'm setting 'Compile' or 'Embedded resource' and still the picture appear ? Thanks
-
is it ok to put enum outside namespace ?Hi, Is it right to put an enum outside the namespace? I'm using it in my ASP.NET programs and it makes everything easier since the new types are accessable among all the classes and modules. Does it make my code working but not O.O. ? and if it's o.k. are there other entities I can define outside the namespace in order to make them global ? such as structures or constants ? Thanks
-
DropownList Not workin'DropDownList in ASP.NET has a bug. If there are 2 or more items with the same value property the SelectedIndex property is not returning the index of the focued item, as it should, but the index of the first item in the list which has got the same value property as the value of the focused one. For example if item 2 has value="a" and item 8 has got also value="a" then when you select item 8 the following code: DDL.items[DDL.SelectedItem].text is showing the text of item 2 !. Check if the same happens with the property SelectedValue.
-
Row index of datagrid from code render - how ?Hi everybofy, I want to send the row index of a datagrid as an argument of a function from the html: Thanks
-
Preventing pop-up blocking - how ?Hi, I'm using a LinkButton control with the following event: public void OnLinkButtonClicked(object sender, System.EventArgs e) { string command; command=@" window.open(....); this.RegisterClientScriptBlock("clientScript", command); } It works fine in IE but it's being blocked in firefox. Is there a way to prevent the blocking in firefox without changing the properties in the browser? Beyond that, what's so special with the LinkButton control ? it seems like anything that it doess can be performed with other controls like HyperLink or Button and others. Thanks -- modified at 15:15 Friday 28th October, 2005</x-turndown>
-
Validation ControlI'm not certain it's the best solution but I guess it works. Every control that may have wrong input must have an event that corresponds to the change. For example: in a TextBox control. Now you can make the function (in this example: OnTextChanged) with an algorithm that searches for the validator with the error and focuses the relevant control. In order to find the validator with the error use the interface Ivalidator and Validors. Bye
-
Validation ControlI'm not certain it's the best solution but I guess it works. Every control that may have wrong input must have an event that correspons to the change. For example: in a TextBox control. Now you can make the function (in this example: OnTextChanged) with an algorithm that searches for the validator with the error and focuses the relevant control. In order to find the validator with the error use the interface Ivalidator and Validors. Bye
-
Too wide page - why?Hello, One of my pages is being displayed very wide and long. Much beyond the limits of the content in it. The page contains a datagrid which is being updated with its columns (bounded and templates) dynamically from the codebehind. Someone told me it might be the problem. Is it? or is it something else? If someone is familiar with this problem I'll be gratefull for his help. Thank you
-
Watch out !!! a bug in DropDownListI disagree with you this time. Indeed you describe the procedure that happens. But I thought that ASP.NET should be Object Oriented. As far as I understand by a straightforward thinking, the SelectedIndex property should be as it sounds like, the index of the selected item. Apparently, the items are being represented to the user by the text property, not the values properties. Bye
-
Watch out !!! a bug in DropDownListHi, I wanted to highlight a bug in the Web-Control DropDownList. If it contains two or more items with different names, but with the same values, then it returns the SelectedIndex of the first item in the items array with the common value rather then the index of the chosen item. Bye
-
events of usercontrolHi everybody, How do I handle the events of my user control (*.ascx) from the containing page (*.aspx.cs )? Thank you
-
DataGrid and DropDownListHi there, You should bound the data for your datagrid from the OnInit function instead of the OnLoad function.
-
How 2 keep page's location after AutoPostBackHi everybody, I'm using AutoPostBack=True in my control. The problem is that after I'm modifying a selection or another propery of some control the page flickers once and jumps to its top as in its initial mode. I guess there is nothing to do with the flickering but can I keep the page at the same location after a postback is taking place ? Thank you
-
Problems with AutoPostBack=TrueHi ! I set several controls in my page and datagrid to have the property AutoPostBack=True. The problem is that every time I'm modifying as a user one of these controls (for instance, selecting another option from a DropDownList) the following error occur: [HttpException (0x80004005): Failed to load viewstate. The control tree into which viewstate is being loaded must match the control tree that was used to save viewstate during the previous request. For example, when adding controls dynamically, the controls added during a post-back must match the type and position of the controls added during the initial request.] Stack Trace: System.Web.UI.Control.LoadViewStateRecursive(Object savedState) System.Web.UI.Control.LoadViewStateRecursive(Object savedState) System.Web.UI.Control.LoadViewStateRecursive(Object savedState) System.Web.UI.Control.LoadViewStateRecursive(Object savedState) System.Web.UI.Control.LoadViewStateRecursive(Object savedState) System.Web.UI.Control.LoadViewStateRecursive(Object savedState) System.Web.UI.Control.LoadViewStateRecursive(Object savedState) System.Web.UI.Page.LoadPageViewState() System.Web.UI.Page.ProcessRequestMain() What should I do for fixing it? Thanks
-
Updating a boolean field in Access - How?Hi, I have a table within Access DB where all the fields are of text type. Recently I added a new column of boolean (Yes/No) type. The question is how can I update this column ? For the text fields I used the following: int ID = Convert.ToInt32(e.Item.Cells[0].Text); string name_en = ((TextBox)e.Item.Cells[2].Controls[0]).Text; string sql ="UPDATE TableElectric SET NameEn=\"" + name_en+ "\"" + " WHERE ID=" + ID.ToString(); ExecuteNonQuery(sql); What different code should I use for the updating of the boolean (Yes/No) field in my DB ? Thanks.
-
reading from related tables of access.Hello ! I have created two tables in access. The 1st table is "products" and the 2nd is "components". I have also established a relation of one to many using the editor in access. Now, from ASP.NET I wish to read a product, television, and its component, screen. Is it enough to call: StrCommand = "SELECT TVscreenID FROM products WHERE ID = " + x + " ORDER BY ID" OleDbDataAdapter da = new OleDbDataAdapter(StrCommand, conn); da.Fill(ds,"products"); for accessing the details of the component 'screen' which is elaborated within the table components ? how do I access the details of the screen through the member 'TVscreenID' ? GetChild() or something? should I change the sql-string command to relate the both tables ?
-
Bug in TextBox control ?Hi, I'm using the control TextBox: protected System.Web.UI.WebControls.TextBox TextBox1; In the Page_Load function I'm initializing some value to the TextBox: TextBox1.Text="initial data"; The problem is that once I'm initializing a string to the TextBox control the changes that the user makes in the text are not taking place. When I'm getting the data from the control, for instance: string s=TextBox1.Text; the string I get is exactly the same as the one which was initialized. What can solve that ? Thanks