i am using showColumnMenu=true; in my grid options to filter columns in the grid. When i uncheck a column(ie., hide a column see image) i want a event to be triggered i went through gridEvents i found a event ngGridEventColumns which fires once. ie., if i uncheck any column it fires if i check again or uncheck any other column it does not fire. Is there any event or any work around so that a event is fired every time columns are checked or unchecked in the columnMeny filter
Related
ive got a ddl in a gridview with two values: 0 = no and 1 = yes. I've also got an event on the dll SelectedIndexChanged so when the user selects 1 then it shows a panel with a form in it. the form has two buttons: submit and cancel.
what i'd like to do is when the user selects cancel reset the ddl in the gridview back to 0.
I have an event on the cancel button and can hide the panel with the form but I'm not sure how to find the ddl that triggered the event to show the panel. do i need to use the row datakey such as the id?
When your SelectedIndexChanged event occurs, note down the row index - in which the DropDownList is present - for example saving the row index in a hidden field. Then when the cancel Button is clicked, use that hidden field, extract the row index, find the DropDownList in GridView in that row and reset it.
Hint: Use Control.Parent to find the host of a control, for example CType(mydropdown1.Parent, GridViewRow).RowIndex
However doing all this through JavaScript would be much better, in this way your user would NOT experience the server round trips on each click, but obviously requires good grip on JavaScript.
In grid row command event I am calling a .ascx page as a popup.
In the popup I have one button, on clicking the button, I'm calling one more popup.
Under the second popup I have four dropdown controls, in the dropdown controls I'm filtering and filling the data one after another.
The problem here is, if I filter the third dropdown, the second dropdown field data is getting reset(Onselectedindexchanged is firing).
You might be reloading/binding the drop downs on post back. You may want to change it to something like this
if(!Page.IsPostback)
{
//load the dropdowns the first time.
}
I have datagrid with populated data. When the user clicks on one particular cell of one column, the popup window has to be displayed, and also same requirement is there for another column.
I could not find how to do it for cell.doubleclick and click properties are applicable to row selection. Can any one give solution for this requirement?
Listen to the itemClick event of the DataGrid - it dispatches an event of type ListEvent that has columnIndex and rowIndex properties.
If for some reason it doesn't work, you can use a custom itemRenderer and dispatch a custom event using its listData.owner property.
Ok, i have a gridview and on page load, i dynamically add a column to it that contains a link control. this link control has a onclick event associated with it so that when its clicked, i want to do some processing. Now I have noticed that if I just bind the grid the first time (i.e. if(!IsPostBack) and have enableviewstate for the grid to be true, clicking the link in that column, doesnt trigger the onclick event. But if I bind the grid on every postback, everything seems to be working..does anyone know the reasoning behind it?
It happens because you're dynamically adding the column, so on every postback the column has to be created. What you may want to do is to look at Creating a Custom Column.
May be creating the row Id solves your problem. Check out this link and the post marked as answer.
http://forums.asp.net/p/1471128/3408069.aspx#3408069
Regards
Vinay
I need to display additional information, like a tooltip, but it's a lot of info (about 500 - 600 characters) on the items in a RadioButtonList.
I now trigger the update on a PanelUpdate when the user selects an item in the RadioButtonList, using OnSelectedIndexChanged and AutoPostBack. What I would like to do, is trigger this on onMouseHover (ie. the user holds the mouse a second or two over the item) rather than mouse click but I cannot find a way to do this.
You could try setting an AsyncPostBackTrigger on the updatePanel to watch the value of a hidden field. Then in the javascript onMouseHover event, increment the hidden value. This would fire the AsyncPostBackTrigger, updating the UpdatePanel.