User Profile & Activity

Andi Santoso Support
Page
of 53
Posted: April 12, 2010 12:35 AM

Hi Dennis,

    Yes, it will not be a problem. Attached is a running simple sample of getting composite keys. Please ensure to put the SimpleList.cs in your App_Code folder.

     I hope it helps. Thank you and have a nice day.

Best Regards,

Andi Santoso

Hi Gaurav Desai,

     First of all, May I know your SharePoint Version? Does it using XHTML based? If does, there is still an issue with using Resize Bet Fit under XHTML. However, in HTML page, ResizeBestFit is doing just fine. Also, could you kindly give me screenshot of the result please?

     Thank you and have a nice day.

Best Regards,

Andi Santoso

Posted: April 8, 2010 11:39 PM

Hi Srikant,

     Usually, when we cannot open the context menu, because we are missing the ISNet.WebUI.WebDesktop.Resources.dll. So, please ensure that on your project you have included this .dll file. 

     I hope it helps. Thank you and have a nice day.

Best Regards,

Andi Santoso

Posted: April 8, 2010 10:50 PM

Hi Dennis Chee,

     If that is the scenario, please ensure that you do not declare the DataKeyField in your server side PrepareDataBinding event. Once you set two Primary Keys on your class, WebGrid will automatically set its composite key values. Those key values will be set as an array, here are the snippet to get those key values:

var grid = ISGetObject("WebGrid1");
var selectedObject = grid.GetSelectedObject();
   if (selectedObject != null) {
      var toRowObject = selectedObject.ToRowObject();
      alert("Key Values are " + toRowObject.KeyValues[0] + " and " + toRowObject.KeyValues[1]);
   }

     I hope it helps. Thank you and have a nice day.

Best Regards,

Andi Santoso

Hi Ben,

    Yes, of course. Here, I attached you a running sample of that particular scenario. You can try to open a show the WindowIframe window, it will contain a button. You can try to click that particular button and test that pop up window on the edge. The scroll bar will not be shown.

    I hope it helps. Thank you and have a nice day.

Best Regards,

Andi Santoso

Posted: April 8, 2010 10:09 PM

Hi Gao Yixin,

    I believe we have discussed this on our Remote Desktop session. Please do not hesitate to ask if you have any further questions. Thank you and have a nice day.

Best Regards,

Andi Santoso

Hi Xedem,

    My colleague, Handy, is not available at this moment. Regarding your issue, may I know what was the message of the error ? Could you also send me your sample where the error is persisted and it would be much better if you also include the step on how to reproduce the error.

    Thank you and have a nice day.

Best Regards,

Andi Santoso

Posted: April 8, 2010 4:09 AM

Hi Dennis,

      Even though you set that particular column as a [PrimaryKey()], you will need to make sure that on server side of PrepareDataBinding, you have set the DataKeyField for the WebGrid.

protected void WebGrid1_PrepareDataBinding(object sender, ISNet.WebUI.WebGrid.DataSourceEventArgs e)
    {    
        if (!IsPostBack)
        {        
            WebGrid1.RetrieveStructure();
            
        }
        WebGrid1.RootTable.DataKeyField = "CustomerID";
    }

      Then, if you try to debug it, you will see that the DataKeyField is null. That is our default behavior. However, if you look deeper you will see that each row already set its KeyValue.

      Different case if you are trying to create a composite key. You will need to set two Primary Keys in your class. For this case, in PrepareDataBinding, you will not need to set any DataKeyField. Just leave it blank and it will automatically set the composite key. The composite key is returned as an array.

      I hope it helps. Thank you and have a nice day.

Best Regards,

Andi Santoso

Hi Gaurav Desai,

     Unfortunately, our hidden data member is not meant to be two ways work. It cannot be updated from client side, it is actually for read only purpose. If you wanted to pass a value from client to server side, we do have a method for that.

     However, I will need more detail information about your scenario. The hidden data member that has been send to server side must be related to database, for example, it will be used for a validation when we try to update a row. If we want to pass the value from client to server, we do have a method to do so, you can read our docs at "ms-help://ISNet.WebUI.WebGrid.V7/ISNet.WebUI.WebGrid/Advanced Client-Server Interaction Sample.html".

      Basically, let say that we want to send the value from client to server on UpdateRow. We will need to use the OnBeforeUpdate Client side and catch the new value on UpdateRow server side event. Here is the snippet to do so:

function WebGrid1_OnBeforeUpdate(controlId, tblName, rowObject)
{
	var WebGrid1 = ISGetObject(controlId);
	WebGrid1.AddInput("Value", "New Value");
			
	return true;
}

       On the server side:

protected void WebGrid1_UpdateRow(object sender, ISNet.WebUI.WebGrid.RowEventArgs e)
{
        string inputVal = Request["Value"].ToString();
              
}

 

       So, in here, I pass the string "Value" which contains "NewValue" to server. And catch them in string "inputVal". I hope it helps. Thank you and have a nice day.

Best Regards,

Andi Santoso

Posted: April 7, 2010 10:37 PM

Hi Srikant,

     Forgive me, however, I am not able to replicate the issue in my end. By letting "EnabledContextMenu=true" should be appearing the context menu. May I know what browser are you using? Because as I know, Opera has a problem with the "right-click" thing.

     I hope it helps. Thank you and have a nice day.

Best Regards,

Andi Santoso

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