User Profile & Activity

Xedem Member
Page
of 12
Posted: August 21, 2009 4:23 AM

Infact only Webgrid1.ClientAction.Refresh() is required. First you need to check if this event is working or not. If the refresh is working then page will load once again asynchronously and go through the webgrid initialise event once again and rebinding takes place. If you are getting a postback then you try James's method. And if you are using Webgrid1.ClientAction.Refresh() or WebGrid1.ClientAction.RefreshAll() then you dont need to apply neither WebGrid1.ClearCachedDataSource() nor WebGrid1.RebindDataSource().

Anyway check if the refresh is causing asynchronous postback. And are you using Initialisedatasource event of webgrid?

Posted: August 21, 2009 2:56 AM

Ok. the select file is working fine now...thanks for the reply

Now about the code you have given,

 grid.HidePadColumn = true;

 It worked for some webgrids but not for all. In fact for some webgrids, there comes a little space with a maximum width of 1px. See the screenshot attached herewith. And i assume its not the problem with my part. See the design code below.

<ISWebGrid:WebGrid ID="WGQn" EnableViewState="false" runat="server" Height="120px" HorizontalAlign="NotSet" 
Width="100%" AllowAutoDataCaching="True" UseDefaultStyle="true" DefaultStyleMode="elegant">
<RootTable DataKeyField="I_QUEST_BLOCK" GridLineStyle="notset">
<Columns>
<ISWebGrid:WebGridColumn Caption="Date Done" DataMember="DATE_DONE" DataType="System.DateTime"
Name="Date Done" Width="150px">
<HeaderStyle CssClass="WG5-Header" Font-Names="sans-serif" Font-Size="8" Padding-Left="2">
</HeaderStyle>
</ISWebGrid:WebGridColumn>
<ISWebGrid:WebGridColumn Caption="Name" DataMember="Name" Name="name" Width="200px">
<HeaderStyle CssClass="WG5-Header" Font-Names="sans-serif" Font-Size="8" Padding-Left="2">
</HeaderStyle>
</ISWebGrid:WebGridColumn>
<ISWebGrid:WebGridColumn Caption="Result" DataMember="Result" Name="Result">
<HeaderStyle CssClass="WG5-Header" Font-Names="sans-serif" Font-Size="8" Padding-Left="2">
</HeaderStyle>
</ISWebGrid:WebGridColumn>
</Columns>
</RootTable>
<LayoutSettings InProgressUIBehavior="ChangeCursorToHourGlass" GroupByBoxVisible="false"
CellPaddingDefault="2" RowHeaders="No" StatusBarVisible="False"
AllowColumnMove="No" AlternatingColors="True" AllowColumnSizing="No"
GridLines="None" AutoFitColumns="true" >
<HeaderStyle CssClass="WG5E-Header" Font-Names="sans-serif" Font-Size="8" Height="0px"
Padding-Left="2"></HeaderStyle>
<FrameStyle BorderStyle="none">
</FrameStyle>
<RowStyle Cursor="Hand" CssClass="WG5E-Row" Font-Names="sans-serif" Font-Size="8" Padding-Left="2" />
<AlternatingRowStyle Cursor="Hand" CssClass="WG5E-AR" Font-Names="sans-serif" Font-Size="8"
Padding-Left="2" />
<ClientSideEvents OnCellDblClick="gotoQuestionDetails()" OnRowContextMenu="HandleRowContextMenuQn" OnInitialize="WG_Init" />
</LayoutSettings>
</ISWebGrid:WebGrid>


I tried the page with Firebug. The extra space that you can see right now was found out to be a td as flollows 

<td class="WG5E-Header ctl00cph1WGQn-Header" style="width: 100%;"> 
</td>

And i assume that this is the same one we are hiding. Isnt it? So it could be a bug. Because i could find out that, for those webgrids in which it worked, this td exists, but not shown. So somehow this is not working perfectly for some webgrids. Those working and non working webgrids have got exactly similar layout applied. To clarify more, am attaching the working webgrid's screenshot for you.

