User Profile & Activity

Hans Kristian Member
Page
of 69
Hello,

Thank you for the reply.

Perhaps you could try to use the first option, use WebInput control, like in Yudi’s prior post.

However, if you still want to use the VistaCalendar, I have a work around regarding this VistaCalendar issue.

First, set the “AllowDelete” property to “Yes”. Then add a couple line of code in “OnBeforeDelete” & “OnRowContextMenu” client side event.

In OnBeforeDelete event:
function WebGrid1_OnBeforeDelete(controlId, tblName, rowObject){
    return false;
}

In OnRowContextMenu event:

function WebGrid1_OnRowContextMenu(controlId, rowType, rowElement, menuObject)
{
    var WebGrid1 = ISGetObject(controlId);
    menuObject.Items.GetNamedItem("mnuSep2").Hide();
    menuObject.Items.GetNamedItem("mnuDelete").Hide();
    return true;
}

These codes above to prevent user delete row from WebGrid.

I attached the WebGrid sample regarding this work around. In this sample, I bind WebGrid to AccessDataSource (Northwind.mdb and Employees table).

I apologize for the inconvenience.

Regards,
Hans K.

Hello,

I apologize for the late response.

Since you can get the key value each checked row, you could use GetRowByKeyValue() WebGrid’s method.
With this method you could get WebGridRow object, then you could get CellTemplate column value.

I modify the attached sample that I provide to you in my prior post.
I add one Checker column to the WebGrid and I modify the Button click event code.

protected void Button1_Click(object sender, EventArgs e){
    ArrayList checkedRows = WebGrid1.RootTable.GetCheckedRows();
    string text = "Checked rows: " + checkedRows.Count + "\n\n";

    foreach (string keyValue in checkedRows)
    {
        text += WebGrid1.RootTable.Rows.GetRowByKeyValue(keyValue.ToString()).Cells[3].Value.ToString() + "\n";
    }

    TextBox1.Text = text;
}

Hope this helps.
Thank you.

Regards,
Hans K.

Hello,

Perhaps you could modify the column’s “EditType” property to “CalendarDropdown” or “CalendarCombo”.
So user can select the date from the Calendar, without having to know the date format.

Here’s example snippet code how to set the EditType property:

<ISWebGrid:WebGridColumn Caption="Date Column" DataMember="" Name="date_column"    Width="150px" EditType="CalendarDropdown" DataType="System.Datetime" DataFormatString="yyyy-MM-dd"
    EditInfoText="Select Date from Calendar">
</ISWebGrid:WebGridColumn>

Hope this helps.

Regards,
Hans K.

Posted: June 15, 2014 10:59 PM
Hello,

This issue has been scheduled to go into hotfix release this month (in June).
However we will provide you the nightly hotfix, if this issue has been fixed ASAP.

I apologize for the inconvenience.

Regards,
Hans K.

Hello,

Thank you for the question.

I made a page that contains WebGrid with CellTemplate feature.
I bind the WebGrid to access data source control (Northwind.mdb database & Customers table).
I add an ASP button to the page to get the CellTemplate value.

So I add a line of code to get the first row CellTemplate column (ContactName column).

protected void Button1_Click(object sender, EventArgs e){
    Label3.Text = WebGrid1.RootTable.Rows[0].Cells[2].Value.ToString();
}

Please kindly have review on the sample to see the result.
You also could download the sample from this link: http://1drv.ms/1qEvgRc

Thank you.

Regards,
Hans K.

Hello,

Thank you for the reply and sample.

This issue has been forwarded to the developer team.
I will let you know if there is an update regarding this issue.

I apologize for the inconvenience.

Regards,
Hans K.
Hello,

I apologize for any inconvenience this problem may have caused you.

I made a web page and added WebGrid to the page. I bind the WebGrid with access data source (Northwind.mdb and Shippers table).

I run the page in Internet Explorer 11 browser and Chrome 35 browser, then I tried to delete a row.
However I didn’t get any error message like yours.

I attached the page, please kindly have review on the page and let me know if there is configuration that I missed on the WebGrid.
I attached a video regarding the result on my end.

If you also can get the sample and video from this link: http://1drv.ms/1s7etKV

Thank you.

Regards,
Hans K.

Posted: June 2, 2014 11:35 PM

Hello,

Thank you for the reply.

I got an article about why browser like Firefox didn’t allow user to have access to the clipboard.

“By default, JavaScript is not allowed to read or set your clipboard data for security and privacy reasons.
This is because websites scripts can erase and replace what you currently have in your clipboard (data loss issue) and they can read whatever you have in your clipboard (security and privacy issue); as such, you should grant access with caution.”

You could read more about the article from this link:
- http://kb.mozillazine.org/Granting_JavaScript_access_to_the_clipboard
- https://support.mozilla.org/en-US/questions/969543

Hope this helps.

Regards,
Hans K.

Posted: June 2, 2014 11:16 PM
Hello,

Thank you for the question.

That is default behavior in WebGrid, if you set the “EnableSection508Standards” to “True”.

The header row won’t lock anymore.

Regards,
Hans K.
Posted: May 30, 2014 12:21 AM
Hello,

I have replied your thread: http://www.intersoftpt.com/Community/Lounge/Delete-Grid-rows-from-server-side/

I am looking for your reply.

Thank you.

Regards,
Hans K.
All times are GMT -5. The time now is 9:56 AM.
Previous Next