I'm looking for the behaviour of the old ultrawebtab, when the tab click is captured in code behind and the current tab not change until the postback is finished (Something like the client side event SelectedIndexChanging but on server).
I'm using the event SelectedIndexChanged with its autopostback property in true, but with this, first the tab is made active on client, and then the postback occurs.
I saw that there's a client event SelectedIndexChanging, but there's no equivalent on server events.
Besides I have another problem:
In the active tab I have a webdatagrid with a row selected. In any event this row is available in the SelectedRows collection of the grid, but if the SelectedIndexChanged of the tab is called, in the event handler, the selectedRows collection is empty.
Can anybody help me with this?
Thanks,
Gustavo
Hello Gustavo,
Thank you for posting in our forums.
Regarding the Selected Rows count, it is a timing issue
If you try to get the count at a later stage of the lifecycle you will be able to get the selectedRows collection
http://community.infragistics.com/forums/p/45975/252458.aspx#252458
Regarding the first question can you please clarify the scenario?
I recommend you using the tab._doAjax(index) approach from the below forum thread in order to avoid the full post back:
http://community.infragistics.com/forums/p/51118/286944.aspx#286944
Hello Georgieva, thanks for your response.
I can see now that the selectedRows are available at prerender stage, but I still think that should be great if they were available after page load to access it in any event handler.
In regards of first question, what I want is something like client side SelectedIndexChanging, but in server. When you click in a diferent tab than actual, an event handler on server let you decide if you finish the change or not (cancel the change) and load the content of the new selected tab before the user see it.
I hope this clarify what I want to do.
Regards,
Thank you for the update.
Yes, you are correct . The new tab will be shown only for a second and then the old one will be reset because of the "-ED" ( not "-ING") event handler.
Thank you for submitting feature request for this.
Hi Tsvetelina, thank you for your response.
I think I must do a feature request .
If I understand well, the first javascript example causes that postback doesn't happen.
If only the selectedIndexChanged is managed as in the second example, I think the user will see that the tab has changed and after the postback the previous tab will be on top again.
Thank you for the clarification.
The timing issue with the selectedRows is a known one and it is due to the framework implementation.
Regarding the SelectedIndexChanging server event ,the "ing" event currently it is supported only on the client.
function WebTab1_SelectedIndexChanging(sender, eventArgs) {
///<summary>
///
///</summary>
///<param name="sender" type="Infragistics.Web.UI.WebTab"></param>
///<param name="eventArgs" type="Infragistics.Web.UI.TabSelectedIndexChangingEventArgs"></param>
//Add code to handle your event here.
eventArgs.set_cancel(true);
}
You can handle the SelectedIndexChanged server event and reset the SelectedIndex if you want to implement it on the server.
protected void WebTab1_SelectedIndexChanged(object sender, Infragistics.Web.UI.LayoutControls.TabSelectedIndexChangedEventArgs e)
{
if (e.NewIndex == 1) {
WebTab1.SelectedIndex = e.OldIndex;
I recommend you creating a feature request regarding this functionality :
http://devcenter.infragistics.com/Protected/RequestFeature.aspx