PDA

View Full Version : [CLOSED] clear gridpanel row selection details ( that are passed through extra params)



Sowjanya
Jul 23, 2013, 4:36 AM
Hi,

In my project, there are two functionalities - Add / update Project.

After I update any project, I reset the whole grid form. then i add a new prj, by the foll code:


<ext:Button runat="server" ID="AddNewProject" Text="Add New Project" Icon="Add" Width="125">
<DirectEvents>
<Click OnEvent="AddProject_Click">
<EventMask ShowMask="true" />
<ExtraParams>
<ext:Parameter Name="jsonRecord" Value="#{HostList}.getRowsValues({selectedOnly:false})"
Mode="Raw" Encode="true" />
</ExtraParams>
</Click>
</DirectEvents>
</ext:Button>


In the above code, "hostlist" is a grid panel where I am populating it in the .cs file (by creating store , model dynamically).
So, now when i try to reset the form ( where i clear this grid's contents by saying "HostList.ClearContent();" ) the Extra param values that are passed through the above code still persists and hence unable to reset hostlist . How can i clear this hostlist extra params ?

Daniil
Jul 23, 2013, 4:48 AM
Hi @Sowjanya,

Please try

HostList.GetStore().RemoveAll();
instead of

HostList.ClearContent();

Sowjanya
Jul 23, 2013, 4:59 AM
Hi @Sowjanya,

Please try

HostList.GetStore().RemoveAll();
instead of

HostList.ClearContent();

It gives null reference exception as the store is bound dynamically.

Daniil
Jul 23, 2013, 5:03 AM
Please try:

HostList.Call("getStore().removeAll");

Sowjanya
Jul 25, 2013, 4:37 PM
Please try:

HostList.Call("getStore().removeAll");

Hi Daniil,

Sorry for the late reply..It worked.. Thanks !

Pls close this thread ..


Regards,
Veda