User Profile & Activity

Andi Santoso Support
Page
of 53
Posted: January 31, 2010 10:46 PM

Hi Dan, 

     Actually, we have a sample with the same similarity. However, in our sample, instead of highlighting the specific column, we put a mark sign on our column which, I believe, is better for UI. You can check it on our live sample. If you browse, you can go to "Browse All Sample"->"WebGrid" -> "Smart Batch Update" -> "Review Changes in Batch Update" or if you go to our C# sample, you can find it under "BatchUpdate_AllowReview.aspx". In there, you can try to copy paste the row and the column, it self, will give us a mark sign if the input is incorret.

      I hope it helps and please, do not hesitate to ask if you have any other questions. Thank you.

Best Regards,

Andi Santoso

Posted: January 31, 2010 9:53 PM

Hi Scott,

    Actually, it is not a bug. What you can do to prevent the WebGrid to do that kind of behavior, is by having a non-fix height for the WebGrid. So, instead of setting the Height=350px, you can try to use percent on it. Here is the snippet:

<ISWebGrid:WebGrid ID="WebGridLocations" Width="785px" runat="server"
     UseDefaultStyle="True" DataCacheStorage="Session" Height="100%">

    I hope it helps and please, do not hesitate to ask if you have any other questions. Thank you.

Best Regards,

Andi Santoso

Hi Abdullah,

     Actually, we do have thread that discuss on how to create a programmatic cell template. You can see it at this link.

     I hope it helps and please, do not hesitate to ask if you have any other questions. Thank you.

Best Regards,

Andi Santoso

Posted: January 31, 2010 9:13 PM

Hi Conrad,

     In your case, it seems that the object is null. Here, I attached a simple running sample that using "Enter" as a "Tab" button in adding new row on WebGrid. Would you kindly try to run my sample and see if the issue is still occurred. My sample is using Northwind Customer database.

     I hope it helps and please let me know if the error is still occurred. Thank you.

Best Regards,

Andi Santoso

Hi Way Hang Wee,

     Thank you for your detail information. From what I see on your provided sample code, the value of WebCombo2 is not rendered because you put the data binding on page load. Would you kindly try to put the data binding not in the page load but in initialize data source. The value is null, perhaps, because after it do PostBack, it will do the data binding again. On intitialize data source, I suggest you to not use:

                .DataSource = dsDepartment.Tables(0)
                .DataValueField = "DepartmentCode"
                .DataTextField = "DepartmentName"
                .DataBind()

 Instead, I suggest you to use something like:

                e.DataSource = dsDepartment.Tables(0)
                e.DataValueField = "DepartmentCode"
                e.DataTextField = "DepartmentName

 When you bind the data in initialize data source, you do no need to put .DataBind() anymore.

     I hope it helps and please let me know if it is solved. Thank you.

Best Regards,

Andi Santoso.

Posted: January 28, 2010 11:49 PM

Hi Conrad,

     Here is the sample code to use Enter key as a Tab key when we are adding a new row in WebGrid. In here, I am still using OnEditKeyDown. Here is the snippet:

 function WebGrid1_OnEditKeyDown(controlId) {
            var WebGrid1 = ISGetObject(controlId);
            var position = WebGrid1.GetActiveEditCell().cellIndex;
           
            if (event.keyCode == 13) {
                WebGrid1.GetActiveEditCell().ToCellObject().GetRow().GetCells()[position].Se                lect();
            }
            return true;
        }
        

      I hope it helps and please, do not hesitate to ask if you have any other questions. Thank you.

Best Regards,

Andi Santoso


Hi Way Hang Wee,

     Thank you for your detail informations. Now I know what is the issue in here. I have tried your scenarion and the code of yours is almost right. For our WebCombo, in order to get the selected row's value on back side, you can use, as this following code:

      WebCombo2.Value

      We do not need to use SelectedRow property again. I have tried it and it worked properly. I hope it helps and please do not hesitate to ask if you have any other questions. Thank you.

Best Regards,

Andi Santoso

Hi Jean,

     Glad to hear that your problem has been solved. Please do not hesitate to ask if you have any other questions. Thank you.

Best Regards,

Andi Santoso

Posted: January 27, 2010 1:23 AM

Hi Jay,

      I am here to assist you since my colleague is not available at this moment. I have tried to use the suggestion that she gave and everything works just fine. I attached you my running sample using northwind database. Kindly, try to run it and see if it is still give us the same result. And also, ensure that you have downloaded the newest version of your browser.

       I hope it helps and please let me know if you have any other questions. Thank you.

Best Regards,

Andi Santoso

Posted: January 27, 2010 12:04 AM

Hi Way Hang Wee,

     Sorry but I am having a trouble to replicate your issue. I have tried to summon a WebCombo with AllowAutoPostBack to true and in fact, I also use a FullPostBack Button to test if it will trigger the  random autopostback but the result is not, it work just fine in here. I attached you a sample code as well. I am wondering where was I missing.

    Thank you.

Best Regards,

Andi Santoso.

All times are GMT -5. The time now is 7:28 AM.
Previous Next