I have a WHDG on my page and I am trying to resolve which cell the user clicks on.
I enabled activation on my grid, and set a clientside event where i can see what is clicked from javascript. I also added a eventhandler for Activation.ActiveCellChanged to handle the event server side, but it never gets called.
How can I have a event fired server side with the new selected cell?
Hi
An update on my previous post. The ActiveCellChange PostBack worked when I set the EnableDataViewState to true. I have a new issue now. I am getting the post back if I click on one of the column but not all. The row gets selected when I click on any of the Cell, but the ActiveCellChange post back is not working for all cells.
I've set the RowSelectType="Single" , CellClickAction="Row" and CellSelectType as "Single"
Please help me on this.
Regards
Mithilesh
As mentioned above, the PostBack will not function properly if data bind is not done for grid. In my case neither the PostBack is happening for ActiveCellChange nor the event is fired. Any perticular reason why is that happening?
N.B. : The Activation Enabled is set to True and AutoPostBackFlag is set to True for ActiveCellChange.
Hello Joe,
The grid needs its datasource on every postback in order to function properly. If you don’t want to request it from the database every time you can implement some caching of the data or you can keep it in the session.
Let me know if you have further questions with this issue.
Regards,
Lyuba
Developer Support Engineer
Infragistics
www.infragistics.com/support
I found the solution to my issue the other day, Apologies for not responding sooner.
Please modify your example page with the following to recreate the issue:
Delete your sqldatasource and all design data bindings.
Replace page load with the following:
protected override void Page_Load(object sender, EventArgs e)
{
string[,] test = new string[2, 2] { { "1", "22" }, { "333", "4444" } }; if (!IsPostBack) { Report_Grid.DataSource = test; Report_Grid.DataBind(); } }
The issue is that events do not function as expected if a datasource is not bound to them during post back. Activation events will not fire with the above code, Selection events will fire but e.CurrentSelectedCells[0]; will return null.
Due to the size of my datasets that a bind, and the run time I do not wish to go back to the database for every postback. My current project as example has a sql run time of about 10 seconds, and returns at least 100k records. To large for session and to slow for postbacks. I've executed a workaround for my data that has my protect working though.
Also I find the results of binding an array to a WHDG peculiar.
Would you tell me which Infragistics version are you using? I tried to replicate this issue with 10.2.20102.1011 but I didn’t succeed – e.CurrentSelectedCells[0] wasn’t null. Here is the project that I used to test this:
Would you take a look and tell me if I am doing something in a different way than you?