And moreover, this is not exactly what i want.I will clarify it here-> 1.All the columns except last one are put in pixel width. And the last one as width=100%. Works fine in IE. Why am putting specific width? the answer is each columns should have given specific width, according to the client. So an all column percentage width scenario wont work at all. And last column's width is not specific, so i need to put it to maximum, to cop up with the resolution changes. 2.With autofitcolumns the columns size all gets changed. To cover it, am specifying isautowidth=false for all columns except last one and isautowidth=true for last column. With this the portion including scrollbar gets clipped ofF from the webgrid. No scrollbar comes at all. So the autofitcolumns scenario somehow jeopardises my working scenario as of now.....

 

 

 And to clarify more, am not tampering the webgrids layout from either javascript or servercode.

Please reply as soon as possible.

 

 

 

Posted: August 21, 2009 1:25 AM

Well, thanks for the reply the i just replaced my Initialise culture event with the one you provided. It works well. So my question is what is the current Initialiseculture has to do with mine as follows.

Thread.CurrentThread.CurrentUICulture = New CultureInfo("en")

 if i use New CultureInfo("en-US") instead of New CultureInfo("en") everything works fine, but with "en" instead of "en-US" flypostback goes off. I donno why. Infact webgrid's UI is changed perfectly with just "en".  Only flypostbackmanager has the problem. Anyway i may rewrite my logic according to your solution

Posted: August 21, 2009 12:36 AM

I dont have any problem with IE7. I have rectified all issues with IE7 and applied padding as well. No problems at all . My question is as in my post is Firefox3.5 with webgrid  and not IE7. Please check the screenshot that i attached in the original post and check the extra space shown in FF3.5 and please check the screenshot given to me by the webgrid team(file name extraspce.png). And if u have got a working sample with fullwidth in firefox3.5, please attach that here. I want the sample in the form, where all columns are applied with percentage width or atleast last column with percentage width. I tried everything i could have done for Firefox but no result. With Autofitcolumns, there comes an extraspace at the end, which becomes reserved later on for scrollbar. After contacting the webgrid team i could find that, the extraspace is the default option in autofitcolumns. So am fed up. Please reply as soon as possible.  And about the select file for attachment-> No, it is not working anyway. Am using ff 3.5.2.


Posted: August 20, 2009 7:57 AM

Am using Webgrid1.ClientAction.Refresh() from server side to refresh Webgrid with updated values.This could be done just after your save method. Or try Webgrid1.RebindDatasource(). Am not sure about the second option though....

Posted: August 20, 2009 5:33 AM

Am sorry. In fact i applied the option as you have suggested. ie; i used GetNamedItem method. But that was unsuccessful too. Later on i changed the code in different ways to make it work.This was the modified code. Anyway please let me know as soon as the issue is solved. The following is the original code.

var loadMoreItem = menuObject.Items.GetNamedItem("mnuLoadMore");
 menuObject.Items.Move(loadMoreItem.Index, menuObject.Items.length - 1);

Posted: August 20, 2009 3:45 AM

ok. I have made a feature request. Thanks for the response

Posted: August 20, 2009 3:31 AM

Well, thats all handled inside the method RebindBlockdet. In fact divBlkCont contains some dynamic grids which are updated through the method. So its not done here, and is more complex to understand and out of scope. Anyway i will generalise my question as follows.

Think as i am not doing any thing in the event say as follows.

<WebFlyPostBackMethod()> Public Sub RebindBlockDet(ByVal blkId As String, ByVal extraUpdate As Integer)
Dim i as Integer=0
End Sub

Then according to the working scenario of webflypostbackmanager, this method should work. In fact it works fine. I can debug through the code and access the code Dim i as integer =0.But after i put Initialise culture event inside the page, the code Dim i as Integer=0 cannot be accessed at all during the flypostback. I hope the description is clear enough.

 

All times are GMT -5. The time now is 5:07 PM.
Previous Next