User Profile & Activity

Member

Hi Andi,

Thanx a lot for the sample code.

This is what I was looking for.

function FreezeGrid() {var grid = ISGetObject('WebGrid1');

grid.LayoutSettings.FreezePaneSettings.ActiveFrozenColumns = 2;

grid.FreezePane(true);

}

true);

}

function UnfreezeGrid() {var grid = ISGetObject('WebGrid1');

grid.UnfreezePane();

}

I found the solution in the thread:

http://www.intersoftpt.com/Community/WebGrid/Freeze-columns-from-client-side-on-the-grid/

I'm putting the code so that if somebody happens to need this kind of behaviour, they can find it in this thread.

Thanks guys.

Hi Julia,

It works now. Thank you Julia and Andi.

There's still some problem, it refreshes everything. I mean like if i've already expanded the rows, all of it is lost. Can I call the method called by Freeze Pane command in the context menu.

Also, I can see that there's a method in WebGrid called FreezePane( ) in the javascript. How to use that method?

If anyone has already used that method, could you please give some sample code to me. It would be really helpful.

Thanks.

Regards,

Sudeep

P.S.: I've attached an image of the webgrid. It shows double line when I freeze the second column using the code provided and then unfreeze it using the context menu and then again freeze the first column. Is it a bug or my layout problem?

Posted: December 18, 2009 10:12 AM

Thanx Gordon. It worked.  

Regards,

Sudeep

Posted: December 16, 2009 3:27 PM

Gordon,

U r welcome!

Best Regards,

Sudeep

Posted: December 15, 2009 3:41 PM

Hi ca,

 

This is the way you can get selected row's cell value on button click

 

protected void btnSelect_Click(object sender, EventArgs e)

{

void btnSelect_Click(object sender, EventArgs e)

{

Label1.Text = WebGrid1.RootTable.Rows[WebGrid1.RetrieveClientLastSelectedObject().RowIndex].Cells[0].Value

}

Cheers

Posted: December 15, 2009 12:23 PM

Hi Glenn,

I can see that it works fast with few data. But when I am using 10s of thousands of data rows, the time taken seems to increase exponentially.

Solutions to this would be appreciated.

Thanx!

Hello Andi,

 

Thanx for the reply. Well, It doesn't seem to work for me, don't know why. Is there a way to access the context menu's "Freeze pane" event. I just need to use it without the contect menu.

Thanx.

All times are GMT -5. The time now is 12:21 AM.
Previous Next