I have a grid with one row having a radio button list .
Based on this radio button list, a date is generated in another column.
If i allocate radio button for first time it works good and a date is created and so on...
but while I check another one from a different row after a week or two, the wrong thing happens.
I get a new date in all rows and it replaces the date created by the radio button two weeks back. :(
Related
I am writing an application which updates the date selected in RadCalender to a database column on click of a button.
After the button is clicked, i want to clear the selected date so that the end user selects a date before clicking the button again
I have tired using the below code, but it dosen't appear to work
calExpirydate.SelectedDates.Clear();
You can use the following script:
var selectedDates = get_selectedDates(); //Gets the "list" of selected dates
unselectDates(selectedDates); // unselects all dates that may have been selected.
Code taken from: Telerik Reset Calendar Selected Date
----------------------------
radCal1.RemoveFocusedDate(true); //Will remove the calendar date currently selected.
here i am going to update multiple values at a time by using single button click
On clicking update button for gridview it is showing multiples values for each and every column
After refreshing the page it is showing normal data
For example if i am inserting 1 in 1st column, 2 in 2nd column after updating gridview it is showing 1,1 2,2 like that
Because your gridview has autogeneratecolumn = true. change to false.
Or if you want custom header name do this steps:
in gridview property (Design part) click edit columns -> your boundfield -> under its property, you can see the "DataField", set your field name of your database. You can see now the data of your records from your database. also you can set header name.
I have created a SQL database with the "item details" table and have a field called hits for each of the items.
I have created a listbox on aspx webpage and populated it using c# code. I wanted to know how I can record the hits each time the user clicks on the item on the list box. Or do I need to create a button or something so if the user clicks specific item, it gets recoded for that item in the database. I also want the hits to increase each time the item gets clicked on.
I can only tell you about the backend on what exactly should happen. Whenever there is a button click or anything which tells that a user has selected an item. You should do something like this:
ALTER TABLE yourTableName
SET hits = hits+1
WHERE (enter the condition which identifies the clicked item)
Front end is your choice whether you want to create button or a drop down box or anything.
I have a table called Vendor that has two columns: VendorNum & VendorName.
Is there a way to create a list or a listbox or a listview that when a button is clicked, this vendor list will pop up. Then the selected popup list's row will pass the selected VendorNum into a textbox that's in the parent page..
I only know GridView has the select row option, but is it a proper way to put the gridview into a Listbox so the list can be scrolled up/down all within a fixed box?
You might want to take a look at the ListBox.SelectValue and/or ListBox.SelectedItem properties
is there any way to merge cells in a datagrid view or atleast can we show on the screen like some columns in the grid belongs to one group.
for example ill take three columns:
column1: year field(a drop down type)
column2: month field(a drop down type)
column3: date field(a drop down type)
all these three should be grouped to dateofbirth cell.
or is there any way to embed calendar component in the cell.. just like in some sites when we book some tickets we click on calendar icon & click the date and it will be captured in the corresponding field..
any ideas?
You can create your own DataGridViewCalendarColumn by inheriting from DataGridViewColumn, and a DataGridViewCalendarCell by inheriting from DataGridViewCell or DataGridViewTextBoxCell.
This isn't something I've done myself, but there are loads of tutorials online explaining how to create custom DataGridView columns. A google search may help.
what i have done for this is as follows:
i have taken a date time picker obj,which will be in invisible mode initially.
when i focus on the date of birth cell ,then date time picker will invoke(in a dialog) and will be visible for this focus time.
after selecting the date,the value will be inserted into the current cell.
if the focus is on the next rows and the corresponding cell then once again we follow the above step.