Is there any way to control each textbox in a continuous form?
I've made a continuous form and i'd like to show a visual indication, if the field contains a comment. (a similar function, when Excel has a triangle on a cell, that indicates a comment). I've added rectangles on top of the textboxes and i want to control the .visible of the rectangle on every textbox, based on a record in a field. Furthermore i'd like to control the controltiptext on each individual textbox on the continuous form. Is that possible?
Related
I am having a Grid in which there are many textboxes and in their respective Tag Property of each textbox ,i am having a unique numerical value 1,2,3......etc.On the basis of looping i want to access the "TextBox.Text" value.
How can i loop through each text box in Grid and access the TextBox.Text using TextBox.Tag
Please help me?
I’m working on an asp.net page that simplified looks like this: A group of radiobuttons at the top, some asp dropdownlists in the middle and an asp button labled ”save” at the bottom. I want the page to work like this: When one radiobutton in the group has focus you should be able select one of the others by pressing the up and down arrow keys. At the same time different dropdownlists should be disabled or enabled depending on which radiobutton is selected. Then you select values from the enabled dropdownlists. Finally, by clicking ”save” values should be fetched both from the radiobuttons and the dropdownlists and passed via a procedure to a database. I’ve tried out html input radiobuttons, asp radiobutton and asp radiobuttonlist but have not managed to get the page to work the way I want it to. I’ll be very glad for help to a solution.
Write a project to display the flags of four different countries, depending on the setting of the radio buttons. In addition, display the name of the country in the large label under the flag picture box. The user also can choose to display or hide the form's title, the country name, and the name of the programmer. Use check boxes for the display/hide choices.
We want to use the calendar control to fill it with some text for each day, we tried two methods:
Defining all the textboxes (one for each day) statically in desing mode and moving them (e.cell.Controls.Add(tbDay1)) to each day cell on the OnDayRender event. But there is some problem with viewstate as the textboxes appear 2 times (the ones put in design mode plus the ones in the calendar) and in each page load the contents of the textboxes are duplicated exponentially (test->testtest->testtesttest), it adds 1 semicolon per postback too..but we think its caused by some problem with the updatepanel container.
Defining the text boxes dynamically...we dont know exactly how to include the logic in order to: Load the initial data from database (it would have to be after OnDayRender event somehow, preserving it between page loads (dynamic + viewstate..) but not overwriting new values the user may input...
Any ideas? Preferably for method one as its already implemented.
In the end we defined statically a htmlcalendar and 31 textboxes, added a javascript function that places each textbox inside each day div (with some formating) and on the pageload added some bussines logic to enable/disable the textboxes (with FindControl()) depending on the holidays and so..
I have the following scenario.
I have a search page which is split into two divs. In the first, a user can create query parameters using a range of drop down menus. In the second div a user can enter text to source the query parameter and narrow the search further. On the drop down selectedindex change event, a radio button is selected indicating which search is being looked at.
i.e.
div1 div2
ddl1 tbx1
ddl2 ddl4
ddl3
rad1 rad2
Based upon their selection, the user can then click a button, btnReturn, that returns the query.
So therefore, I have the following questions.
If I have a range of drop downs, in div1, what sort of validation do I need to set up so that at least one of these drop downs needs to be selected in order for a query to be selected. I cannae just put in required fields as not all of these fields are required, a minium of one of these is need to product a reasonable search.
I am assuming I can do all of this using .net validation?
I am thinking I can use Validation Groups for div1 & div2 but is it possible to assign both groups to one control i.e. btn click? Is it a case of doing the last part programmatically?
And that concludes today's essay! any help, as always, greatly appreciated.
Create a user control (or custom control) wrapping all dropdowns. Then create a Custom Validator, set its validated control to the wrapper you created. Write a javascript function to check that at least one value is selected in the dropdowns and set the ClientValidationFunction property of the custom validator to use it.
Yes.
No, this wouldn't work in your case (unless you want a postback when switching between the DIVs). Create two submit buttons, and hide them on the client depending on the selected DIV.
I am using a telerik radgrid so there are around 5 columns each column edittemplate contains a control along with a required field validator and also a property called AllowMultiRowEdit is set to true so i am able to multiple rows in edit mode.
If any of the values are cleared the for multiple rows I want only those to be validated on update of that particular row.
So i implemented the Grids item data bound event find each and every validator along with the update button and set a unique validation group.
The above implementation most times but fails at some time. Is there any other way of going about this ?
You could use a customvalidator that uses code to check the other textboxes to ensure no value is being updated... requiredfieldvalidator always validates that a value has been supplied in the database, but CustomValidator gives you the ability to control the validation on the client and server. The issue becomes though, how to validate the other controls, and that will be tricky.
You will have to, from within the servervalidate or on the client, navigate up the control hierarchy from the validated control to the row level of the control and then find the other controls in the same row.